Archives & binary tools

Archives and binary APIs inspect remote archives, retrieve a named entry, detect file types and compute file digests. An agent or script can use them to examine an archive listing, obtain a particular file, identify a payload from its bytes or verify an artifact against a published checksum. Each task requires fetching remote data through a hardened client; archive handling also requires readers and decompression-bomb controls.

Agents read this page asGET /tools/archives.mdthis page as Markdown, every API of the family with its limits

Shelf
Media
APIs
4
Default price
$0.003 per call
Ceiling
94 s
Needs
a heavy dependency

4 APIs

Every price is per successful call. Max input is the largest source the API reads.

APIWhat it doesPriceMax inputMax durationTimeout
Archive Extract File APIExtracts one named entry from a remote zip, tar or tar.gz and returns its bytes (base64) with a sha256.$0.00325 MBnone90 s
Archive Inspect APILists the entries of a remote zip, tar or tar.gz (paths, sizes, compression and CRC) without extracting any of them.$0.003100 MBnone60 s
File Type Detect APIDetects a remote file's true type from its magic bytes, returning the canonical extension and media type.$0.00332 MBnone30 s
Remote File Hash APIComputes the sha256, sha1 or md5 digest of a remote file, buffered in memory under a size cap, for checksum verification.$0.003100 MBnone60 s

How they fit together

archive-inspect takes a remote archive and returns entry paths, sizes, compression information and CRC values without extracting entries. archive-extract-file takes an archive and a named entry, then returns that entry as base64 bytes with a SHA-256 digest. Listing an archive reads declared sizes without inflating entries. Retrieving a named entry does not require unpacking the whole archive, and the entry is subject to size caps.

file-type-detect examines magic bytes and returns a canonical extension and media type. It does not base identification on the URL extension or the server content-type. remote-file-hash computes a digest of a remote file for checksum verification, fetching the whole remote file and buffering it in memory under a size cap. A listing supplies entry information without extracted bytes; the extraction member supplies bytes for the requested entry, while the hash member computes a digest of the remote file.

Questions

How do archive inspection and extraction differ?

archive-inspect lists paths, sizes, compression information and CRC values of an archive without extracting entries. archive-extract-file returns a named entry of an archive as base64 bytes with a SHA-256 digest.

Does file-type-detect rely on the file extension?

No. It identifies the remote file from its magic bytes using a signature database and returns the canonical extension and media type.

How does remote-file-hash read the remote file?

It computes a digest for checksum verification, with the algorithm chosen in the request. The whole remote file is fetched and buffered in memory under a size cap.