Custom APIs
ENSDb integration
For special use cases that go beyond what the ENS Omnigraph exposes — you can query the live onchain state of both ENSv1 and ENSv2 directly via SQL.
ENSDb is a bi-directional integration standard for any EnsDbWriter and EnsDbReader implementations to coordinate around the live unified onchain state of ENSv1 and ENSv2 in a carefully-crafted standardized data model within a PostgreSQL database. Because ENSDb builds on Postgres, you can use any language with a Postgres driver — TypeScript, Python, Rust, Go, and more.
We’re building ensdb-cli & ENSDb snapshots so you can pull down a fresh ENSDb in minutes instead of paying for a full historical RPC backfill among many other benefits.
Inspirations for what you can build with ENSDb
Section titled “Inspirations for what you can build with ENSDb”Analytics & Dashboards
CLIs & Developer Tools
Event-Based Engines
Data Pipelines
AI Agents
Example: fetch ENSv2 domains with the ENSDb SDK
Section titled “Example: fetch ENSv2 domains with the ENSDb SDK”import { EnsDbReader } from "@ensnode/ensdb-sdk";import { eq } from "drizzle-orm";
const ensDbReader = new EnsDbReader(ensDbConnectionString, ensIndexerSchemaName);const { ensDb, ensIndexerSchema } = ensDbReader;
const v2Domains = await ensDb .select() .from(ensIndexerSchema.domain) .where(eq(ensIndexerSchema.domain.type, "ENSv2Domain"));Example: fetch ENSv2 domains with raw SQL
Section titled “Example: fetch ENSv2 domains with raw SQL”SELECT * FROM ensindexer_0.domainsWHERE type = 'ENSv2Domain'LIMIT 10;