Skip to content
Fourohtwo

ENS and Basenames lookup in one call

api.macaroonnetwork.com/execute/ens-lookup-v1

ENS and Basenames lookup in one call: a name to its address (Ethereum or Base coin type), or an address to its primary name, returned only when that name resolves back to the same address. Handles subnames, wildcards and offchain names such as *.base.eth via CCIP-Read, pinned to a stated block. Add resolved=true to your predicate to pay only for found results.

BaseAnswering
POSThttps://api.macaroonnetwork.com/execute/ens-lookup-v1

Uptime100% of 1 check in 30 days

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain,
// inside the spending rules you set on Fourohtwo.
const pay = createPayer({ privateKey: process.env.AGENT_KEY });
const res = await pay("https://api.macaroonnetwork.com/execute/ens-lookup-v1", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"input":{"name":"vitalik.eth"},"predicate":{"conditions":[{"field":"$.query_type","operator":"in","type":"field_changed","value":["forward","reverse"]},{"field":"$.ethereum_block_number","operator":"gte","type":"field_changed","value":1},{"field":"$.resolved","operator":"in","type":"field_changed","value":[true,false]},{"field":"$.limitations","type":"count_gte","value":1},{"duration_hours":1,"fi),
});
console.log(await res.json());

Example input

{"input":{"name":"vitalik.eth"},"predicate":{"conditions":[{"field":"$.query_type","operator":"in","type":"field_changed","value":["forward","reverse"]},{"field":"$.ethereum_block_number","operator":"gte","type":"field_changed","value":1},{"field":"$.resolved","operator":"in","type":"field_changed","value":[true,false]},{"field":"$.limitations","type":"count_gte","value":1},{"duration_hours":1,"fi

More from Macaroon Network