Free plan

Inspect Archive

Look inside a ZIP without opening it, with a safety check
POST
/v1/documents/archive-inspect

About this tool

This tool shows what is inside an archive (a package of files such as ZIP, TAR, RAR or 7z) without unpacking it. You see every file with its size and date, plus the totals. It also runs a safety check for dangerous paths, links, programs, archives inside archives, and zip bombs, which are tiny files that expand to a huge size.
For example, you got a ZIP by e-mail and want to see its contents and check it looks safe before you open it.

How to use it

  1. Choose this tool.
  2. Add the archive file (one file).
  3. If it is very large, you can limit how many entries are listed.
  4. Press Generate.
  5. Read the list and the safety check.

What you get back

You get a list of the files with their sizes and dates, the totals and the result of the safety check. Nothing is unpacked.
GOOD TO KNOW
Nothing is written: the archive is only read. Counts as one file. 7z and RAR are not supported.
TEST IT LIVE

Try Inspect Archive in the Studio

One click opens the Studio with this tool already selected. Add your file and see the result in seconds.
Open in the Studio
Family
Documents
Plan
Free
Method
POST
Endpoint
/v1/documents/archive-inspect
Tool ID
documents.archive-inspect
Authentication
API key
Accepts
Text and settings
Background jobs
Yes
Usage group
Documents
For developers

Use it from your code

cURL

curl -X POST "https://app.h2i.davixlabs.io/v1/documents/archive-inspect" \
  -H "X-Api-Key: $DAVIX_H2I_API_KEY" \
  -F 'file=@document.pdf' \
  -F 'limit=500' \
  -F 'validate_only=false' \
  -F 'presetId=00000000-0000-4000-8000-000000000000'

Node.js

const { DavixH2I } = require('@davixlabs/h2i-sdk');

const h2i = new DavixH2I({ apiKey: process.env.DAVIX_H2I_API_KEY, baseUrl: process.env.DAVIX_H2I_URL });
const result = await h2i.documents.archiveInspect({
    "file": 'document.pdf',
    "limit": 500,
    "validate_only": false,
    "presetId": "00000000-0000-4000-8000-000000000000"
  });
console.log(result.data, result.requestId);

PHP

<?php
require 'vendor/autoload.php';

$h2i = new \Davix\H2I\Client(['apiKey' => getenv('DAVIX_H2I_API_KEY'), 'baseUrl' => getenv('DAVIX_H2I_URL')]);
$result = $h2i->documents()->archiveInspect([
    'file' => 'document.pdf',
    'limit' => 500,
    'validate_only' => false,
    'presetId' => '00000000-0000-4000-8000-000000000000',
]);
echo $result->requestId;
FAQ

Frequently asked questions

See what is inside a ZIP, TAR, TAR.GZ, RAR or 7z without extracting it: every entry with its size and date, the totals, and a safety check for path escapes, links, programs, nested archives and zip bombs.

Inspect Archive works from text and settings, so no file is needed. Every input is optional.

Inspect Archive is included in every plan, including Free. Each run uses credits from your monthly allowance.

Send a POST request to /v1/documents/archive-inspect with your API key in the X-Api-Key header. Official SDKs for Node.js, Python, PHP, Go, Java, .NET and Ruby do the same for you, and the code box on this page shows ready-to-copy examples. For large work it can also run as a background job, so your request returns straight away.