Bulk File & Image Downloader — S3, Cloudflare R2, ZIP & WebP
Pricing
from $1.40 / 1,000 files downloaded
Bulk File & Image Downloader — S3, Cloudflare R2, ZIP & WebP
Bulk download public images, PDFs, audio, and media files from URLs or Apify Datasets. Optimize images to WebP/AVIF, deduplicate by SHA-256, create ZIP archives, or sync to AWS S3, Cloudflare R2, and Backblaze B2.
Pricing
from $1.40 / 1,000 files downloaded
Rating
0.0
(0)
Developer
StructMint
Maintained by CommunityActor stats
0
Bookmarked
1
Total users
0
Monthly active users
4 minutes ago
Last modified
Categories
Features
Share
Bulk File & Media Downloader — S3, Cloudflare R2, ZIP & WebP
Download public images, PDFs, documents, audio, video, and binary assets in bulk from direct URL lists or any Apify Dataset — with built-in sharp image optimization (WebP / AVIF / JPEG / PNG), SHA-256 deduplication, streaming ARCHIVE.zip packaging, and direct upload to AWS S3, Cloudflare R2, Backblaze B2, and S3-compatible buckets.
Built for reliable, memory-safe automation at 256 MB – 4,096 MB RAM under LIMITED_PERMISSIONS: every URL and redirect hop is SSRF-validated, oversized files are aborted mid-stream before blowing memory, and failed, rejected, skipped, or duplicate files are never billed.
Key Capabilities
- Flexible Input Sources: Pass plain URL strings, rich URL objects (
{ url, filename, folder, metadata }), an Apify Dataset ID (sourceDatasetId), or a remote JSON/NDJSON dataset endpoint (sourceDatasetUrl). - Deep Nested Field Extraction: Extract URLs from any dataset shape using dot and bracket paths such as
imageUrl,images[].url,media.files[].href,gallery[0].src, orattachments[]. - On-the-Fly Image Optimization (
sharp): Convert raster images (JPEG, PNG, WebP, AVIF, TIFF, GIF) to WebP, AVIF, JPEG, or PNG, resize withinmaxWidth/maxHeightwithout upscaling, auto-orient pixels, and strip EXIF/GPS metadata. PDFs, archives, and non-image files pass through untouched. - Direct Cloud Sync (Zero Egress Lock-In): Stream downloaded assets straight to AWS S3, Cloudflare R2, Backblaze B2, GCS S3-interop, Wasabi, DigitalOcean Spaces, or MinIO, with optional
HeadObjectchecks (skipExistingInBucket) and custom CDNs3PublicBaseUrl. - Apify Key-Value Store & Streaming
ARCHIVE.zip: Save individual files with sanitized collision-free filenames in the run's Key-Value Store and/or pack everything into a single downloadableARCHIVE.zip. - SHA-256 Deduplication & Incremental Watch Mode: Eliminate duplicate binaries within a run (
deduplicateByHash: true) and skip previously processed URLs/hashes across scheduled runs (watchMode: true,onlyNew: true) using a user-scoped Named Key-Value Store (90-day retention). - Enterprise Network & Memory Safety: Strict
http:/https:SSRF guard resolves DNS on every request and every redirect hop, blocks private/loopback/link-local/CGNAT/ULA/metadata IP ranges, stripsAuthorization/Cookieon cross-origin redirects, filters byallowedMimePrefixesbefore buffering, and aborts oversized downloads mid-stream.
Transparent Pay-Per-Event Pricing
All usage is billed exclusively through Apify Pay-Per-Event. Failed, SSRF-blocked, MIME-rejected, oversize-aborted, deduplicated, watch-skipped, and bucket-skipped URLs incur zero event charges.
| Event | Description | FREE | BRONZE | SILVER | GOLD | PLATINUM | DIAMOND |
|---|---|---|---|---|---|---|---|
apify-actor-start | One-time platform run start fee | $0.00005 | $0.00005 | $0.00005 | $0.00005 | $0.00005 | $0.00005 |
file-downloaded | Per successfully downloaded non-duplicate file | $0.0018 | $0.0018 | $0.0016 | $0.0014 | $0.0014 | $0.0014 |
stored-10mib | Per started 10 MiB stored in Apify KVS / ARCHIVE.zip per file (0 if cloud-only) | $0.0025 | $0.0024 | $0.0023 | $0.0022 | $0.0022 | $0.0022 |
cloud-uploaded-10mib | Per started 10 MiB uploaded to S3/R2/B2/S3-compatible storage across the run | $0.0050 | $0.0046 | $0.0043 | $0.0040 | $0.0040 | $0.0040 |
image-optimized | Per raster image resized or converted via sharp | $0.0015 | $0.0014 | $0.0013 | $0.0012 | $0.0012 | $0.0012 |
Cost Examples (BRONZE Tier)
- 100 product photos (~50 MB raw → ~16 MB WebP) synced straight to Cloudflare R2 (
storeInKvs: false):100 × $0.0018+100 × $0.0014+2 × $0.0046+$0.00005=~$0.329 - 200 public PDFs (~40 MB total) downloaded & packaged into
ARCHIVE.zip:200 × $0.0018+200 × $0.0024+$0.00005=~$0.840 - Budget Protection: Set
maxTotalChargeUsdin input or via Apify's run-level spend cap. If the cap is reached mid-run, remaining queued URLs are gracefully markedbudget_skippedwithout exceeding your limit.
Quickstart Example Input
{"urls": ["https://raw.githubusercontent.com/stqnbapxao-source/structmint-b2b-automation-kit/main/samples/public-cloud-fee-schedule-q4-2026.pdf",{"url": "https://raw.githubusercontent.com/stqnbapxao-source/structmint-b2b-automation-kit/main/assets/icons/pdf-structured-tables-watch.png","folder": "icons","metadata": { "assetGroup": "store-badges" }}],"concurrency": 5,"optimizeImages": true,"imageFormat": "webp","imageQuality": 82,"maxWidth": 1200,"storeInKvs": true,"createZipArchive": true,"deduplicateByHash": true}
Example Dataset Output Item
{"sourceUrl": "https://raw.githubusercontent.com/stqnbapxao-source/structmint-b2b-automation-kit/main/assets/icons/pdf-structured-tables-watch.png","finalUrl": "https://raw.githubusercontent.com/stqnbapxao-source/structmint-b2b-automation-kit/main/assets/icons/pdf-structured-tables-watch.png","status": "downloaded","httpStatus": 200,"filename": "pdf-structured-tables-watch.webp","folder": "icons","mimeType": "image/webp","extension": "webp","originalBytes": 42180,"finalBytes": 14620,"bytesSaved": 27560,"sha256": "6e8b9c1f4d2a...","imageOptimized": true,"imageWidth": 512,"imageHeight": 512,"kvsKey": "icons__pdf-structured-tables-watch.webp","kvsUrl": "https://api.apify.com/v2/key-value-stores/<store-id>/records/icons__pdf-structured-tables-watch.webp","zipEntryPath": "icons/pdf-structured-tables-watch.webp","cloudProvider": null,"cloudBucket": null,"cloudKey": null,"cloudUrl": null,"duplicateOfUrl": null,"errorCode": null,"errorMessage": null,"metadata": { "assetGroup": "store-badges" },"processedAt": "2026-12-06T10:15:00.000Z"}
A consolidated run diagnostic report (counts, total bytes saved, ARCHIVE.zip link, billing breakdown, and warnings) is saved to the default Key-Value Store under OUTPUT.
Cloud Storage Setup Examples
Credentials (accessKeyId and secretAccessKey) are marked secret in Apify Input Schema — encrypted at rest and never written to logs or datasets.
1. Cloudflare R2 (Zero Egress)
{"sourceDatasetUrl": "https://api.apify.com/v2/datasets/<DATASET_ID>/items?format=json","urlFieldPaths": ["imageUrl", "images[].url"],"optimizeImages": true,"imageFormat": "webp","storeInKvs": false,"uploadToS3": true,"s3Endpoint": "https://<YOUR_ACCOUNT_ID>.r2.cloudflarestorage.com","s3Region": "auto","s3Bucket": "my-media-bucket","s3Prefix": "catalog/2026","accessKeyId": "<R2_ACCESS_KEY_ID>","secretAccessKey": "<R2_SECRET_ACCESS_KEY>","s3PublicBaseUrl": "https://cdn.example.com","s3Acl": "","skipExistingInBucket": true,"watchMode": true,"onlyNew": true,"watchStateKey": "catalog-r2-sync"}
2. AWS S3
{"urls": ["https://example.com/reports/q4-summary.pdf"],"storeInKvs": false,"uploadToS3": true,"s3Region": "us-east-1","s3Bucket": "my-s3-archive-bucket","s3Prefix": "documents/q4","accessKeyId": "<AWS_ACCESS_KEY_ID>","secretAccessKey": "<AWS_SECRET_ACCESS_KEY>","s3CacheControl": "private, max-age=86400","s3Acl": "","skipExistingInBucket": true}
3. Backblaze B2 (S3-Compatible API)
{"urls": ["https://example.com/assets/brochure.pdf"],"storeInKvs": false,"uploadToS3": true,"s3Endpoint": "https://s3.us-west-004.backblazeb2.com","s3Region": "us-west-004","s3Bucket": "my-b2-media-bucket","s3Prefix": "backups/brochures","accessKeyId": "<B2_KEY_ID>","secretAccessKey": "<B2_APPLICATION_KEY>","skipExistingInBucket": true}
Integrations: Direct Apify Add Integration, n8n, Make & Apify MCP
Direct Apify Actor-to-Actor Integration (Add integration)
Wire this Actor directly after any upstream scraper from the source Actor's Integrations → Add integration tab without glue code:
- Recommended (
LIMITED_PERMISSIONSsafe): Map"sourceDatasetId": "{{resource.defaultDatasetId}}"(or choose a dataset in the native Dataset Resource Picker). BecausesourceDatasetIddeclaresresourceType: "dataset"andresourcePermissions: ["READ"], Apify automatically grants read-only access to the triggering run's private dataset without requiringFULL_PERMISSIONS. - Implicit webhook payload fallback: If
urls,sourceDatasetId, andsourceDatasetUrlare omitted, the Actor automatically inspects Apify's implicit webhookpayload.resource.defaultDatasetId(orresource.defaultDatasetId).
{"sourceDatasetId": "{{resource.defaultDatasetId}}","urlFieldPaths": ["imageUrl", "images[].url", "pdfUrl"],"optimizeImages": true,"imageFormat": "webp","createZipArchive": true}
n8n / Make Synchronous Webhook Run
Trigger the Actor synchronously from an n8n HTTP Request node or Make HTTP module and receive the manifest dataset JSON directly:
POST https://api.apify.com/v2/actors/structmint~bulk-file-media-downloader/run-sync-get-dataset-items?maxTotalChargeUsd=0.25Authorization: Bearer <APIFY_API_TOKEN>Content-Type: application/json
Pair with watchMode: true and onlyNew: true on a schedule so unchanged assets return status: "watch_skipped" with zero upload or download charges.
AI Agent & MCP Usage (mcp.apify.com)
This Actor exposes complete JSON schemas for both input and dataset output (overview table view + typed fields), making it directly callable from MCP-compatible AI agents via mcp.apify.com to fetch, optimize, archive, and mirror public media/PDF assets into Cloudflare R2 or AWS S3.
Notes on LIMITED_PERMISSIONS & External Datasets
This Actor runs under LIMITED_PERMISSIONS for account safety. Selecting a private dataset via sourceDatasetId (declared with resourceType: "dataset" and resourcePermissions: ["READ"]) lets Apify safely grant read-only access to only that dataset at run start. If a dataset is unreadable under the active run token, the Actor reports a clear diagnostic warning in OUTPUT.warnings instead of crashing.