xtract.bot
POST /api/zip-extract

Inspect or extract a ZIP archive. List mode returns just the entry manifest (name + size); files mode also returns each entry as base64-encoded bytes.

Reads a ZIP archive and returns its entries as JSON. Two modes: - `files` (default): each entry returns `{name, size, content}` where `content` is base64-encoded bytes. - `manifest`: each entry returns `{name, size}` only — useful when you want to inspect the archive structure without paying the bandwidth cost of the file contents. Directory entries are filtered out. The input cap applies to the *decompressed* payload, so a heavily-compressed ZIP may be rejected even if the on-disk size looks small.

Inputs

NameTypeDefaultDescription
zip*fileZIP archive bytes.
modeenum (files | manifest)"files"`files` returns entry contents (base64); `manifest` returns names + sizes only.

Response

Modes: json. Cache: yes (24h TTL).

Code samples

Built from the manifest example.

# Download or substitute the example input:
#   curl -O https://xtract.bot/examples/zip-extract/sample.zip
ZIP=$(base64 -w0 < sample.zip)

curl -X POST https://api.xtract.bot/api/zip-extract \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "X-Account-Id: $XTRACT_ACCOUNT_ID" \
  -H "X-Api-Key: $XTRACT_API_KEY" \
  -d '{
  "mode": "manifest",
  "zip": "'"$ZIP"'"
}'