Archive extraction REST API Reference

You can extract an archive containing a single file as well as multiple filesarchive. In this section we will describe each option to pass the files to our ZIP archive extractor.


Extract ZIP archive accessible via URL using JSON

To extract the archive using JSON, please set the "content-type" header to "application/json". An example request would look like this:

[HTTP POST] https://api.archiveapi.com/extract?secret=your_secret
Content-Type: application/json
{
    "file": "https://sample.com/path-to-archive.zip"
    "password": "123456",
}

Request Body

file string
The archive URL to be extracted

password string
The password to open a protected ZIP archive


Extract ZIP archive using FormData

You can pass your ZIP archive structured as "multipart/form-data". Simply put your archive into the FormData's Files property and POST it to our extraction endpoint:

[HTTP POST] https://api.archiveapi.com/extract?secret=your_secret
Content-Type: multipart/form-data; boundary=----FpbVSjGhtld6EDEy

------7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="Password"

123456

----FpbVSjGhtld6EDEy
Content-Disposition: form-data; name="File"; filename="sample.zip"

ARCHIVE

----FpbVSjGhtld6EDEy--

FormData Parameters

Files File
The archive file to be extracted

Password string
The password to open a protected ZIP archive


Extract a ZIP archive using the application/octet-stream

The application/octet-stream MIME type is used for binary files transfer. It preserves the file contents, but requires to specify the file name including the type. For this case, Content disposition header must be provided with the file name. Example: Content-Disposition: inline; filename="sample.zip"

[HTTP POST] https://api.archiveapi.com/extract?secret=your_secret
Content-Type: application/octet-stream
Content-Disposition: inline; filename="sample.zip"

---File Bytes---

Hapy coding!