# PageText

> 31 pay-per-call web, data and AI tools for AI agents. No API key or account: each call is paid with x402 (USDC on Base), from $0.001. Failed calls are not charged. HTTP and MCP.

First call per wallet is free: your wallet's first successful paid call (any tool but /image) is verified but not settled, so you can try PageText at no cost (response header x-pagetext-first-call: free).

PageText answers in JSON. Call any tool without payment to get HTTP 402 with the price in the PAYMENT-REQUIRED header; an x402 client (for example AgentCash, or @x402/fetch in code) pays and retries automatically. Data sources keep their licences and each answer carries its attribution.

## Docs

- [Quick start](https://pagetext.yashil.workers.dev/): what PageText is, code samples and every tool with its price
- [OpenAPI 3.1](https://pagetext.yashil.workers.dev/openapi.json): inputs, output schemas and prices for every tool
- [MCP server](https://pagetext-mcp.yashil.workers.dev/mcp): the same tools over MCP (Streamable HTTP)
- [Agent skill](https://github.com/Yashil/pagetext-skills): SKILL.md for coding agents (Claude Code and others)

## Tools

- [/extract](https://pagetext.yashil.workers.dev/extract?url=https%3A%2F%2Fexample.com) ($0.002): Web page to Markdown
- [/meta](https://pagetext.yashil.workers.dev/meta?url=https%3A%2F%2Fexample.com) ($0.001): Website metadata / link preview
- [/links](https://pagetext.yashil.workers.dev/links?url=https%3A%2F%2Fexample.com) ($0.001): Extract all links from a web page
- [/headers](https://pagetext.yashil.workers.dev/headers?url=https%3A%2F%2Fexample.com) ($0.001): Website security headers audit
- [/up](https://pagetext.yashil.workers.dev/up?url=https%3A%2F%2Fexample.com) ($0.001): Is this website up? Uptime / status check for any URL
- [/dns](https://pagetext.yashil.workers.dev/dns?name=example.com&type=MX) ($0.001): DNS lookup
- [/whois](https://pagetext.yashil.workers.dev/whois?domain=example.com) ($0.002): Domain WHOIS (RDAP) lookup
- [/fx](https://pagetext.yashil.workers.dev/fx?from=USD&to=EUR%2CSEK&amount=100) ($0.001): Currency exchange rates and conversion
- [/balance](https://pagetext.yashil.workers.dev/balance?address=0x81a7031258011929544B25983c803F1D21DA673f&chain=base&tokens=usdc) ($0.001): Wallet balance
- [/token](https://pagetext.yashil.workers.dev/token?address=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913&chain=base) ($0.001): ERC-20 token info
- [/tx](https://pagetext.yashil.workers.dev/tx?hash=0x9220916148a23320e20972f871fd0f398293331f4d5a2694ecbb016b06ca6ba4&chain=base) ($0.001): Transaction status and details on Base, Ethereum, Arbitrum One, OP Mainnet, Polygon PoS, BNB Smart Chain, Avalanche C-Chain: success/failed/pending, block, time, confirmations, from/to, value, fee, and decoded ERC-20/NFT token transfers with symbols and amounts.
- [/gas](https://pagetext.yashil.workers.dev/gas?chains=base%2Cethereum) ($0.001): Live gas prices across chains in one call
- [/ens](https://pagetext.yashil.workers.dev/ens?name=vitalik.eth) ($0.001): ENS and Basenames lookup
- [/summarize](https://pagetext.yashil.workers.dev/summarize?url=https%3A%2F%2Fexample.com&length=short) ($0.005): AI summary of any public web page
- [/ask](https://pagetext.yashil.workers.dev/ask?url=https%3A%2F%2Fexample.com&question=What+is+this+domain+for%3F) ($0.005): Ask a question about a web page
- [/translate](https://pagetext.yashil.workers.dev/translate?text=Hello%2C+how+are+you%3F&to=Swedish) ($0.003): AI translation of text into any language (Swedish, German, Spanish, Chinese, Persian, ...), keeping meaning, tone, names, numbers and formatting.
- [/chat](https://pagetext.yashil.workers.dev/chat?prompt=Write+a+haiku+about+the+sea.) ($0.003): One-shot AI chat completion (Google Gemma 4 26B)
- [POST /v1/chat/completions](https://pagetext.yashil.workers.dev/v1/chat/completions) ($0.002): OpenAI-compatible chat completions API (POST /v1/chat/completions): send messages, get the assistant reply in the standard OpenAI format, stream or not.
- [/image](https://pagetext.yashil.workers.dev/image?prompt=a+red+fox+in+the+snow%2C+watercolor) ($0.01): AI image generation from a text prompt (FLUX.1 schnell, 1024x1024 JPEG returned as a base64 data URL).
- [/price](https://pagetext.yashil.workers.dev/price?coins=btc%2Ceth%2Csol) ($0.001): Crypto and gold/silver prices in USD from Chainlink oracle price feeds, read on-chain: BTC, ETH, SOL, BNB, USDC, USDT, LINK, AVAX, UNI, AAVE, ARB and more, up to 25 per call, with each feed's last update time.
- [/tokenprice](https://pagetext.yashil.workers.dev/tokenprice?token=0x940181a94A35A4569E4529A3CDfB74e38FD98631&chain=base) ($0.001): Price of any ERC-20 token by contract address, read on-chain from DEX pools (Uniswap v3 on Base, Ethereum, Arbitrum, OP, Polygon; Aerodrome on Base): USD price, deepest pool, its liquidity, and other pools.
- [/quote](https://pagetext.yashil.workers.dev/quote?from=usdc&to=0x940181a94A35A4569E4529A3CDfB74e38FD98631&amount=100&chain=base) ($0.002): DEX swap quote
- [/weather](https://pagetext.yashil.workers.dev/weather?city=London) ($0.002): Weather forecast by city name or coordinates
- [/airquality](https://pagetext.yashil.workers.dev/airquality?city=Berlin) ($0.002): Air quality by city name or coordinates
- [/time](https://pagetext.yashil.workers.dev/time?tz=Europe%2FStockholm%2CAmerica%2FNew_York%2CAsia%2FTokyo) ($0.001): Current time (or any given moment) in up to 20 IANA time zones: local date and time, weekday, UTC offset, abbreviation and daylight-saving status.
- [/random](https://pagetext.yashil.workers.dev/random?type=int&min=1&max=100&count=5) ($0.001): Cryptographically secure random values
- [/pdf](https://pagetext.yashil.workers.dev/pdf?url=https%3A%2F%2Fpdfobject.com%2Fpdf%2Fsample.pdf) ($0.003): PDF to text
- [/company](https://pagetext.yashil.workers.dev/company?ticker=AAPL) ($0.003): US company financials from SEC filings, by stock ticker or CIK: company details (exchange, industry, fiscal year end), latest annual and quarterly revenue, net income, operating income and diluted EPS, latest balance sheet (assets, liabilities, equity, cash), shares outstanding, and the newest 10-K, 10-Q and 8-K filings with links.
- [/ip](https://pagetext.yashil.workers.dev/ip?ip=8.8.8.8) ($0.002): IP ownership lookup
- [/wikipedia](https://pagetext.yashil.workers.dev/wikipedia?q=Alan+Turing) ($0.001): Wikipedia search
- [/geocode](https://pagetext.yashil.workers.dev/geocode?q=Stockholm) ($0.002): Geocoding

## Optional

- [x402 discovery list](https://pagetext.yashil.workers.dev/.well-known/x402)
- [x402 protocol](https://x402.org)
