Skip to main content

ENS Resolution

Resolve ENS names to Ethereum addresses, avatars, and text records.

Try it Live

Open in Swagger UI โ†’ to test these endpoints interactively.

Endpointsโ€‹

EndpointDescriptionPrice
GET /api/ens/{name}Full profile$0.01
GET /api/ens/resolve/{name}Address only$0.01
GET /api/ens/avatar/{name}Avatar URL$0.001
GET /api/ens/reverse/{address}Reverse lookup$0.01
GET /api/ens/batchMultiple names$0.02

GET /api/ens/{name}โ€‹

Get complete ENS profile including address, avatar, and all text records.

Requestโ€‹

curl https://api.web3identity.com/api/ens/resolve/vitalik.eth

Responseโ€‹

{
"name": "vitalik.eth",
"address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"avatar": "https://metadata.ens.domains/mainnet/avatar/vitalik.eth",
"contentHash": "ipfs://...",
"records": {
"twitter": "VitalikButerin",
"github": "vbuterin",
"url": "https://vitalik.eth.limo",
"email": null,
"description": "ethereum.org",
"com.discord": null,
"org.telegram": null
},
"expiration": "2032-05-04T00:00:00Z",
"registrant": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"controller": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"resolver": "0x231b0Ee14048e9dCcD1d247744d114a4EB5E8E63"
}

SDKโ€‹

const profile = await client.getProfile('vitalik.eth');

JavaScriptโ€‹

const BASE_URL = 'https://api.web3identity.com';

async function getENSProfile(name) {
const response = await fetch(`${BASE_URL}/api/ens/${name}`);
if (!response.ok) {
if (response.status === 404) throw new Error('ENS not found');
throw new Error(`Request failed: ${response.status}`);
}
return response.json();
}

const profile = await getENSProfile('vitalik.eth');
console.log(`Address: ${profile.address}`);
console.log(`Twitter: @${profile.records?.twitter}`);
console.log(`Avatar: ${profile.avatar}`);

Pythonโ€‹

import requests

BASE_URL = "https://api.web3identity.com"

def get_ens_profile(name: str) -> dict:
response = requests.get(f"{BASE_URL}/api/ens/{name}")
response.raise_for_status()
return response.json()

profile = get_ens_profile("vitalik.eth")
print(f"Address: {profile['address']}")
print(f"Twitter: @{profile['records'].get('twitter', 'Not set')}")

cURL with jqโ€‹

# Get formatted profile
curl -s https://api.web3identity.com/api/ens/vitalik.eth | jq '{
name: .name,
address: .address,
avatar: .avatar,
twitter: .records.twitter,
github: .records.github,
bio: .records.description
}'

GET /api/ens/resolve/{name}โ€‹

Quick address resolution only (faster, smaller response).

Requestโ€‹

curl https://api.web3identity.com/api/ens/resolve/vitalik.eth

Responseโ€‹

{
"name": "vitalik.eth",
"address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
}

SDKโ€‹

const { address } = await client.resolveENS('vitalik.eth');

GET /api/ens/avatar/{name}โ€‹

Get avatar URL with automatic IPFS gateway resolution.

Requestโ€‹

curl https://api.web3identity.com/api/ens/avatar/vitalik.eth

Responseโ€‹

{
"name": "vitalik.eth",
"avatar": "https://metadata.ens.domains/mainnet/avatar/vitalik.eth",
"original": "eip155:1/erc721:0x...",
"type": "nft"
}

GET /api/ens/reverse/{address}โ€‹

Look up the primary ENS name for an Ethereum address.

Requestโ€‹

curl https://api.web3identity.com/api/ens/reverse/0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045

Responseโ€‹

{
"address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"name": "vitalik.eth"
}

SDKโ€‹

const { name } = await client.reverseResolve('0xd8dA...');

GET /api/ens/batchโ€‹

Resolve multiple ENS names in a single request.

Requestโ€‹

curl "https://api.web3identity.com/api/ens/batch?names=vitalik.eth,nick.eth,brantly.eth"

Responseโ€‹

{
"results": [
{ "name": "vitalik.eth", "address": "0xd8dA..." },
{ "name": "nick.eth", "address": "0xb8c2..." },
{ "name": "brantly.eth", "address": "0x983..." }
],
"count": 3
}

SDKโ€‹

const results = await client.batchResolve(['vitalik.eth', 'nick.eth']);

Errorsโ€‹

CodeHTTPDescription
ENS_NOT_FOUND404Name not registered
INVALID_NAME400Invalid ENS name format
NO_RESOLVER404No resolver set for name
NO_REVERSE404No primary name set

Example Errorโ€‹

{
"error": true,
"code": "ENS_NOT_FOUND",
"message": "ENS name 'notregistered.eth' is not registered"
}

Subname Supportโ€‹

Works with subnames too:

curl https://api.web3identity.com/api/ens/sub.vitalik.eth

Supported formats:

  • name.eth
  • sub.name.eth
  • deep.sub.name.eth
  • name.base.eth (Base names)
  • name.cb.id (Coinbase names)