{
 "route": "dns",
 "title": "DNS lookup (DoH)",
 "method": "GET",
 "price_usdc": 0.001,
 "amount_atomic": "1000",
 "request": {
  "method": "GET",
  "url": "https://utility.agentexchange.work/v1/dns/example.com?type=MX",
  "headers": {
   "PAYMENT-SIGNATURE": "<base64 x402 v2 payment payload> (or X-PAYMENT for v1)"
  }
 },
 "captured_at": "2026-10-01T00:24:59.836Z",
 "captured_from": "live upstream, on first request; refreshed after 24 h",
 "response_200": {
  "name": "example.com",
  "type": "MX",
  "status": "NOERROR",
  "rcode": 0,
  "dnssec_validated": true,
  "truncated": false,
  "answers": [
   {
    "name": "example.com",
    "type": "MX",
    "ttl": 196,
    "data": "0 .",
    "parsed": {
     "priority": 0,
     "exchange": ".",
     "null_mx": true
    }
   }
  ],
  "authority": [],
  "resolver": "Cloudflare 1.1.1.1 (cloudflare-dns.com DNS-over-HTTPS, JSON)",
  "source": {
   "provider": "Cloudflare DNS over HTTPS",
   "url": "https://cloudflare-dns.com/dns-query?name=example.com&type=MX"
  },
  "fetched_at": "2026-10-01T00:24:59.826Z",
  "route": "dns",
  "price_usdc": 0.001,
  "payment": {
   "transaction": "0x… (settlement transaction hash)",
   "network": "eip155:8453",
   "payer": "0x… (payer address)"
  },
  "request_id": "…"
 },
 "response_402_without_payment": {
  "x402Version": 2,
  "error": "Payment required",
  "resource": {
   "url": "https://utility.agentexchange.work/v1/dns/example.com?type=MX",
   "description": "Resolves one DNS record type for a name through Cloudflare 1.1.1.1 DNS-over-HTTPS and returns normalized JSON: status (NOERROR, NXDOMAIN), DNSSEC-validated flag, answers with TTL and parsed fields (MX priority and host, joined TXT strings, CAA tag and value, SOA serial). ?type= is A (default), AAAA, MX, NS, TXT, CAA, SOA or CNAME. Call it when an agent needs a live DNS answer. NXDOMAIN is a valid answer.",
   "mimeType": "application/json",
   "serviceName": "DNS record lookup",
   "tags": [
    "dns",
    "domains",
    "doh",
    "mx",
    "txt"
   ],
   "iconUrl": "https://utility.agentexchange.work/icon.png"
  },
  "accepts": [
   {
    "scheme": "exact",
    "network": "eip155:8453",
    "amount": "1000",
    "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "payTo": "0xc91cE6291eDC0713ec753BAFBA002506ffb2b95c",
    "maxTimeoutSeconds": 300,
    "extra": {
     "name": "USD Coin",
     "version": "2"
    }
   }
  ],
  "extensions": {
   "bazaar": {
    "info": {
     "input": {
      "type": "http",
      "method": "GET",
      "pathParams": {
       "domain": "example.com"
      },
      "queryParams": {
       "type": "MX"
      }
     },
     "output": {
      "type": "json",
      "example": {
       "name": "example.com",
       "type": "MX",
       "status": "NOERROR",
       "rcode": 0,
       "dnssec_validated": true,
       "truncated": false,
       "answers": [
        {
         "name": "example.com",
         "type": "MX",
         "ttl": 267,
         "data": "0 .",
         "parsed": {
          "priority": 0,
          "exchange": ".",
          "null_mx": true
         }
        }
       ],
       "authority": [],
       "resolver": "Cloudflare 1.1.1.1 (cloudflare-dns.com DNS-over-HTTPS, JSON)",
       "source": {
        "provider": "Cloudflare DNS over HTTPS",
        "url": "https://cloudflare-dns.com/dns-query?name=example.com&type=MX"
       },
       "fetched_at": "2026-10-01T00:12:12.643Z"
      }
     }
    },
    "schema": {
     "$schema": "https://json-schema.org/draft/2020-12/schema",
     "type": "object",
     "properties": {
      "input": {
       "type": "object",
       "properties": {
        "type": {
         "type": "string",
         "const": "http"
        },
        "method": {
         "type": "string",
         "enum": [
          "GET",
          "HEAD"
         ]
        },
        "pathParams": {
         "type": "object",
         "properties": {
          "domain": {
           "type": "string",
           "pattern": "^[A-Za-z0-9_.-]+\\.[A-Za-z0-9-]+$",
           "maxLength": 253,
           "description": "domain name (IDN accepted, converted to punycode)"
          }
         },
         "required": [
          "domain"
         ]
        },
        "queryParams": {
         "type": "object",
         "properties": {
          "type": {
           "type": "string",
           "enum": [
            "A",
            "NS",
            "CNAME",
            "SOA",
            "MX",
            "TXT",
            "AAAA",
            "CAA"
           ],
           "default": "A",
           "description": "record type"
          }
         }
        }
       },
       "required": [
        "type",
        "method"
       ],
       "additionalProperties": false
      },
      "output": {
       "type": "object",
       "properties": {
        "type": {
         "type": "string"
        },
        "example": {
         "type": "object",
         "properties": {
          "name": {
           "type": "string"
          },
          "type": {
           "type": "string"
          },
          "status": {
           "type": "string"
          },
          "rcode": {
           "type": "integer"
          },
          "dnssec_validated": {
           "type": "boolean"
          },
          "truncated": {
           "type": "boolean"
          },
          "answers": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "name": {
              "type": "string"
             },
             "type": {
              "type": "string"
             },
             "ttl": {
              "type": "integer"
             },
             "data": {
              "type": "string"
             },
             "parsed": {
              "type": "object",
              "properties": {
               "priority": {
                "type": "integer"
               },
               "exchange": {
                "type": "string"
               },
               "null_mx": {
                "type": "boolean"
               }
              }
             }
            }
           }
          },
          "authority": {
           "type": "array"
          },
          "resolver": {
           "type": "string"
          },
          "source": {
           "type": "object",
           "properties": {
            "provider": {
             "type": "string"
            },
            "url": {
             "type": "string"
            }
           }
          },
          "fetched_at": {
           "type": "string"
          }
         }
        }
       },
       "required": [
        "type"
       ]
      }
     },
     "required": [
      "input"
     ]
    },
    "routeTemplate": "/v1/dns/:domain"
   }
  },
  "message": "Pay $0.001 USDC on Base and retry with PAYMENT-SIGNATURE (v2) or X-PAYMENT (v1).",
  "price": "$0.001",
  "price_usdc": 0.001,
  "amount_atomic": "1000",
  "input_example": "https://utility.agentexchange.work/v1/dns/example.com?type=MX",
  "docs": {
   "openapi": "https://utility.agentexchange.work/openapi.json",
   "llms": "https://utility.agentexchange.work/llms.txt",
   "sample": "https://utility.agentexchange.work/samples/dns.json",
   "terms": "https://utility.agentexchange.work/terms"
  }
 },
 "docs": "https://utility.agentexchange.work/llms.txt"
}