BaCoNL / ens-records-api

Simple API hosted as a Vercel serverless function to get the records of an ENS name

Home Page:https://ens-records-api.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ENS Records API

⚠️ If you plan to use this in production, please deploy your own endpoint (it's free until heavy traffic).

Request /name.eth or /0x... and the API will return the following ENS records:

  • description
  • avatar
  • url
  • telegram
  • twitter
  • github
  • email

It works with ENS names and Ethereum addresses, but is slightly faster with ENS names.

Deploy your own

All you need is a GitHub account, a Vercel account, and a JSON RPC endpoint from a provider such as Alchemy or Infura.

Deploy with Vercel

Under "Configure Project", add the RPC endpoint.

Once Vercel is done deploying your project, press "Go to Dashboard" then "Visit". That is your deployed API!

Run locally

You will need Node.js and npm installed on your machine.

  1. Install dependencides with npm install
  2. Rename .env.example to .env and add your RPC endpoint
  3. Install the Vercel CLI
  4. Start the local server with vercel dev

About

Simple API hosted as a Vercel serverless function to get the records of an ENS name

https://ens-records-api.vercel.app


Languages

Language:JavaScript 78.4%Language:HTML 21.6%