# Agent Web & Data API (MPP): scrape, extract, filings, weather, FX > Pay-per-call web fetch/extract and public reference data for AI agents: URL to clean Markdown, article extraction, structured JSON extraction with your schema, page links and sitemaps, Wikipedia search, word of the day and on-this-day facts, SEC EDGAR filings/financials/full-text search, global weather forecast, US weather alerts, ECB FX reference rates and the US Treasury yield curve. No account, no API key: pay per call with MPP on Tempo (USDC.e or pathUSD). Invalid input or upstream failure returns 402 and is not charged. ## Docs (free) - Human docs with copy-paste examples: https://mpp-agent-data.fmf-x402.workers.dev/docs - OpenAPI 3.1: https://mpp-agent-data.fmf-x402.workers.dev/openapi.json - This file: https://mpp-agent-data.fmf-x402.workers.dev/llms.txt - MCP server (Streamable HTTP): https://mpp-agent-data.fmf-x402.workers.dev/mcp - Health: https://mpp-agent-data.fmf-x402.workers.dev/health - Attribution counters (no PII): https://mpp-agent-data.fmf-x402.workers.dev/stats/refs ## How to pay No account and no API key. Unpaid calls receive HTTP 402 with an MPP challenge on Tempo (USDC.e or pathUSD). Official clients pay the challenge and retry automatically. POST JSON to any /mpp/* route (GET with query params also works). Pay the MPP 402 challenge on Tempo. Bad input or a failed fetch returns 402 with an error and you are not charged. Each response names its data source and licence. ## Quick start mppx CLI (creates/uses a Tempo account in your keychain): ```bash npx mppx https://mpp-agent-data.fmf-x402.workers.dev/mpp/weather/alerts-us -X POST -H 'content-type: application/json' -d '{"area":"CA"}' ``` TypeScript (mppx). After Mppx.create(), global fetch handles 402: ```ts import { Mppx, tempo } from 'mppx/client' import { privateKeyToAccount } from 'viem/accounts' Mppx.create({ methods: [tempo({ account: privateKeyToAccount(process.env.TEMPO_PRIVATE_KEY) })], }) // Global fetch now pays the 402 automatically. const res = await fetch('https://mpp-agent-data.fmf-x402.workers.dev/mpp/weather/alerts-us', { method: 'POST', headers: { 'content-type': 'application/json', }, body: JSON.stringify({"area":"CA"}), }) console.log(await res.json()) ``` Python (pympp): ```python # pip install pympp # Docs: https://mpp.dev/sdk/python import asyncio from mpp.client import Mpp from mpp.methods.tempo import TempoAccount from mpp.methods.tempo import client as tempo account = TempoAccount.from_key("0x...") async def main(): async with Mpp(methods=[tempo.charge(account=account)]) as mpp: response = await mpp.fetch("https://mpp-agent-data.fmf-x402.workers.dev/mpp/weather/alerts-us", method="POST", json={"area":"CA"}) print(await response.json()) asyncio.run(main()) ``` An unpaid curl shows the 402 (you are not charged): ```bash curl -i -X POST https://mpp-agent-data.fmf-x402.workers.dev/mpp/weather/alerts-us -H 'content-type: application/json' -d '{"area":"CA"}' ``` ## MCP Add this to Cursor / Claude Desktop / VS Code MCP settings (Streamable HTTP): ```json { "mcpServers": { "fmf-mpp-agent-data": { "url": "https://mpp-agent-data.fmf-x402.workers.dev/mcp" } } } ``` `tools/list` is free. `tools/call` requires an MPP Payment credential in the Authorization header (or just call the HTTP route with mppx). The wrapper does not settle payment on its own and stores nothing. ## Routes - POST https://mpp-agent-data.fmf-x402.workers.dev/mpp/web/scrape ($0.0015) URL to clean Markdown: Fetch a URL and return clean LLM-ready Markdown plus title, description, canonical, language, published date and (optionally) the page links. Optional selector (CSS) to keep part of the page. Works for HTML pages and linked PDF/DOCX/XLSX files. Static fetch (no JavaScript rendering). Max 5 MB page. Example: `npx mppx https://mpp-agent-data.fmf-x402.workers.dev/mpp/web/scrape -X POST -H 'content-type: application/json' -d '{"url":"https://example.com"}'` - POST https://mpp-agent-data.fmf-x402.workers.dev/mpp/web/links ($0.001) Page links (map): Fetch a URL and list every link on the page (absolute URL, anchor text, internal/external), de-duplicated, up to 2,000. Optional same_site=true to keep internal links only. Example: `npx mppx https://mpp-agent-data.fmf-x402.workers.dev/mpp/web/links -X POST -H 'content-type: application/json' -d '{"url":"https://example.com"}'` - POST https://mpp-agent-data.fmf-x402.workers.dev/mpp/web/sitemap ($0.002) Site URL map from sitemaps: Discover a site's pages from robots.txt and sitemap.xml (follows sitemap indexes, gzip not supported). Input: url or domain. Returns up to 5,000 URLs with lastmod. Example: `npx mppx https://mpp-agent-data.fmf-x402.workers.dev/mpp/web/sitemap -X POST -H 'content-type: application/json' -d '{"url":"https://www.cloudflare.com"}'` - POST https://mpp-agent-data.fmf-x402.workers.dev/mpp/web/extract ($0.004) Structured extraction from a URL: Fetch a URL (or take html/markdown) and extract structured JSON: pass a JSON Schema (schema) and/or an instruction (prompt). Output is validated against your schema; if it does not validate you are not charged. Static fetch, page truncated to ~12k tokens. Example: `npx mppx https://mpp-agent-data.fmf-x402.workers.dev/mpp/web/extract -X POST -H 'content-type: application/json' -d '{"url":"https://example.com","schema":{"type":"object","properties":{"title":{"type":"string"},"link_text":{"type":"string"}},"required":["title"]}}'` - POST https://mpp-agent-data.fmf-x402.workers.dev/mpp/wiki/search ($0.002) Wikipedia search with extracts: Search Wikipedia (any language edition) and return the top results with clean plain-text extracts (intro or full article), URL, and last-edited time. Params: q, lang (default en), limit (1-10, default 5), full (true for whole article text, top 3). Content CC BY-SA 4.0 (attribution in response). Example: `npx mppx https://mpp-agent-data.fmf-x402.workers.dev/mpp/wiki/search -X POST -H 'content-type: application/json' -d '{"q":"Machine Payments Protocol","limit":3}'` - POST https://mpp-agent-data.fmf-x402.workers.dev/mpp/weather/forecast ($0.003) Weather forecast (global): Global weather forecast for a lat/lon from MET Norway: current conditions, next 48 hours hourly and 9-day daily summary (temperature, precipitation, wind, humidity, cloud, symbol). Params: lat, lon, hours (1-90, default 48). Data CC BY 4.0, MET Norway. Example: `npx mppx https://mpp-agent-data.fmf-x402.workers.dev/mpp/weather/forecast -X POST -H 'content-type: application/json' -d '{"lat":43.65,"lon":-79.38}'` - POST https://mpp-agent-data.fmf-x402.workers.dev/mpp/weather/alerts-us ($0.002) US weather alerts (NWS): Active U.S. National Weather Service alerts for a lat/lon point or a state/territory code (area=CA). Returns event, severity, urgency, certainty, headline, description, instructions, onset/expiry and affected areas. Public domain NWS data. Example: `npx mppx https://mpp-agent-data.fmf-x402.workers.dev/mpp/weather/alerts-us -X POST -H 'content-type: application/json' -d '{"area":"CA"}'` - POST https://mpp-agent-data.fmf-x402.workers.dev/mpp/sec/filings ($0.004) SEC filings for a company: Recent SEC EDGAR filings for a U.S.-listed company by ticker or CIK: form type, filing and report dates, accession number, primary document URL and description. Optional form filter (e.g. 10-K, 10-Q, 8-K, 4) and limit (1-100, default 20). Also returns company profile (name, SIC, exchange, fiscal year end). Example: `npx mppx https://mpp-agent-data.fmf-x402.workers.dev/mpp/sec/filings -X POST -H 'content-type: application/json' -d '{"ticker":"AAPL","form":"10-K","limit":5}'` - POST https://mpp-agent-data.fmf-x402.workers.dev/mpp/sec/financials ($0.004) Company financials (SEC XBRL): Key reported financials from SEC XBRL company facts by ticker or CIK: revenue, net income, operating income, EPS, assets, liabilities, equity, cash, operating cash flow, debt, shares outstanding. Returns the latest annual (10-K) and quarterly (10-Q) values with period, form and filing date, plus up to 5 years of annual history. Example: `npx mppx https://mpp-agent-data.fmf-x402.workers.dev/mpp/sec/financials -X POST -H 'content-type: application/json' -d '{"ticker":"MSFT"}'` - POST https://mpp-agent-data.fmf-x402.workers.dev/mpp/sec/search ($0.004) SEC full-text filing search: Full-text search across SEC EDGAR filings since 2001 (phrase search with quotes). Params: q, forms (e.g. "10-K,8-K"), start/end (YYYY-MM-DD), ticker/cik filter, page. Returns company, form, filing date, period, and document URL for each hit (100 per page). Example: `npx mppx https://mpp-agent-data.fmf-x402.workers.dev/mpp/sec/search -X POST -H 'content-type: application/json' -d '{"q":"\"stablecoin\"","forms":"10-K"}'` - POST https://mpp-agent-data.fmf-x402.workers.dev/mpp/fx/rates ($0.001) FX reference rates (ECB): Official ECB euro foreign-exchange reference rates for ~30 currencies (latest business day, or date=YYYY-MM-DD back to 1999), with cross rates from any base and optional amount conversion (base, symbols, amount). Notice: this ECB information may be obtained free of charge at https://www.ecb.europa.eu. Example: `npx mppx https://mpp-agent-data.fmf-x402.workers.dev/mpp/fx/rates -X POST -H 'content-type: application/json' -d '{"base":"USD","symbols":"CAD,EUR,GBP","amount":100}'` - POST https://mpp-agent-data.fmf-x402.workers.dev/mpp/rates/treasury ($0.002) U.S. Treasury yield curve: Daily U.S. Treasury par yield curve rates (1-month to 30-year) for the latest business day or a given date=YYYY-MM-DD (2000 onward), plus the 10y-2y and 10y-3m spreads. Public domain U.S. Treasury data. Example: `npx mppx https://mpp-agent-data.fmf-x402.workers.dev/mpp/rates/treasury -X POST -H 'content-type: application/json' -d '{}'` - POST https://mpp-agent-data.fmf-x402.workers.dev/mpp/daily/word ($0.002) Word of the day: Wiktionary's English Word of the Day (today or date=YYYY-MM-DD) with part of speech, definitions, examples, pronunciation audio link and URL. Text CC BY-SA 4.0 (attribution in response). Example: `npx mppx https://mpp-agent-data.fmf-x402.workers.dev/mpp/daily/word -X POST -H 'content-type: application/json' -d '{}'` - POST https://mpp-agent-data.fmf-x402.workers.dev/mpp/daily/onthisday ($0.002) On this day + random fact: Historical events, births and deaths on a date (today or date=YYYY-MM-DD / MM-DD) from Wikipedia, each with year, text and article link; random=true returns one random dated fact. type: all|events|births|deaths|selected. Text CC BY-SA 4.0. Example: `npx mppx https://mpp-agent-data.fmf-x402.workers.dev/mpp/daily/onthisday -X POST -H 'content-type: application/json' -d '{"type":"selected","limit":5}'` - POST https://mpp-agent-data.fmf-x402.workers.dev/mpp/web/article ($0.003) Article extraction: Extract the main article from a news/blog URL: headline, author(s), publish and modified dates, site, language, lead image, description, clean Markdown body (boilerplate, nav and ads removed), word count and reading time, from page markup and schema.org JSON-LD. Static fetch. Example: `npx mppx https://mpp-agent-data.fmf-x402.workers.dev/mpp/web/article -X POST -H 'content-type: application/json' -d '{"url":"https://blog.cloudflare.com/how-we-built-pingora-the-proxy-that-connects-cloudflare-to-the-internet/"}'` ## Sources and licences Sources and licences: MET Norway (CC BY 4.0), NWS (public domain), SEC EDGAR (public information), ECB (free reuse with source; this information is available free at ecb.europa.eu), U.S. Treasury (public domain), Wikipedia/Wiktionary (CC BY-SA 4.0). Web pages are fetched as given by you; you are responsible for your use of third-party content. ## Sister services - [Doc Tools](https://mpp-docs.fmf-x402.workers.dev/docs?ref=cross-agent-data): PDF, Office, audio, OCR and text tools - [Utility Tools](https://mpp-tools.fmf-x402.workers.dev/docs?ref=cross-agent-data): Tempo chain, attestation, QR, DNS, email, IP, geo, tech detect, math - [AI Tools](https://mpp-ai.fmf-x402.workers.dev/docs?ref=cross-agent-data): Chat, translation, embeddings, rerank - [Browser](https://mpp-browser.fmf-x402.workers.dev/docs?ref=cross-agent-data): JS-rendered screenshots, page to Markdown, page to PDF - [Research](https://mpp-research.fmf-x402.workers.dev/docs?ref=cross-agent-data): Papers, FDA drugs, recalls, clinical trials, LEI - [Control-plane](https://controlplane-x402.fmf-x402.workers.dev/docs?ref=cross-agent-data): Contract control-plane snapshots and Tempo token data (MPP + x402) ## Attribution Append `?ref=your-channel` or send header `X-FMF-Ref: your-channel` on any request (including unpaid 402s and /docs). We count hits and paid successes per channel so we can see what actually drives calls. The parameter is ignored by the tool.