Convert any public web page to clean Markdown, heading-aware RAG chunks and metadata.
Extracts the main content with Mozilla Readability, converts it to Markdown with absolute links, and returns heading-aware chunks with token estimates plus title, language, canonical, dates and a sha256 content hash for change detection. robots.txt is respected.
$0.001 per call in USDC on Base via x402, or pay by card with prepaid credits (1 credit) · 1 free call per caller · no signup ·
GET https://freetier-agent-api.pages.dev/api/page-rag
Use page-rag to feed a web page into an LLM or a vector store. Use page-meta or page-check for SEO/meta tags and HTTP status only. page-markdown is the older, simpler converter; page-rag is recommended.
| Name | Type | Description |
|---|---|---|
url required | string | public http(s) page URL |
chunk_tokens | integer | chunk size in tokens (0 = no chunks, default 800, max 4000) |
overlap | integer | chunk overlap in tokens (default 80) |
main_only | string (true | false) | main content only via Readability (default true) |
max_chars | integer | max Markdown characters (default 100000, max 400000) |
{
"url": "https://en.wikipedia.org/wiki/HTTP_402",
"finalUrl": "https://en.wikipedia.org/wiki/HTTP_402",
"status": 200,
"contentType": "text/html",
"ok": true,
"title": "List of HTTP status codes - Wikipedia",
"description": null,
"siteName": null,
"language": "en",
"canonical": "https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#402",
"publishedAt": null,
"modifiedAt": null,
"jsonLdTypes": [],
"markdown": "# List of HTTP status codes - Wikipedia\n\nThis article lists standard and notable non-standard [HTTP response status codes](https://en.wikipedia.org/wiki/HTTP...",
"wordCount": 6573,
"tokenEstimate": 18376,
"truncated": true,
"truncatedReason": "page HTML larger than 350000 bytes after removing scripts/styles; only the first part was converted",
"likelyNeedsJavaScript": false,
"contentHash": "sha256:7ad19acc51489e84fb2f495ed08b7ac0dc6a9e6f8635caefcc8cef78238a4c52",
"chunks": [
{
"index": 0,
"headingPath": "List of HTTP status codes - Wikipedia",
"text": "# List of HTTP status codes - Wikipedia\n\nThis article lists standard and notable non-standard [HTTP response status codes](https://en.wikipedia.org/wiki/HTTP...",
"tokenEstimate": 666
},
{
"index": 1,
"headingPath": "List of HTTP status codes - Wikipedia > Standard codes > 1xx informational response",
"text": "The server has received the request headers and the client should proceed to send the request body (in the case of a request for which a body needs to be sen...",
"tokenEstimate": 460
}
],
"extractor": "readability",
"fetchMs": 484,
"fetchedAt": "2026-10-24T18:11:05.434Z",
"sources": [
{
"name": "Live fetch of the page you name (plain HTTP, robots.txt respected); Mozilla Readability + Turndown (Apache-2.0 / MIT), linkedom (ISC)",
"url": "https://github.com/mozilla/readability"
}
]
}
curl -s "https://freetier-agent-api.pages.dev/api/page-rag?url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FHTTP_402"
Buy a credit pack on Gumroad (1,000 credits $3), then send your license key. The X-Credits-Remaining response header shows your balance; failed calls are not charged.
curl -s "https://freetier-agent-api.pages.dev/api/page-rag?url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FHTTP_402" \ -H 'X-License-Key: YOUR-LICENSE-KEY'
// npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPaymentFromConfig } from "@x402/fetch";
import { ExactEvmScheme } from "@x402/evm";
import { privateKeyToAccount } from "viem/accounts";
const account = privateKeyToAccount(process.env.EVM_PRIVATE_KEY); // wallet with USDC on Base
const fetchWithPayment = wrapFetchWithPaymentFromConfig(fetch, {
schemes: [{ network: "eip155:8453", client: new ExactEvmScheme(account) }],
});
const res = await fetchWithPayment("https://freetier-agent-api.pages.dev/api/page-rag?url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FHTTP_402");
console.log(await res.json());
# pip install "x402[httpx,evm]" eth-account
import asyncio, os
from eth_account import Account
from x402 import x402Client
from x402.http.clients import x402HttpxClient
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client
async def main():
client = x402Client()
register_exact_evm_client(client, EthAccountSigner(Account.from_key(os.environ["EVM_PRIVATE_KEY"])))
async with x402HttpxClient(client) as http:
r = await http.get("https://freetier-agent-api.pages.dev/api/page-rag?url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FHTTP_402")
print(r.json())
asyncio.run(main())
A bare request without parameters returns the HTTP 402 payment challenge (x402 v2 in the PAYMENT-REQUIRED header, v1 in the body). Invalid input gets a 400 before any payment.
Failed calls are never charged. Failed calls are never charged: the payment is verified first, the request runs, and the payment is settled only if it succeeded. Errors (4xx/5xx) are not settled, and invalid input is rejected before any payment or free call.
Independent monitoring of this endpoint: 402index service page (health, 30-day uptime, p50 latency).
page_rag at https://freetier-agent-api.pages.dev/mcp (Streamable HTTP; in-band x402 payment via _meta["x402/payment"], or card credits via the X-License-Key header)Agent Extraction API by FreeTier Kits · Terms · llms.txt · /.well-known/x402 · MCP: https://freetier-agent-api.pages.dev/mcp · Contact: tec@mail.grokbot.com
This site and its texts were written with AI assistance and reviewed for accuracy; example outputs are real responses from the API.