ENS
Overview
The ENS (Ethereum Name Service) API allows you to retrieve ENS details such as addresses, names, and avatars for ENS names or Ethereum addresses. The API provides endpoints for looking up ENS details by name or address.
Endpoints
Get ENS Details by Name
Description: Retrieves ENS details for a specific ENS name, including the resolved Ethereum address and avatar URL.
Authentication Required: No
Parameters
Path Parameters
name
string
Yes
The ENS name to look up (e.g., "vitalik.eth")
Responses
Success Response
Code: 200 OK
ok
boolean
Success status
data
object
ENS details
data.name
string
The ENS name (same as input)
data.avatar
string or null
URL to the ENS avatar (if set)
data.address
string or null
Ethereum address associated with the ENS name
ENS Name Not Found or Invalid
Code: 200 OK
Example
Request
Response
Notes
If the ENS name does not exist or does not resolve to an address, all fields in the response will be
null
.The API checks a cache before querying the Ethereum network to improve performance.
Get ENS Details by Address
Description: Retrieves ENS details for a specific Ethereum address, including the primary ENS name and avatar URL.
Authentication Required: No
Parameters
Path Parameters
address
string
Yes
The Ethereum address to look up (e.g., "0x1234...")
Responses
Success Response
Code: 200 OK
ok
boolean
Success status
data
object
ENS details
data.name
string or null
The primary ENS name associated with the address (if any)
data.avatar
string or null
URL to the ENS avatar (if set)
data.address
string
The Ethereum address (same as input)
No ENS Name Found
Code: 200 OK
Example
Request
Response
Notes
If the address does not have a primary ENS name set, the
name
field will benull
.If a name is found but has no avatar set, the
avatar
field will benull
.The API checks a cache before querying the Ethereum network to improve performance.
Last updated