# fetchx402 Paid network utilities for agents. USDC on Base via x402 V2. No API keys. Base URL: https://api.fetchx402.com Human docs: https://api.fetchx402.com/docs ## Discover - Catalog: GET https://api.fetchx402.com/v1/catalog - OpenAPI: GET https://api.fetchx402.com/openapi.json - Manifest: GET https://api.fetchx402.com/.well-known/x402 - This file: GET https://api.fetchx402.com/llms.txt - Full params: GET https://api.fetchx402.com/llms-full.txt - Human docs: GET https://api.fetchx402.com/docs - CDP Bazaar merchant: payTo=0x33236133BecE789D551d0B5c4f9A50095d4b57d3 ## Pay (x402 V2) 1. GET the tool with `Accept: application/json` (do not send `Accept: text/html` unless you want the human paywall). 2. HTTP 402. Decode the base64 `PAYMENT-REQUIRED` header. 3. Retry the same URL with `PAYMENT-SIGNATURE` (base64 JSON echoing `accepted`, `payload`, and `extensions` when present). 4. Success is HTTP 200 JSON plus `PAYMENT-RESPONSE`. Settlement happens before the tool runs. ## Playbook: Host intelligence Job: what is true of this hostname? Prefer the composite when you need DNS + TLS + WHOIS together (one settle). Call children when you only need one fact. 1. GET https://api.fetchx402.com/v1/tools/dns?domain=example.com&type=A 2. GET https://api.fetchx402.com/v1/tools/ssl-check?domain=example.com 3. GET https://api.fetchx402.com/v1/tools/whois?domain=example.com Composite (one settle, children run internally, no nested 402): GET https://api.fetchx402.com/v1/bundles/host-intel?domain=example.com ## Playbook: Uptime check Job: is this origin resolvable, TLS-valid, and answering HTTPS? Prefer the composite when you need DNS + TLS + headers together (one settle). Call children when you only need one fact. Not a hosted monitor. 1. GET https://api.fetchx402.com/v1/tools/dns?domain=example.com&type=A 2. GET https://api.fetchx402.com/v1/tools/ssl-check?domain=example.com 3. GET https://api.fetchx402.com/v1/tools/headers?domain=example.com Composite (one settle, children run internally, no nested 402): GET https://api.fetchx402.com/v1/bundles/uptime-check?domain=example.com ## DNS Explorer GET /v1/tools/dns Price: $0.005 USDC (5000 atomic) on eip155:8453 Example: https://api.fetchx402.com/v1/tools/dns?domain=example.com&type=A Human docs: https://api.fetchx402.com/docs/dns - domain (query, required): Public fully-qualified domain name to resolve, such as example.com. IPs, localhost, and internal/mDNS names are rejected. - type (query, optional, enum A|AAAA|MX|TXT|CNAME|NS|SOA, default A): DNS record type. A = IPv4 addresses, AAAA = IPv6, MX = mail exchangers, TXT = text (SPF/DKIM), CNAME = alias, NS = nameservers, SOA = start of authority. Defaults to A if omitted. - HTTP 400 invalid_domain: Domain is missing, malformed, an IP address, or a blocked/internal name - HTTP 400 invalid_type: type must be one of A, AAAA, MX, TXT, CNAME, NS, SOA - HTTP 402 payment_required: Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header - HTTP 404 nxdomain: The domain name does not exist - HTTP 503 overloaded: Tool concurrency cap reached; retry shortly - HTTP 503 upstream_unavailable: Public DNS resolvers were unreachable - HTTP 504 dns_timeout: DNS resolution timed out - HTTP 409 payment_in_progress: The same authorization nonce is already being settled; retry shortly - HTTP 429 rate_limited: Too many requests from this client - HTTP 503 settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE - HTTP 503 facilitator_unavailable: Payment facilitator unavailable - HTTP 503 facilitator_misconfigured: Payment facilitator is not configured - HTTP 503 facilitator_unauthorized: Payment facilitator rejected credentials - HTTP 503 ledger_unavailable: Payment ledger unavailable - HTTP 503 payment_unavailable: Payment processing unavailable Example 200 (fixture, not a live lookup): { "domain": "example.com", "rcode": "NOERROR", "records": [ { "address": "104.20.23.154" } ], "resolver": "1.1.1.1", "ttl": 20, "type": "A" } ## SSL Inspector GET /v1/tools/ssl-check Price: $0.005 USDC (5000 atomic) on eip155:8453 Example: https://api.fetchx402.com/v1/tools/ssl-check?domain=example.com Human docs: https://api.fetchx402.com/docs/ssl - domain (query, required): Public fully-qualified domain name to inspect, such as example.com. IPs, localhost, and internal/mDNS names are rejected. - port (query, optional, enum 443, default 443): TLS port. v1 accepts 443 only. Defaults to 443 if omitted. - HTTP 400 invalid_domain: Domain is missing, malformed, an IP address, or a blocked/internal name - HTTP 400 invalid_port: port must be 443 - HTTP 400 blocked_address: The domain resolved to a private, loopback, or metadata address - HTTP 402 payment_required: Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header - HTTP 404 nxdomain: The domain name does not exist - HTTP 502 connect_failed: TCP connection to the host failed - HTTP 502 handshake_failed: TLS handshake failed (no leaf certificate) - HTTP 503 overloaded: Tool concurrency cap reached; retry shortly - HTTP 504 ssl_timeout: TLS handshake timed out - HTTP 409 payment_in_progress: The same authorization nonce is already being settled; retry shortly - HTTP 429 rate_limited: Too many requests from this client - HTTP 503 settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE - HTTP 503 facilitator_unavailable: Payment facilitator unavailable - HTTP 503 facilitator_misconfigured: Payment facilitator is not configured - HTTP 503 facilitator_unauthorized: Payment facilitator rejected credentials - HTTP 503 ledger_unavailable: Payment ledger unavailable - HTTP 503 payment_unavailable: Payment processing unavailable Example 200 (fixture, not a live lookup): { "cipher": "aes_256_gcm_sha384", "domain": "example.com", "expired": false, "fingerprint_sha256": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef", "hostname_match": true, "issuer": "CN=DigiCert Global G3 TLS ECC SHA384 2020 CA1, O=DigiCert Inc, C=US", "not_after": "2027-01-15T23:59:59Z", "not_before": "2026-01-15T00:00:00Z", "not_yet_valid": false, "peer_ip": "23.215.0.138", "port": 443, "sans": [ "www.example.org", "example.com", "example.net", "example.org" ], "serial": "0f1a2b3c4d5e6f708192a3b4c5d6e7f8", "signature_algorithm": "ecdsa-with-SHA384", "sni": "example.com", "subject": "CN=www.example.org, O=Internet Corporation for Assigned Names and Numbers, C=US", "tls_version": "tlsv1.3" } ## WHOIS Intelligence GET /v1/tools/whois Price: $0.005 USDC (5000 atomic) on eip155:8453 Example: https://api.fetchx402.com/v1/tools/whois?domain=example.com Human docs: https://api.fetchx402.com/docs/whois - domain (query, required): Public fully-qualified domain name to look up, such as example.com. IPs, localhost, and internal/mDNS names are rejected. - HTTP 400 invalid_domain: Domain is missing, malformed, an IP address, or a blocked/internal name - HTTP 402 payment_required: Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header - HTTP 404 rdap_unavailable: This TLD has no RDAP server in the IANA bootstrap - HTTP 404 not_found: RDAP has no registration object for this domain - HTTP 502 rdap_upstream: RDAP server returned an unusable response - HTTP 503 bootstrap_unavailable: IANA RDAP bootstrap could not be loaded - HTTP 503 overloaded: Tool concurrency cap reached; retry shortly - HTTP 504 whois_timeout: RDAP lookup timed out - HTTP 409 payment_in_progress: The same authorization nonce is already being settled; retry shortly - HTTP 429 rate_limited: Too many requests from this client - HTTP 503 settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE - HTTP 503 facilitator_unavailable: Payment facilitator unavailable - HTTP 503 facilitator_misconfigured: Payment facilitator is not configured - HTTP 503 facilitator_unauthorized: Payment facilitator rejected credentials - HTTP 503 ledger_unavailable: Payment ledger unavailable - HTTP 503 payment_unavailable: Payment processing unavailable Example 200 (fixture, not a live lookup): { "created_at": "1995-08-14T04:00:00Z", "dnssec": true, "domain": "example.com", "expires_at": "2025-08-13T04:00:00Z", "handle": "2336799_DOMAIN_COM-VRSN", "nameservers": [ "a.iana-servers.net", "b.iana-servers.net" ], "rdap_server": "https://rdap.verisign.com/com/v1/", "registrar": { "iana_id": "376", "name": "RESERVED-Internet Assigned Numbers Authority" }, "source": "rdap", "status": [ "client delete prohibited", "client transfer prohibited", "client update prohibited" ], "updated_at": "2024-08-14T07:01:39Z" } ## HTTP Headers GET /v1/tools/headers Price: $0.005 USDC (5000 atomic) on eip155:8453 Example: https://api.fetchx402.com/v1/tools/headers?domain=example.com Human docs: https://api.fetchx402.com/docs/tools/headers - domain (query, required): Public fully-qualified domain name to fetch, such as example.com. We HEAD https://{domain}/ on :443 (GET if HEAD is 405/501). IPs, localhost, and internal/mDNS names are rejected. Redirects are not followed. - HTTP 400 invalid_domain: Domain is missing, malformed, an IP address, or a blocked/internal name - HTTP 400 blocked_address: The domain resolved to a private, loopback, or metadata address - HTTP 402 payment_required: Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header - HTTP 404 nxdomain: The domain name does not exist - HTTP 502 connect_failed: TCP connection to the host failed - HTTP 502 handshake_failed: TLS handshake failed - HTTP 502 http_failed: HTTPS request failed after connect - HTTP 503 overloaded: Tool concurrency cap reached; retry shortly - HTTP 504 headers_timeout: HTTPS header fetch timed out - HTTP 409 payment_in_progress: The same authorization nonce is already being settled; retry shortly - HTTP 429 rate_limited: Too many requests from this client - HTTP 503 settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE - HTTP 503 facilitator_unavailable: Payment facilitator unavailable - HTTP 503 facilitator_misconfigured: Payment facilitator is not configured - HTTP 503 facilitator_unauthorized: Payment facilitator rejected credentials - HTTP 503 ledger_unavailable: Payment ledger unavailable - HTTP 503 payment_unavailable: Payment processing unavailable Example 200 (fixture, not a live lookup): { "domain": "example.com", "headers": { "access-control-allow-origin": null, "cache-control": "max-age=604800", "content-security-policy": null, "content-security-policy-report-only": null, "content-type": "text/html", "cross-origin-opener-policy": null, "cross-origin-resource-policy": null, "location": null, "permissions-policy": null, "referrer-policy": null, "server": "ECS (nyb/1D2A)", "strict-transport-security": "max-age=31536000", "www-authenticate": null, "x-content-type-options": null, "x-frame-options": null, "x-powered-by": null }, "method": "HEAD", "peer_ip": "23.215.0.138", "status": 200, "url": "https://example.com/" } ## Redirect Tracer GET /v1/tools/resolve-redirect Price: $0.005 USDC (5000 atomic) on eip155:8453 Example: https://api.fetchx402.com/v1/tools/resolve-redirect?domain=example.com Human docs: https://api.fetchx402.com/docs/tools/resolve-redirect - domain (query, required): Public fully-qualified domain name to start from, such as example.com. We HEAD https://{domain}/ on :443 (GET if HEAD is 405/501), then follow Location up to 5 hops. IPs, localhost, and internal/mDNS names are rejected. Only HTTPS :443 after ConnectGuard. Response bodies are not returned. - HTTP 400 invalid_domain: Domain is missing, malformed, an IP address, or a blocked/internal name - HTTP 400 blocked_address: The domain resolved to a private, loopback, or metadata address - HTTP 402 payment_required: Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header - HTTP 404 nxdomain: The domain name does not exist - HTTP 502 connect_failed: TCP connection to the host failed - HTTP 502 handshake_failed: TLS handshake failed - HTTP 502 http_failed: HTTPS request failed after connect - HTTP 503 overloaded: Tool concurrency cap reached; retry shortly - HTTP 504 redirect_timeout: HTTPS redirect trace timed out - HTTP 409 payment_in_progress: The same authorization nonce is already being settled; retry shortly - HTTP 429 rate_limited: Too many requests from this client - HTTP 503 settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE - HTTP 503 facilitator_unavailable: Payment facilitator unavailable - HTTP 503 facilitator_misconfigured: Payment facilitator is not configured - HTTP 503 facilitator_unauthorized: Payment facilitator rejected credentials - HTTP 503 ledger_unavailable: Payment ledger unavailable - HTTP 503 payment_unavailable: Payment processing unavailable Example 200 (fixture, not a live lookup): { "domain": "example.com", "final_url": "https://example.com/", "hop_count": 1, "hops": [ { "index": 1, "location": null, "method": "HEAD", "peer_ip": "23.215.0.138", "status": 200, "url": "https://example.com/" } ], "start_url": "https://example.com/", "stop_reason": null, "truncated": false } ## Host intelligence GET /v1/bundles/host-intel Price: $0.015 USDC (15000 atomic) on eip155:8453 Example: https://api.fetchx402.com/v1/bundles/host-intel?domain=example.com Human docs: https://api.fetchx402.com/docs/host-intel - domain (query, required): Public fully-qualified domain name. Same Domain guards as the child tools. IPs, localhost, and internal/mDNS names are rejected. - dns_type (query, optional, enum A|AAAA|MX|TXT|CNAME|NS|SOA, default A): DNS record type passed through to DNS Explorer. Defaults to A if omitted. Does not change TLS or RDAP. - HTTP 400 invalid_domain: Domain is missing, malformed, an IP address, or a blocked/internal name - HTTP 400 invalid_type: dns_type must be one of A, AAAA, MX, TXT, CNAME, NS, SOA - HTTP 402 payment_required: Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header - HTTP 503 overloaded: Tool concurrency cap reached; retry shortly - HTTP 504 host_intel_timeout: Host intelligence bundle timed out - HTTP 409 payment_in_progress: The same authorization nonce is already being settled; retry shortly - HTTP 429 rate_limited: Too many requests from this client - HTTP 503 settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE - HTTP 503 facilitator_unavailable: Payment facilitator unavailable - HTTP 503 facilitator_misconfigured: Payment facilitator is not configured - HTTP 503 facilitator_unauthorized: Payment facilitator rejected credentials - HTTP 503 ledger_unavailable: Payment ledger unavailable - HTTP 503 payment_unavailable: Payment processing unavailable Example 200 (fixture, not a live lookup): { "dns": { "domain": "example.com", "rcode": "NOERROR", "records": [ { "address": "104.20.23.154" } ], "resolver": "1.1.1.1", "ttl": 20, "type": "A" }, "domain": "example.com", "ssl": { "cipher": "aes_256_gcm_sha384", "domain": "example.com", "expired": false, "fingerprint_sha256": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef", "hostname_match": true, "issuer": "CN=DigiCert Global G3 TLS ECC SHA384 2020 CA1, O=DigiCert Inc, C=US", "not_after": "2027-01-15T23:59:59Z", "not_before": "2026-01-15T00:00:00Z", "not_yet_valid": false, "peer_ip": "23.215.0.138", "port": 443, "sans": [ "www.example.org", "example.com", "example.net", "example.org" ], "serial": "0f1a2b3c4d5e6f708192a3b4c5d6e7f8", "signature_algorithm": "ecdsa-with-SHA384", "sni": "example.com", "subject": "CN=www.example.org, O=Internet Corporation for Assigned Names and Numbers, C=US", "tls_version": "tlsv1.3" }, "whois": { "created_at": "1995-08-14T04:00:00Z", "dnssec": true, "domain": "example.com", "expires_at": "2025-08-13T04:00:00Z", "handle": "2336799_DOMAIN_COM-VRSN", "nameservers": [ "a.iana-servers.net", "b.iana-servers.net" ], "rdap_server": "https://rdap.verisign.com/com/v1/", "registrar": { "iana_id": "376", "name": "RESERVED-Internet Assigned Numbers Authority" }, "source": "rdap", "status": [ "client delete prohibited", "client transfer prohibited", "client update prohibited" ], "updated_at": "2024-08-14T07:01:39Z" } } ## Uptime check GET /v1/bundles/uptime-check Price: $0.015 USDC (15000 atomic) on eip155:8453 Example: https://api.fetchx402.com/v1/bundles/uptime-check?domain=example.com Human docs: https://api.fetchx402.com/docs/tools/uptime-check - domain (query, required): Public fully-qualified domain name. Same Domain guards as the child tools. IPs, localhost, and internal/mDNS names are rejected. v1 always probes https://{domain}/ on :443. - HTTP 400 invalid_domain: Domain is missing, malformed, an IP address, or a blocked/internal name - HTTP 402 payment_required: Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header - HTTP 503 overloaded: Tool concurrency cap reached; retry shortly - HTTP 504 uptime_check_timeout: Uptime check bundle timed out - HTTP 409 payment_in_progress: The same authorization nonce is already being settled; retry shortly - HTTP 429 rate_limited: Too many requests from this client - HTTP 503 settlement_uncertain: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE - HTTP 503 facilitator_unavailable: Payment facilitator unavailable - HTTP 503 facilitator_misconfigured: Payment facilitator is not configured - HTTP 503 facilitator_unauthorized: Payment facilitator rejected credentials - HTTP 503 ledger_unavailable: Payment ledger unavailable - HTTP 503 payment_unavailable: Payment processing unavailable Example 200 (fixture, not a live lookup): { "dns": { "domain": "example.com", "rcode": "NOERROR", "records": [ { "address": "104.20.23.154" } ], "resolver": "1.1.1.1", "ttl": 20, "type": "A" }, "domain": "example.com", "headers": { "domain": "example.com", "headers": { "access-control-allow-origin": null, "cache-control": "max-age=604800", "content-security-policy": null, "content-security-policy-report-only": null, "content-type": "text/html", "cross-origin-opener-policy": null, "cross-origin-resource-policy": null, "location": null, "permissions-policy": null, "referrer-policy": null, "server": "ECS (nyb/1D2A)", "strict-transport-security": "max-age=31536000", "www-authenticate": null, "x-content-type-options": null, "x-frame-options": null, "x-powered-by": null }, "method": "HEAD", "peer_ip": "23.215.0.138", "status": 200, "url": "https://example.com/" }, "ssl": { "cipher": "aes_256_gcm_sha384", "domain": "example.com", "expired": false, "fingerprint_sha256": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef", "hostname_match": true, "issuer": "CN=DigiCert Global G3 TLS ECC SHA384 2020 CA1, O=DigiCert Inc, C=US", "not_after": "2027-01-15T23:59:59Z", "not_before": "2026-01-15T00:00:00Z", "not_yet_valid": false, "peer_ip": "23.215.0.138", "port": 443, "sans": [ "www.example.org", "example.com", "example.net", "example.org" ], "serial": "0f1a2b3c4d5e6f708192a3b4c5d6e7f8", "signature_algorithm": "ecdsa-with-SHA384", "sni": "example.com", "subject": "CN=www.example.org, O=Internet Corporation for Assigned Names and Numbers, C=US", "tls_version": "tlsv1.3" }, "verdict": "up" } Do not call GET /v1/tools/ping for production work; it is a payment smoke test only.