Web Fetch

v0.2.1
io.github.pipeworx-io/web-fetch Checked 16 hours ago Published 25 days ago

web-fetch — fetch ONE public URL live from its origin, verbatim.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

fetch_url

Fetch the exact contents of ONE public web URL live from its origin server and return them verbatim with a SHA-256 hash of the bytes received. Use it to read a specific page, raw data file (CSV, TSV, .dat, JSON, XML), API endpoint or PDF whose address you already know. format "auto" (default) returns readable text for HTML and PDF and the raw body for everything else; "raw" returns the body itself (decoded text, or base64 for binary such as zip/xlsx); "text" forces text extraction. Large bodies page with max_bytes and offset. Also returns url_final, the redirect chain, status, response headers…

ParameterTypeDescription
url *stringThe absolute http(s) URL to fetch, e.g. "https://data.giss.nasa.gov/gistemp/tabledata_v4/GLB.Ts+dSST.csv". http:// is tried over https first.
formatstringauto (default): text for HTML and PDF, raw for everything else. raw: the body as received. text: readable text extracted from HTML/PDF.
max_bytesnumberSize of the returned window. Default 100000. Maximum 1000000 for text, 512000 for base64 (binary).
offsetnumberWhere the window starts: a byte offset into the body (raw), or a character offset into the extracted text (text). Use next_offset from the previous call to page. Default 0.

extract_archive_member

List or extract a named member from a ZIP archive at a public URL, without downloading the whole archive when the origin honours HTTP Range (most do, including Internet Archive Wayback Machine captures). Call with just "url" to LIST members: name, compressed/uncompressed size, method (stored/deflate), CRC-32. Add "member" (the exact or case-insensitive name from that list) to EXTRACT it: text members come back as decoded text, binary members as base64, windowed by max_bytes/offset exactly like fetch_url. Reads only the end-of-central-directory record and the central directory (at the tail of t…

ParameterTypeDescription
url *stringThe absolute http(s) URL of a ZIP archive, e.g. an Internet Archive Wayback Machine capture of a .zip, an object-store URL, or any direct ZIP download link.
formatstringOnly used when extracting a member. auto (default) and raw both return decoded text for a textual member and base64 for binary; text forces a text decode (falls back to base64 with a warning if the me…
max_bytesnumberOnly used when extracting a member: size of the returned window. Default 100000. Maximum 1000000 for text, 512000 for base64 (binary).
memberstringThe exact (or case-insensitive) name of the archive member to extract, as returned by a prior call without "member". Omit to list members instead.
offsetnumberOnly used when extracting a member: byte offset into the DECOMPRESSED member where the window starts. Use next_offset from the previous call to page. Default 0.