Fetch URL As Served
url_fetchFetches one public URL exactly as served — any content type, binary included — and returns status, final_url, redirects, response_headers, content_type, content_length, last_modified, etag and a bounded prefix of the body (max_bytes, default 65536, at most 1048576; truncated says the body continues). This is the tool for validating data feeds and files (XML, JSON, CSV, XMLTV .xml.gz) that web_scrape cannot read: a body that is itself a gzip file is detected (gzip true); valid files return a decompressed prefix with decompressed_bytes counting the stream. If decoding fails, gzip_error says the body contains compressed bytes instead. Text bodies return as UTF-8 (body_encoding utf8), binary as base64. head true sends HEAD and returns headers only. An HTTP error status is an answer, returned with its status and headers. Credits: 1 per fetch whose server answered (the page-read price); a fetch that never reached a server is not charged. This tool runs synchronously. When retention succeeds, retained.run_id reads the completed answer again for free with scraper_run_get; retained.available false says why it could not be kept. Saved synchronous results can be evicted early when storage is needed. The same idempotency_key never charges twice during its replay window.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"url": "<url>"
},
"name": "url_fetch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Public http or https URL to fetch | |
| head | No | Send HEAD and return headers only, no body | |
| max_bytes | No | Body bytes to return at most (1-1048576) | |
| verbosity | No | concise: short summary of the answer; full: the whole answer. Only shapes the output. Send idempotency_key to read the other form later without a new charge. | |
| idempotency_key | No | Optional retry key bound to this customer and these arguments. Matching retries replay the first result and do not reserve a second credit; the replay says so in billing (replayed true, credits_charged_this_call 0, original_credits_used). |