AI structured data extraction from a web page API
AI web scraping to structured JSON: the fields of a JSON Schema (object root, up to 4 KB) or a field-name list, extracted from one public web page or document (HTML, PDF, DOCX) fetched via SSRF-checked redirects. Returns data in the requested shape, null where the page states no value, a page quote per value when one matches the page text in code, final URL, title and truncation flag. AI-generated by Anthropic Claude under a fixed Kit Rx prompt; values can be wrong.
$0.005 per call USDC over x402 v2 on Base, Polygon, Arbitrum, Avalanche or Sei. No signup, no API key. Requests that fail or match nothing are not charged.
Endpoint
GET https://api.kit-rx.com/v1/web/extract
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
url | string | yes | http or https URL of a public web page or document (PDF, DOCX, spreadsheet). Default ports only; credentials, IP addresses, localhost and private or single-label names are rejected. e.g. https://en.wikipedia.org/wiki/Eiffel_Tower |
schema | string | no | JSON Schema of the object to extract, URL-encoded JSON, at most 4 KB, object root. Supported: type, properties, items, enum, const, anyOf/oneOf, allOf of objects, local $ref with $defs, format, description. additionalProperties must be false or omitted; recursive schemas are rejected; length and range constraints are removed. At most 50 properties, 5 levels and 16 union-typed properties. Give schema or fields. e.g. {"type":"object","properties":{"product":{"type":"string"},"price":{"type":"number","description":"Price without currency symbol"},"currency":{"type":"string","enum":["USD","EUR","GBP"]},"in_stock":{"type":"boolean"}}} |
fields | string | no | Comma-separated field names to extract as text, at most 25, each 1-40 of a-z, 0-9 and _ (e.g. height,location,opened). Give schema or fields. e.g. height,location,named_after,built,ticket_price |
main_only | string: true, false | no | true (default) reads the page's main content only; false reads the whole page, including header, navigation and footer (where contact details often sit). e.g. true |
Example request
https://api.kit-rx.com/v1/web/extract?url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FEiffel_Tower&fields=height%2Clocation%2Cnamed_after%2Cbuilt%2Cticket_price
Without payment the server answers 402 Payment Required with the price (5000 atomic USDC) in the PAYMENT-REQUIRED header. Any x402 v2 client pays and retries automatically. A request with no parameters runs this example.
curl -i "https://api.kit-rx.com/v1/web/extract?url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FEiffel_Tower&fields=height%2Clocation%2Cnamed_after%2Cbuilt%2Cticket_price"
Pay from an agent
AgentCash: fetch the URL. OpenDexter MCP: x402_fetch. Kit Rx MCP server: https://api.kit-rx.com/mcp. Code:
import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";
const client = new x402Client();
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.BUYER_KEY) });
const pay = wrapFetchWithPayment(fetch, client);
const res = await pay("https://api.kit-rx.com/v1/web/extract?url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FEiffel_Tower&fields=height%2Clocation%2Cnamed_after%2Cbuilt%2Cticket_price");
console.log(await res.json());
Example response
{
"query": {
"url": "https://en.wikipedia.org/wiki/Eiffel_Tower",
"mode": "fields",
"main_only": true,
"fields": [
"height",
"location",
"named_after",
"built",
"ticket_price"
]
},
"result": {
"data": {
"height": "330 metres (1,083 ft)",
"location": "7th arrondissement of Paris, France",
"named_after": "Gustave Eiffel",
"built": "from 1887 to 1889",
"ticket_price": null
},
"evidence": {
"height": "The tower is 330 metres (1,083 ft) tall,",
"location": "is a lattice tower on the Champ de Mars in Paris, France.",
"named_after": "It is named after the engineer Gustave Eiffel, whose company designed and built the tower from 1887 to 1889.",
"built": "It is named after the engineer Gustave Eiffel, whose company designed and built the tower from 1887 to 1889.",
"ticket_price": null
},
"missing_fields": [
"ticket_price"
],
"final_url": "https://en.wikipedia.org/wiki/Eiffel_Tower",
"title": "Eiffel Tower - Wikipedia",
"page_chars": 29771,
"truncated": true,
"quotes_rejected": 0,
"model_family": "Claude",
"ai_generated": true
},
"sources": [
{
"name": "Cloudflare DNS over HTTPS (JSON API)",
"url": "https://developers.cloudflare.com/1.1.1.1/encryption/dns-over-https/make-api-requests/dns-json/"
},
{
"name": "Cloudflare Workers AI toMarkdown",
"url": "https://developers.cloudflare.com/workers-ai/features/markdown-conversion/"
},
{
"name": "Anthropic Claude (AI-generated text)",
"url": "https://www.anthropic.com/claude"
},
{
"name": "Live HTTP(S) fetch of the URL",
"url": "https://en.wikipedia.org/wiki/Eiffel_Tower"
}
],
"notes": [
"Values extracted by Anthropic Claude under a fixed Kit Rx prompt; AI extraction can misread or miss details, so check important values against the evidence quotes or the page.",
"Every declared field is returned; values the page does not state are null and listed in missing_fields.",
"Each evidence quote was checked in code against the fetched page text, exactly or ignoring Markdown link, emphasis and whitespace differences (the page's text is then returned in that plain form); quotes that did not match were set to null and counted in quotes_rejected.",
"Only the first 30000 characters of the page's main content (as Markdown) were read.",
"Page fetched live by the Kit Rx fetcher (User-Agent KitRx/1.0) and converted with Cloudflare Workers AI toMarkdown; content belongs to its publisher."
],
"attribution": [
"DNS resolved via Cloudflare 1.1.1.1 DNS-over-HTTPS."
],
"generated_at": "2026-11-15T05:52:48.994Z"
}
Kit Rx: Pay-per-call data and safety tools for AI agents, paid in USDC over x402. No signup, no API key. Machine-readable: OpenAPI, llms.txt, /.well-known/x402, agent skills.