Core: Fetch web pages
metrecept_fetch_web_pagesFetch public web pages through a compliance filter and return redacted markdown or JSON content for direct page retrieval, metered and receipted.
Instructions
Fetch public web pages through the Metrecept compliance filter and return redacted markdown or JSON context, metered and receipted. Use it when you need the page content itself. Not for a model answer grounded in pages: pass fetch_urls to metrecept_create_chat_completion. Not for an authenticated JSON API you hold a key for: use metrecept_call_api. Call metrecept_get_fetch_policy first to pick a valid purpose and stay within its character caps; a few URLs per call is the norm. Pass the same session_id you use on chat and API calls to group them into one metrecept_get_session_receipt receipt. Behaviour: the tenant must have accepted Terms/DPA at Checkout, otherwise the call is refused. robots.txt is respected (fail-closed), PII is redacted, and login walls, 401/403 and 402 pay-per-crawl refusals are honoured, never bypassed. Never cached. Failures return JSON {"error", "status"} with secrets redacted. Requires a Metrecept API key (METRECEPT_API_KEY env on stdio, or Authorization: Bearer on remote HTTP); results are scoped to that key's tenant only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| urls | Yes | Public http(s) page URLs to fetch; keep it to a handful (per-source and total character caps from metrecept_get_fetch_policy apply). | |
| query | No | Optional plain-text question that focuses the summary; empty string for a general summary. | |
| format | No | "markdown" (default) or "json" (title/text/meta/json_ld); anything else falls back to markdown. | markdown |
| purpose | No | Compliance purpose: public_web_retrieval (default), business_catalog, public_company_info or job_listings. | public_web_retrieval |
| session_id | No | Optional session tag grouping this call with others; read the signed aggregate later with metrecept_get_session_receipt. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |