Zip Download and Extraction Scraper avatar
Zip Download and Extraction Scraper

Pricing

from $5.00 / 1,000 results

Go to Apify Store
Zip Download and Extraction Scraper

Zip Download and Extraction Scraper

Download a zipped file and extract it right away, no extra moves required.

Pricing

from $5.00 / 1,000 results

Rating

0.0

(0)

Developer

Arjun Thapa

Arjun Thapa

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

3 days ago

Last modified

Share

ZIP Downloader

Small Python utility to download ZIP files listed in input.json and save them into output/.

Features:

  • Reads input.json or the APIFY_INPUT environment variable (for Apify actors).
  • Retries on network errors, skips existing files unless --overwrite is used.
  • Batch parallel downloads with threads.
  • Optional extraction of ZIP files.

Quick start:

  1. Edit input.json and add your URLs to the urls array.
  2. Install dependencies:
$pip install -r requirements.txt
  1. Run downloader:
$python src/download.py --input input.json

Options:

  • --output output folder (default output)
  • --batch N number of parallel downloads (default 4)
  • --retries N retries per URL (default 3)
  • --overwrite overwrite existing files
  • --extract extract ZIP contents after download

Apify / Actors: Set the APIFY_INPUT environment variable to a JSON string or include input.json in the actor's source. The script will prioritize APIFY_INPUT when present.

Deploying to Apify (Actors)

  1. Install the Apify CLI (requires Node/npm):
npm install -g @apify/cli
apify login
  1. From the project root, push the actor to Apify:
$apify push

Apify will build the actor using the Dockerfile or the build.command in actor.json. The actor receives input via the APIFY_INPUT environment variable; you can start runs from the Apify console and provide a JSON input like { "urls": ["https://...zip"] }.

Alternatively, build and run locally with Docker:

docker build -t zip-downloader .
docker run --rm -e APIFY_INPUT='{"urls":["https://github.com/psf/requests/archive/refs/heads/main.zip"]}' zip-downloader

Extraction note

The actor supports automatic extraction when the input JSON contains "extract": true or when you pass the CLI flag --extract.

Example input.json enabling extraction:

{
"urls": [
"https://github.com/psf/requests/archive/refs/heads/main.zip"
],
"extract": true,
"batch": 2,
"retries": 3
}

Example using APIFY_INPUT when running an actor or via Docker:

APIFY_INPUT='{"urls":["https://github.com/psf/requests/archive/refs/heads/main.zip"],"extract":true}' apify run
# or with docker:
docker run --rm -e APIFY_INPUT='{"urls":["https://github.com/psf/requests/archive/refs/heads/main.zip"],"extract":true}' zip-downloader

The script will create an extracted folder next to the downloaded .zip named after the ZIP's base name (for example output/requests-main).

Copilot-friendly prompt example:

# Loop through URLs from input.json and download each ZIP
# Ensure error handling and logging
# Save files to output/ folder