{"openapi":"3.1.0","info":{"title":"Penniless Data Utilities","description":"Deterministic, dependency-free data utilities served over x402 micropayments (USDC on Base). None of these call another AI model.\nKeyword: JSON repair\nKeyword: malformed JSON\nKeyword: broken JSON from LLM\nKeyword: fix JSON output\nKeyword: JSON sanitizer\nKeyword: truncated JSON recovery\nKeyword: YAML to JSON\nKeyword: convert YAML\nKeyword: parse YAML config\nKeyword: cron next run\nKeyword: cron parser\nKeyword: when does cron run next\nKeyword: unified diff\nKeyword: line diff\nKeyword: text diff\nKeyword: HTML to text\nKeyword: extract links\nKeyword: extract emails\nKeyword: scrape text\nKeyword: whois lookup\nKeyword: domain registration\nKeyword: registrar\nKeyword: domain expiry date\nKeyword: RDAP\nKeyword: dns lookup\nKeyword: MX records\nKeyword: TXT records\nKeyword: A record\nKeyword: DNS over HTTPS\nKeyword: github repo stats\nKeyword: github stars\nKeyword: repository popularity\nKeyword: OSS project metadata\nKeyword: email validation\nKeyword: verify email address\nKeyword: check MX deliverability\nKeyword: email syntax\nUse case: repair a JSON code block wrapped in Markdown fences\nUse case: turn a docker-compose or CI YAML file into JSON\nUse case: compute the next UTC fire time of a cron expression\nUse case: produce a unified diff between two versions of a file\nUse case: strip HTML tags and pull out links, emails, and headings\nUse case: look up a domain's registrar, status and expiry before purchase\nUse case: check when a domain registration lapses\nUse case: resolve A, AAAA, MX, TXT or NS records for a hostname\nUse case: find a domain's mail servers and SPF TXT record\nUse case: compare GitHub repository stars, forks and activity for market research\nUse case: check whether an email address is well-formed and its domain accepts mail","version":"3.1.0","x-guidance":"Deterministic data and lookup tools for agents. Use /repair/json when JSON.parse rejects near-JSON from an LLM; /yaml/tojson to turn YAML config into JSON; /cron/nextrun to resolve a cron schedule; /diff to compare two texts; /text/extract to pull links/emails/headings from HTML; /domain/whois and /dns/lookup for domain registration and DNS records; /github/repo-stats for repository popularity; /email/validate to check syntax plus MX deliverability. Call the REST paths directly over x402 v2 or native MPP, or connect an MCP client to /mcp over x402 v2. Paid REST endpoints return HTTP 402 advertising every rail at once: x402 v1 requirements in the JSON body (pay with X-PAYMENT), x402 v2 and MPP in the PAYMENT-REQUIRED header (pay with PAYMENT-SIGNATURE). MCP tools/call uses x402 v2. /diagnose and /health are free.","x-payment-server":{"scheme":"exact","network":"eip155:8453","payTo":"0x3D98800c64C345950E1eAaa076D88C12d1BF5F37","price":"$0.001","asset":"USDC","assetAddress":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","mpp":{"enabled":true}}},"servers":[{"url":"https://penniless-json-repair.sjaman.workers.dev"}],"paths":{"/repair/json":{"post":{"summary":"Penniless JSON Repair","description":"Repairs malformed LLM JSON: strips Markdown fences and prose wrappers, fixes trailing commas, converts Python literals (True/False/None) and single/unquoted keys, removes comments, recovers balanced JSON from truncated output. Body {input} -> {ok, repaired, applied}.","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.001000"},"protocols":[{"x402":{"versions":[1,2]}},{"mpp":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"string","description":"Malformed JSON text"}},"required":["input"],"additionalProperties":false}}}},"responses":{"200":{"description":"Result.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request body."},"402":{"description":"Payment required. Body carries x402 v1 requirements; PAYMENT-REQUIRED header carries x402 v2 / MPP."},"413":{"description":"Input exceeds maxBytes."}}}},"/yaml/tojson":{"post":{"summary":"Penniless YAML to JSON","description":"Converts a YAML subset (block maps, sequences, nested indentation, scalars, comments) into JSON with no runtime dependency. Body {input} -> {ok, value, warnings}.","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.001000"},"protocols":[{"x402":{"versions":[1,2]}},{"mpp":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"string","description":"YAML document text"}},"required":["input"],"additionalProperties":false}}}},"responses":{"200":{"description":"Result.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request body."},"402":{"description":"Payment required. Body carries x402 v1 requirements; PAYMENT-REQUIRED header carries x402 v2 / MPP."},"413":{"description":"Input exceeds maxBytes."}}}},"/cron/nextrun":{"post":{"summary":"Penniless Cron Next Run","description":"Computes the next UTC fire time for a 5-field cron expression (supports steps, ranges, lists, and month/weekday names). Body {expr, after?} -> {ok, next, epochMs}.","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.001000"},"protocols":[{"x402":{"versions":[1,2]}},{"mpp":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expr":{"type":"string","description":"5-field cron expression"},"after":{"type":"string","description":"ISO timestamp to search after (default now)"}},"required":["expr"],"additionalProperties":false}}}},"responses":{"200":{"description":"Result.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request body."},"402":{"description":"Payment required. Body carries x402 v1 requirements; PAYMENT-REQUIRED header carries x402 v2 / MPP."},"413":{"description":"Input exceeds maxBytes."}}}},"/diff":{"post":{"summary":"Penniless Text Diff","description":"Produces a unified diff plus added/removed counts between two texts (LCS line diff, configurable context lines). Body {old, new, context?} -> {ok, identical, added, removed, hunks, unified}.","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.001000"},"protocols":[{"x402":{"versions":[1,2]}},{"mpp":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"old":{"type":"string","description":"Original text"},"new":{"type":"string","description":"Changed text"},"context":{"type":"number","description":"Context lines per hunk (default 3)"}},"required":["old","new"],"additionalProperties":false}}}},"responses":{"200":{"description":"Result.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request body."},"402":{"description":"Payment required. Body carries x402 v1 requirements; PAYMENT-REQUIRED header carries x402 v2 / MPP."},"413":{"description":"Input exceeds maxBytes."}}}},"/text/extract":{"post":{"summary":"Penniless Text Extract","description":"Extracts clean text, title, headings, links, URLs, and emails from HTML or plain text. Body {input, numbers?, codeBlocks?} -> {ok, source, title, headings, links, urls, emails, text}.","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.001000"},"protocols":[{"x402":{"versions":[1,2]}},{"mpp":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"string","description":"HTML or plain text"},"numbers":{"type":"boolean","description":"Keep numeric strings in text output"},"codeBlocks":{"type":"boolean","description":"Keep pre/code blocks"}},"required":["input"],"additionalProperties":false}}}},"responses":{"200":{"description":"Result.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request body."},"402":{"description":"Payment required. Body carries x402 v1 requirements; PAYMENT-REQUIRED header carries x402 v2 / MPP."},"413":{"description":"Input exceeds maxBytes."}}}},"/domain/whois":{"post":{"summary":"Penniless WHOIS Lookup","description":"Structured WHOIS via RDAP for any domain: registrar, IANA id, statuses, expiry/registration dates, nameservers, DNSSEC. Body {domain} -> {ok, found, domain, registrar, status[], events{}, nameservers[], dnssec}.","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.001000"},"protocols":[{"x402":{"versions":[1,2]}},{"mpp":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","description":"Domain name, no scheme"}},"required":["domain"],"additionalProperties":false}}}},"responses":{"200":{"description":"Result.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request body."},"402":{"description":"Payment required. Body carries x402 v1 requirements; PAYMENT-REQUIRED header carries x402 v2 / MPP."},"413":{"description":"Input exceeds maxBytes."}}}},"/dns/lookup":{"post":{"summary":"Penniless DNS Lookup","description":"JSON DNS-over-HTTPS lookup for A, AAAA, CNAME, MX, TXT, NS, SOA, PTR, SRV, CAA. Body {domain, type?} -> {ok, domain, type, status, answers[]}.","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.001000"},"protocols":[{"x402":{"versions":[1,2]}},{"mpp":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","description":"Hostname to resolve"},"type":{"type":"string","description":"Record type (default A)","enum":["A","AAAA","CNAME","MX","TXT","NS","SOA","PTR","SRV","CAA"]}},"required":["domain"],"additionalProperties":false}}}},"responses":{"200":{"description":"Result.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request body."},"402":{"description":"Payment required. Body carries x402 v1 requirements; PAYMENT-REQUIRED header carries x402 v2 / MPP."},"413":{"description":"Input exceeds maxBytes."}}}},"/github/repo-stats":{"post":{"summary":"Penniless GitHub Repo Stats","description":"Popularity and metadata for any public GitHub repo: stars, forks, open issues, watchers, language, license, topics, last push. Body {repo} -> {ok, found, stars, forks, openIssues, language, license, pushedAt}.","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.001000"},"protocols":[{"x402":{"versions":[1,2]}},{"mpp":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"repo":{"type":"string","description":"owner/name"}},"required":["repo"],"additionalProperties":false}}}},"responses":{"200":{"description":"Result.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request body."},"402":{"description":"Payment required. Body carries x402 v1 requirements; PAYMENT-REQUIRED header carries x402 v2 / MPP."},"413":{"description":"Input exceeds maxBytes."}}}},"/email/validate":{"post":{"summary":"Penniless Email Validate","description":"Email deliverability check: RFC-style syntax plus live MX probe of the domain. Body {email} -> {ok, valid, formatValid, domainHasMx, mx[]}.","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.001000"},"protocols":[{"x402":{"versions":[1,2]}},{"mpp":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Email address"}},"required":["email"],"additionalProperties":false}}}},"responses":{"200":{"description":"Result.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request body."},"402":{"description":"Payment required. Body carries x402 v1 requirements; PAYMENT-REQUIRED header carries x402 v2 / MPP."},"413":{"description":"Input exceeds maxBytes."}}}},"/diagnose":{"post":{"summary":"Free JSON problem classifier","description":"Free pre-check before paying for /repair/json.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"ok"}}}},"/health":{"get":{"summary":"Liveness + config","responses":{"200":{"description":"ok"}}}},"/mcp":{"post":{"summary":"MCP streamable HTTP transport","description":"Model Context Protocol endpoint exposing the same tools over x402 v2. Per-call price $0.001 USDC on Base.","responses":{"200":{"description":"JSON-RPC response."},"402":{"description":"Payment required (x402 v2)."}}}}}}