Resolve ENS names and addresses. $0.01 per request.
Send an ENS name to resolve it to an address (forward resolution), or an address to look up its primary ENS name (reverse resolution). Also returns the linked avatar text record, if set.
| Method | POST |
|---|---|
| Path | /resolve |
| Content-Type | application/json |
| field | required | description |
|---|---|---|
name | one of name/address | An ENS name, e.g. vitalik.eth |
address | one of name/address | An EVM address to reverse-resolve |
curl -X POST https://ens-resolver.pdfextractapi.workers.dev/resolve \
-H "Content-Type: application/json" \
-d '{"name": "vitalik.eth"}'
{
"query": "vitalik.eth",
"query_type": "name",
"resolved_name": "vitalik.eth",
"resolved_address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"avatar": null
}
Errors return a non-200 status with { "error": { "code": "...", "message": "..." } }. Common codes: missing_input, ambiguous_input, invalid_name, invalid_address.
This endpoint is paid per-request via the x402 protocol (HTTP 402 + USDC). Unpaid requests receive a 402 response with payment instructions.