Catalog
DomainsGETlive

DNS lookup

Look up DNS records (A, AAAA, MX, TXT, NS, CNAME) for a hostname.

$0.001
per call
Success
100%
p50 latency
631ms
p95 latency
1.61s
Calls (30d)
6

Provider contract

Call path
/routes/
2siodefault
/domains/dns-lookup
Method
GET
Selected provider
2siodefault
Provider price
$0.001
Settlement
Base USDC · x402 · 5% h402 fee

Quickstart

Both commands call the selected provider directly.

cURL
curl '/routes/2sio/domains/dns-lookup?host=cloudflare.com'
CLI
h402 call 'domains/dns-lookup' --provider '2sio' --method GET --query '{"host":"cloudflare.com"}'

Parameters & live test

pays real USDC
2siodefault$0.0010/call

Fill the request fields, quote the exact per-call total, then choose x402 or eligible bonus credit explicitly before sending. Only the selected provider's listed parameters are accepted.

hoststringrequired1–253 chars

Required fully qualified hostname or domain to resolve, such as cloudflare.com.

typesstringoptional

Comma-separated DNS record types. 2s.io defaults to A,AAAA,MX,TXT,NS when omitted.

e.g.
resolverstringoptional

Optional public DNS resolver.

One of
GET/routes/2sio/domains/dns-lookup
Request query
{
  "host": "cloudflare.com"
}

ResponseExample response
{
  "data": {
    "data": {
      "ok": true,
      "items": [
        {
          "query": "cloudflare.com",
          "resolver": null,
          "durationMs": 20,
          "answers": [
            {
              "type": "A",
              "records": [
                {
                  "address": "104.16.133.229",
                  "ttl": 149
                },
                {
                  "address": "104.16.132.229",
                  "ttl": 149
                }
              ]
            },
            {
              "type": "AAAA",
              "records": [
                {
                  "address": "2606:4700::6810:85e5",
                  "ttl": 300
                },
                {
                  "address": "2606:4700::6810:84e5",
                  "ttl": 300
                }
              ]
            },
            {
              "type": "MX",
              "records": [
                {
                  "exchange": "mxa.global.inbound.cf-emailsecurity.net",
                  "priority": 10,
                  "type": "MX"
                },
                {
                  "exchange": "mxb.global.inbound.cf-emailsecurity.net",
                  "priority": 10,
                  "type": "MX"
                },
                {
                  "exchange": "mxa-canary.global.inbound.cf-emailsecurity.net",
                  "priority": 5,
                  "type": "MX"
                }
              ]
            }
          ]
        }
      ],
      "total": 1,
      "source": {
        "provider": "Public DNS resolvers",
        "url": "https://2s.io",
        "license": "Public DNS data"
      }
    },
    "meta": {
      "endpoint": "dns.lookup",
      "version": null,
      "caller": "x402",
      "cost": {
        "usd": 0.001
      },
      "settlement": {
        "txHash": "0x93d0933734fe916a8be3e72d5e741ac0dba97609a9cf40a910d233150c2fd360",
        "network": "eip155:8453",
        "success": true
      }
    }
  },
  "h402": {
    "routeId": "domains/dns-lookup",
    "provider": "2sio",
    "selectedCandidateId": "domains/dns-lookup/2sio",
    "routing": "manual",
    "paidBy": "x402-exact"
  }
}

Providers

Choose a provider for this task. The catalog recommends the current default from quality, reliability, and price; your selected provider stays pinned. Listed prices are provider prices; settlement adds a 5% h402 fee.

2siodefaultcheapest
x402
100
Success
100%
p50
1.43s
Calls
3
100%
$0.001$0.0010/call
robtex
x402
100
Success
100%
p50
511ms
Calls
3
100%
$0.005$0.0050/call
Last successful call: 27d ago· Aggregated by h402 — not the source provider