# grist.tools Archive Inspect

> grist.tools Archive Inspect is a paid API for AI agents from grist.tools, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-02).

Inspects a remote archive file (ZIP, TAR, or gzipped TAR) and returns a listing of its entries and metadata

## Facts

- Endpoint: POST https://grist.tools/v1/archive-inspect?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/grist-tools-archive-inspect-e48c128d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_6JBPhXZ6CrCqYFwahPGwy

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability grist-tools-archive-inspect-e48c128d -d '<json body>'
```

Example prompt: Can you inspect the archive at https://example.com/release-v2.tar.gz and list up to 500 of its file entries?

## When to prefer this

Use this endpoint when you need to inspect the contents of a remote archive file without fully downloading and processing it yourself. It handles format detection automatically from magic bytes, supports ZIP, TAR, and gzipped TAR, follows redirects, and charges only on success — making it ideal for lightweight, one-off archive inspection tasks in an agent workflow.

## Known failure modes

- Archive exceeds 100 MB size limit — returns an error
- URL is unreachable or returns non-200 response — fetch failure
- Archive format is not ZIP, TAR, or gzipped TAR — unsupported format error
- URL exceeds 2048 character limit — validation error
- max_entries outside 1–10000 range — validation error
- Payment verification fails — call is rejected and not charged
- Archive is corrupted or malformed — parse error

## How this service works

One endpoint does one thing, always the same way, for a fraction of a cent. Payment is verified before the handler runs and settled only after it succeeds, so a rejected or failed call is never a charged call.

## Output

Returns a structured list of archive entries (file names/paths) sorted by name, the total entry count, whether the result was truncated, and the detected archive format — all derived from the archive's magic bytes rather than its file extension.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "url"
 ],
 "properties": {
  "url": {
   "type": "string",
   "description": "Absolute http(s) URL of the archive (at most 100 MB, also the cap on an inflated tar.gz), up to 2048 characters; redirects are followed and the format (zip, tar or gzip-compressed tar) is decided from the magic bytes, not the extension."
  },
  "max_entries": {
   "type": "integer",
   "description": "How many entries to list, 1 to 10000 (default 1000), taken in archive order and then sorted by name; any beyond the limit still count in total_entries and set truncated."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/grist-tools-archive-inspect-e48c128d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from grist.tools](https://www.zero.xyz/host/grist.tools/llms.txt)
