{"openapi":"3.1.0","x-discovery":{"ownershipProofs":["0x17df864489eebf792d4885a09bbd264ebe414c0d719a052306200532498e0b8e63834af70fc11cfda82983709b8159725b23a9c422b7a9ba79f79751ed41d0441c"]},"info":{"title":"ZERO Payment Guard","version":"1.5.0","description":"Cheap pay-per-call tools for agents: company/domain enrichment, web page to clean Markdown + metadata, read-only Base chain reads (wallet snapshot, tx status) and payment safety checks (USDC payment verification, x402 preflight, token check, Basename resolve).","x-guidance":"Call GET /v1/wallet-snapshot?address=<0x> for ETH + canonical token balances of a Base wallet ($0.002) and GET /v1/tx-status?tx=<hash> to check a Base tx landed with decoded token transfers ($0.001). Call GET /v1/company-brief?domain=<domain> for enrichment plus homepage/About Markdown in one call ($0.003). Call GET /v1/page-extract-batch?urls=<u1>,<u2> for up to 10 pages at once ($0.008 flat). Call GET /v1/domain-enrich?domain=<domain, URL or work email> for a company profile from public sources (name, description, socials, email provider/MX, SPF/DMARC, DNS provider, RDAP registrar/creation date/age, tech stack, SaaS signals). Call GET /v1/page-extract?url=<public url> to turn any web page into clean Markdown with title, description, canonical, OpenGraph/Twitter, JSON-LD types, headings and link counts (add links=1 for the link list, maxChars to cap length). Call GET /v1/usdc-payment?tx=<hash>&to=<address>&min=<usdc> to confirm a Base mainnet transaction delivered native Circle USDC (verdict paid/not_paid). Call GET /v1/x402-preflight?url=<https url> before paying an unknown x402 seller (verdict ok/caution/block). Call GET /v1/token-check?address=<0x> before accepting or approving a Base token (verdict canonical/ok/caution/block). Call GET /v1/basename?name=alice.base.eth (or ?address=0x...) before sending funds to a name. All are paid per call in USDC on Base via x402 v2; invalid input returns 400 and is not charged. An MCP server with the same tools is at /mcp.","contact":{"name":"Silas Montgomery (operator of ZERO)","email":"xge9m3ex@mail.grokbot.com"}},"servers":[{"url":"https://zero-payment-guard.worker.beacon.host"}],"paths":{"/v1/usdc-payment":{"get":{"operationId":"verify_usdc_payment","summary":"Verify a Base tx paid native USDC to a recipient","tags":["Payments","Base","USDC"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002"},"protocols":[{"x402":{}}]},"parameters":[{"name":"tx","in":"query","required":true,"description":"Base mainnet transaction hash (0x + 64 hex)","schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"}},{"name":"to","in":"query","required":false,"description":"Expected recipient address","schema":{"type":"string"}},{"name":"min","in":"query","required":false,"description":"Minimum USDC amount, decimal","schema":{"type":"string"}},{"name":"minConfirmations","in":"query","required":false,"description":"Required confirmations, default 1","schema":{"type":"string"}}],"responses":{"200":{"description":"Verification result","content":{"application/json":{"schema":{"type":"object","properties":{"verdict":{"type":"string","enum":["paid","not_paid","not_found"]},"receivedUsdc":{"type":"string"},"confirmations":{"type":"integer"},"checks":{"type":"object"},"transfers":{"type":"array","items":{"type":"object"}},"warnings":{"type":"array","items":{"type":"string"}}},"required":["verdict"]}}}},"400":{"description":"Invalid input"},"402":{"description":"Payment Required"}}}},"/v1/x402-preflight":{"get":{"operationId":"x402_preflight","summary":"Audit an x402 endpoint's payment requirements before paying","tags":["x402","Security","Payments"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"protocols":[{"x402":{}}]},"parameters":[{"name":"url","in":"query","required":true,"description":"https URL of the x402 resource to check","schema":{"type":"string"}},{"name":"method","in":"query","required":false,"description":"GET or POST, default GET","schema":{"type":"string","enum":["GET","POST"]}}],"responses":{"200":{"description":"Preflight report","content":{"application/json":{"schema":{"type":"object","properties":{"verdict":{"type":"string","enum":["ok","caution","block","free_or_unprotected"]},"options":{"type":"array","items":{"type":"object"}},"flags":{"type":"array","items":{"type":"string"}}},"required":["verdict"]}}}},"400":{"description":"Invalid input"},"402":{"description":"Payment Required"}}}},"/v1/token-check":{"get":{"operationId":"token_check","summary":"Is this Base token/contract canonical or suspicious?","tags":["Base","Security","Tokens"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.003"},"protocols":[{"x402":{}}]},"parameters":[{"name":"address","in":"query","required":true,"description":"Token or contract address on Base mainnet","schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"}}],"responses":{"200":{"description":"Token safety report","content":{"application/json":{"schema":{"type":"object","properties":{"verdict":{"type":"string","enum":["canonical","ok","caution","block"]},"isContract":{"type":"boolean"},"token":{"type":["object","null"]},"canonical":{"type":["object","null"]},"proxy":{"type":["object","null"]},"owner":{"type":["string","null"]},"flags":{"type":"array","items":{"type":"string"}}},"required":["verdict"]}}}},"400":{"description":"Invalid input (not charged)"},"402":{"description":"Payment Required"}}}},"/v1/wallet-snapshot":{"get":{"operationId":"wallet_snapshot","summary":"Base wallet snapshot: ETH + canonical token balances, nonce, EOA/contract, flags","tags":["Base","Wallet","Balances"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002"},"protocols":[{"x402":{}}]},"parameters":[{"name":"address","in":"query","required":true,"description":"Base mainnet address (EOA or contract)","schema":{"type":"string"}}],"responses":{"200":{"description":"Snapshot","content":{"application/json":{"schema":{"type":"object","properties":{"address":{"type":"string"},"block":{"type":"integer"},"isContract":{"type":"boolean"},"nonce":{"type":"integer"},"eth":{"type":"string"},"usdc":{"type":"string"},"tokens":{"type":"object","additionalProperties":{"type":"string"}},"flags":{"type":"array","items":{"type":"string"}}},"required":["address","eth","usdc"]}}}},"400":{"description":"Invalid input (not charged)"},"402":{"description":"Payment Required"}}}},"/v1/tx-status":{"get":{"operationId":"tx_status","summary":"Base transaction status: state, confirmations, fee, decoded ERC-20 transfers","tags":["Base","Transactions"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.001"},"protocols":[{"x402":{}}]},"parameters":[{"name":"tx","in":"query","required":true,"description":"Base mainnet transaction hash","schema":{"type":"string"}}],"responses":{"200":{"description":"Status","content":{"application/json":{"schema":{"type":"object","properties":{"state":{"type":"string","enum":["not_found","pending","success","reverted"]},"found":{"type":"boolean"},"block":{"type":"integer"},"confirmations":{"type":"integer"},"from":{"type":"string"},"to":{"type":["string","null"]},"feeEth":{"type":"string"},"tokenTransfers":{"type":"array","items":{"type":"object"}}},"required":["state","found"]}}}},"400":{"description":"Invalid input (not charged)"},"402":{"description":"Payment Required"}}}},"/v1/basename":{"get":{"operationId":"basename_resolve","summary":"Resolve a Basename to an address, or an address to its verified primary Basename","tags":["Base","Identity","Basenames"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.001"},"protocols":[{"x402":{}}]},"parameters":[{"name":"name","in":"query","required":false,"description":"Basename, e.g. alice or alice.base.eth","schema":{"type":"string"}},{"name":"address","in":"query","required":false,"description":"0x address for reverse lookup","schema":{"type":"string"}}],"responses":{"200":{"description":"Resolution","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"address":{"type":["string","null"]},"primaryName":{"type":["string","null"]},"forwardMatches":{"type":"boolean"},"found":{"type":"boolean"}},"required":["found"]}}}},"400":{"description":"Invalid input (not charged)"},"402":{"description":"Payment Required"}}}},"/v1/company-brief":{"get":{"operationId":"company_brief","summary":"Company brief bundle: domain enrichment + homepage/About page Markdown","tags":["Enrichment","Company","Bundle"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.003"},"protocols":[{"x402":{}}]},"parameters":[{"name":"domain","in":"query","required":true,"description":"Domain, URL or work email","schema":{"type":"string"}},{"name":"maxChars","in":"query","required":false,"description":"Max Markdown chars per page (500-20000, default 6000)","schema":{"type":"string"}}],"responses":{"200":{"description":"Brief","content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string"},"company":{"type":"object"},"email":{"type":"object"},"dns":{"type":"object"},"registration":{"type":"object"},"techStack":{"type":"array","items":{"type":"object"}},"homepage":{"type":["object","null"],"properties":{"url":{"type":"string"},"title":{"type":["string","null"]},"markdown":{"type":"string"},"wordCount":{"type":"integer"}}},"aboutPage":{"type":["object","null"]}},"required":["domain"]}}}},"400":{"description":"Invalid domain (not charged)"},"402":{"description":"Payment Required"},"422":{"description":"Domain not found (not charged)"}}}},"/v1/page-extract-batch":{"get":{"operationId":"page_extract_batch","summary":"Batch web page to Markdown + metadata (up to 10 URLs)","tags":["Web","Scraping","Batch"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.008"},"protocols":[{"x402":{}}]},"parameters":[{"name":"urls","in":"query","required":true,"description":"Comma-separated public URLs, max 10 (or repeat url=)","schema":{"type":"string"}},{"name":"maxChars","in":"query","required":false,"description":"Max Markdown chars per page (500-30000, default 8000)","schema":{"type":"string"}},{"name":"links","in":"query","required":false,"description":"1 to include links","schema":{"type":"string","enum":["0","1"]}}],"responses":{"200":{"description":"Results","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer"},"ok":{"type":"integer"},"failed":{"type":"integer"},"results":{"type":"array","items":{"type":"object","properties":{"ok":{"type":"boolean"},"finalUrl":{"type":"string"},"title":{"type":["string","null"]},"markdown":{"type":"string"},"error":{"type":"string"}}}}},"required":["results"]}}}},"400":{"description":"No URLs or more than 10 (not charged)"},"402":{"description":"Payment Required"},"422":{"description":"No URL could be extracted (not charged)"}}}},"/v1/domain-enrich":{"get":{"operationId":"domain_enrich","summary":"Company/domain enrichment: socials, email provider, DNS/RDAP, tech stack","tags":["Enrichment","Company","Domain"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002"},"protocols":[{"x402":{}}]},"parameters":[{"name":"domain","in":"query","required":true,"description":"Domain (stripe.com), URL, or work email","schema":{"type":"string"}},{"name":"site","in":"query","required":false,"description":"0 to skip the homepage fetch (DNS + RDAP only)","schema":{"type":"string","enum":["0","1"]}}],"responses":{"200":{"description":"Enrichment","content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string"},"company":{"type":"object","properties":{"name":{"type":["string","null"]},"description":{"type":["string","null"]},"logo":{"type":["string","null"]},"socials":{"type":"object"},"emails":{"type":"array","items":{"type":"string"}}}},"email":{"type":"object","properties":{"provider":{"type":["string","null"]},"mx":{"type":"array","items":{"type":"object"}},"spf":{"type":["string","null"]},"dmarcPolicy":{"type":["string","null"]}}},"dns":{"type":"object"},"registration":{"type":"object","properties":{"registrar":{"type":["string","null"]},"created":{"type":["string","null"]},"ageDays":{"type":["integer","null"]},"expires":{"type":["string","null"]}}},"website":{"type":"object"},"techStack":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"category":{"type":"string"}}}},"saasSignals":{"type":"array","items":{"type":"string"}}},"required":["domain"]}}}},"400":{"description":"Invalid domain (not charged)"},"402":{"description":"Payment Required"},"422":{"description":"Domain not found (not charged)"}}}},"/v1/page-extract":{"get":{"operationId":"page_extract","summary":"Web page to clean Markdown + metadata (OG, JSON-LD, headings, links)","tags":["Web","Scraping","Markdown"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.001"},"protocols":[{"x402":{}}]},"parameters":[{"name":"url","in":"query","required":true,"description":"Public http(s) URL of the page","schema":{"type":"string","format":"uri"}},{"name":"maxChars","in":"query","required":false,"description":"Max Markdown characters (500-100000, default 20000)","schema":{"type":"string"}},{"name":"links","in":"query","required":false,"description":"1 to include up to 150 links with anchor text","schema":{"type":"string","enum":["0","1"]}}],"responses":{"200":{"description":"Extraction","content":{"application/json":{"schema":{"type":"object","properties":{"finalUrl":{"type":"string"},"title":{"type":["string","null"]},"description":{"type":["string","null"]},"canonical":{"type":["string","null"]},"lang":{"type":["string","null"]},"author":{"type":["string","null"]},"published":{"type":["string","null"]},"image":{"type":["string","null"]},"favicon":{"type":["string","null"]},"og":{"type":"object"},"twitter":{"type":"object"},"jsonLdTypes":{"type":"array","items":{"type":"string"}},"headings":{"type":"array","items":{"type":"object","properties":{"level":{"type":"integer"},"text":{"type":"string"}}}},"links":{"type":"object"},"markdown":{"type":"string"},"wordCount":{"type":"integer"},"readingTimeMin":{"type":"integer"},"truncated":{"type":"boolean"}},"required":["finalUrl","markdown"]}}}},"400":{"description":"Invalid or private URL (not charged)"},"402":{"description":"Payment Required"},"415":{"description":"Not HTML/text (not charged)"},"422":{"description":"robots.txt disallows, redirect blocked, or upstream error (not charged)"}}}},"/health":{"get":{"operationId":"health","summary":"Health check","security":[],"responses":{"200":{"description":"ok"}}}},"/":{"get":{"operationId":"info","summary":"Service info and prices","security":[],"responses":{"200":{"description":"info"}}}}}}