Skip to content

Domain by Name

Fetch a Domain by its canonical name. Because canonical_name is materialized across both ENSv1 and ENSv2, the same lookup works regardless of protocol version. See Connect for setup.

SQL
SELECT
id,
type,
canonical_name,
canonical_node,
owner_id
FROM "ensindexer_0".domains
WHERE canonical_name = 'eth'
AND canonical = true;
Output
# idtypecanonical_namecanonical_nodeowner_id
1
11155111-0xb6fb46e1458915dd828633d91e1df8e4c3f2d4dd-0x93cdeb708b7545dc668eb9280176169d1c33cfd8ed6f04690a0bcc88a93fc4ae
ENSv1Domain eth 0x93cdeb708b7545dc668eb9280176169d1c33cfd8ed6f04690a0bcc88a93fc4ae 0xa51c9e6efe589407c72984e93b45e35a71a398ec
2
11155111-0x835f0b284e78cd3f358bcf6cba3b53809f09b79e-35894389512221139346028120028875095598761990588366713962827482865183915769856
ENSv2Domain eth 0x93cdeb708b7545dc668eb9280176169d1c33cfd8ed6f04690a0bcc88a93fc4ae 0xffffffffff52d316b7bd028358089bc8066b8f80

Output matches a point in time snapshot of ENSDb result from our "V2 Sepolia" Hosted ENSNode instance. Live output depends on the configuration of your ENSNode instance and also changes that may have happened in ENS since this point in time snapshot example response was captured.