Skip to content

Getting started with ENSDb

Get the whole onchain state of ENS in your database.

ENSDb is an open standard for bi-directional ENS integration. It defines a carefully crafted set of database schema designs, rules, and constraints for storing the entire ENS onchain state in a PostgreSQL database — making the data accessible from any programming language.

Any app following the standard can:

  • Perform write operations to produce an ENSDb instance.
  • Perform read operations against the ENSDb instance.

An ENSDb instance contains the entire onchain state of ENS:

  • All domains (ENSv1 and ENSv2)
  • All registrations and renewals
  • All resolver records and text records
  • All events and ownership history
  • All NFT/token data for names

By building on a PostgreSQL database, ENSDb inherits world-class capabilities:

  • ACID transactions — Data integrity guarantees
  • Complex queries — Joins, aggregations, window functions
  • Scalability — Replication, sharding, connection pooling
  • Ecosystem — Mature tools, ORMs, dashboards, analytics platforms
  • Reliability — Decades of production-proven technology

ENSDb unlocks a new universe of ENS applications:

Custom APIs

Build specialized GraphQL or REST APIs tailored to your use case. Query exactly the data you need with full SQL power.

Analytics & Dashboards

Create real-time dashboards and analytics pipelines. Better than Dune — you have the full ENS state locally with sub-second query latency.

CLIs & Developer Tools

Build command-line tools for ENS operations. Query domains, check expiration, analyze name patterns — all from your terminal.

Event-Based Engines

Build reactive systems that respond to ENS state changes. Monitor registration lifecycles, ownership transfers, resolver updates.

Data Pipelines

Feed ENS data into your existing data infrastructure. Sync to data warehouses, trigger webhooks, populate search indexes.

AI & ML Models

Train machine learning models on complete ENS datasets. Predict name values, detect patterns, analyze market trends.

  • ENSIndexer — The reference ENSDb Writer implementation
  • ENSApi — The reference ENSDb Reader implementation