Text Records
Read ENS text records including social handles, URLs, email, and custom fields.
Endpointsโ
| Endpoint | Description | Price |
|---|---|---|
GET /api/ens/{name}/records | All text records | $0.01 |
GET /api/ens/{name}/record/{key} | Single record | $0.001 |
GET /api/records/batch | Multiple names/keys | $0.02 |
GET /api/records/search | Search by record value | $0.02 |
GET /api/ens/{name}/recordsโ
Get all text records for an ENS name.
Requestโ
curl https://api.web3identity.com/api/ens/records/vitalik.eth
Responseโ
{
"name": "vitalik.eth",
"records": {
"avatar": "eip155:1/erc721:0xb7f7f6c52f2e2fdb1963eab30438024864c313f6/2430",
"description": "ethereum.org",
"url": "https://vitalik.eth.limo",
"com.twitter": "VitalikButerin",
"com.github": "vbuterin",
"email": null,
"com.discord": null,
"org.telegram": null,
"notice": null,
"keywords": null,
"location": null
},
"resolver": "0x231b0Ee14048e9dCcD1d247744d114a4EB5E8E63",
"recordCount": 5
}
SDKโ
const records = await client.getTextRecords('vitalik.eth');
console.log(records['com.twitter']); // "VitalikButerin"
GET /api/ens/{name}/record/{key}โ
Get a single text record by key.
Requestโ
curl https://api.web3identity.com/api/ens/record/vitalik.eth/com.twitter
Responseโ
{
"name": "vitalik.eth",
"key": "com.twitter",
"value": "VitalikButerin",
"normalized": {
"platform": "twitter",
"handle": "VitalikButerin",
"url": "https://twitter.com/VitalikButerin"
}
}
SDKโ
const twitter = await client.getTextRecord('vitalik.eth', 'com.twitter');
Standard Record Keysโ
Social Platformsโ
| Key | Description | Example Value |
|---|---|---|
com.twitter | Twitter/X handle | VitalikButerin |
com.github | GitHub username | vbuterin |
com.discord | Discord username | vitalik#1234 |
org.telegram | Telegram username | vitalik |
com.linkedin | LinkedIn path | in/vitalik |
io.farcaster | Farcaster username | vitalik |
com.youtube | YouTube channel | @vitalik |
app.lens | Lens Protocol handle | vitalik.lens |
Profile Informationโ
| Key | Description | Example Value |
|---|---|---|
avatar | Profile picture | ipfs://Qm... or NFT URI |
description | Bio/description | Building Ethereum |
url | Website URL | https://vitalik.eth.limo |
email | Email address | hello@vitalik.eth |
location | Location | Singapore |
keywords | Comma-separated tags | ethereum,web3,crypto |
notice | Public notice | DMs open |
Web3 Recordsโ
| Key | Description | Example Value |
|---|---|---|
contenthash | IPFS/IPNS/Swarm hash | ipfs://Qm... |
eth.addr | ETH address | 0xd8dA... |
btc.addr | Bitcoin address | bc1q... |
sol.addr | Solana address | Hqmf... |
GET /api/records/batchโ
Query multiple records across multiple names.
Requestโ
curl -X POST https://api.web3identity.com/api/records/batch \
-H "Content-Type: application/json" \
-d '{
"queries": [
{ "name": "vitalik.eth", "keys": ["com.twitter", "com.github"] },
{ "name": "nick.eth", "keys": ["com.twitter"] }
]
}'
Responseโ
{
"results": {
"vitalik.eth": {
"com.twitter": "VitalikButerin",
"com.github": "vbuterin"
},
"nick.eth": {
"com.twitter": "nicksdjohnson"
}
},
"count": 2
}
SDKโ
const records = await client.batchRecords([
{ name: 'vitalik.eth', keys: ['com.twitter', 'com.github'] },
{ name: 'nick.eth', keys: ['com.twitter'] }
]);
GET /api/records/searchโ
Find ENS names by record value.
Requestโ
# Find all names with a specific Twitter handle
curl "https://api.web3identity.com/api/records/search?key=com.twitter&value=VitalikButerin"
Responseโ
{
"query": {
"key": "com.twitter",
"value": "VitalikButerin"
},
"results": [
{
"name": "vitalik.eth",
"address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
}
],
"count": 1
}
Use Casesโ
- Verify Twitter handle ownership
- Find ENS name for GitHub user
- Discover connected identities
Custom Recordsโ
ENS supports arbitrary custom records:
# Query custom record
curl https://api.web3identity.com/api/ens/example.eth/record/com.myapp.userId
Common patterns:
com.{domain}.{key}โ App-specific dataio.{protocol}.{key}โ Protocol-specific dataxyz.{key}โ Generic namespace
Cointype Addressesโ
Query multi-chain addresses:
# Bitcoin address
curl https://api.web3identity.com/api/ens/record/vitalik.eth/addr.60 # ETH (cointype 60)
curl https://api.web3identity.com/api/ens/record/vitalik.eth/addr.0 # BTC (cointype 0)
curl https://api.web3identity.com/api/ens/record/vitalik.eth/addr.501 # SOL (cointype 501)
GET /api/ens/{name}/addressesโ
Get all multi-chain addresses:
curl https://api.web3identity.com/api/ens/addresses/vitalik.eth
{
"name": "vitalik.eth",
"addresses": {
"eth": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"btc": null,
"sol": null,
"ltc": null
}
}
Errorsโ
| Code | HTTP | Description |
|---|---|---|
NAME_NOT_FOUND | 404 | ENS name not registered |
NO_RESOLVER | 404 | No resolver set for name |
RECORD_NOT_SET | 404 | Specific record not set |
INVALID_KEY | 400 | Invalid record key format |
Example Errorโ
{
"error": true,
"code": "RECORD_NOT_SET",
"message": "Record 'com.twitter' is not set for 'example.eth'"
}
Related Endpointsโ
- ENS Resolution โ Full profile lookup
- Avatar Resolution โ Avatar images
- Bulk Lookups โ High-volume queries