Zip Download and Extraction Scraper
Pricing
from $5.00 / 1,000 results
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
Actor stats
0
Bookmarked
2
Total users
1
Monthly active users
3 days ago
Last modified
Categories
Share
ZIP Downloader
Small Python utility to download ZIP files listed in input.json and save them into output/.
Features:
- Reads
input.jsonor theAPIFY_INPUTenvironment variable (for Apify actors). - Retries on network errors, skips existing files unless
--overwriteis used. - Batch parallel downloads with threads.
- Optional extraction of ZIP files.
Quick start:
- Edit
input.jsonand add your URLs to theurlsarray. - Install dependencies:
$pip install -r requirements.txt
- Run downloader:
$python src/download.py --input input.json
Options:
--outputoutput folder (defaultoutput)--batch Nnumber of parallel downloads (default 4)--retries Nretries per URL (default 3)--overwriteoverwrite existing files--extractextract 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)
- Install the Apify CLI (requires Node/npm):
npm install -g @apify/cliapify login
- 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