Bulk file and image downloader: how to download images and files from a website (API, Python, no code)
Download files in bulk from direct links, or every image, video, audio file, PDF, document or archive on a list of web pages. This guide shows the output fields, a working input, and
Python, JavaScript and cURL code for the Actor v0iddo/bulk-file-downloader on Apify.
Open Bulk file and image downloader on Apify
What data you get
One row per result. Every row can be downloaded as JSON, CSV, Excel or HTML, or read through the API.
| Field | Label | Type | Example |
|---|---|---|---|
fileUrl | File | URL | https://api.apify.com/v2/key-value-stores/GKrosZlTQ8ZrHctTs/records... |
fileName | Name | text | Trinidad_and_Tobago_hummingbirds_composite.jpg |
fileType | Type | text | image |
fileBytes | Bytes | number | 292246 |
imageWidth | Width | number | 1280 |
imageHeight | Height | number | 1280 |
altText | Alt text | text | |
url | Source link | URL | https://thumb.wikimedia.org/wikipedia/commons/thumb/7/7c/Trinidad_a... |
error | Error | text | |
kind | text | file | |
pageUrl | text | https://en.wikipedia.org/wiki/Hummingbird | |
finalUrl | text | https://thumb.wikimedia.org/wikipedia/commons/thumb/7/7c/Trinidad_a... | |
foundIn | text | og:image | |
contentType | text | image/jpeg | |
sha256 | text | 82cafb5947635e2a5d5244de379932a7697c3aeb0e66bec7ea9e5fde9f78d303 | |
chargeUnits | number | 1 | |
downloadedAt | text | 2026-10-26T07:22:17Z |
Input example
This is the input that is pre-filled on the Actor page. Change the values for your own run.
{
"pageUrls": [
"https://en.wikipedia.org/wiki/Hummingbird"
],
"fileTypes": [
"image"
],
"maxFilesPerPage": 20,
"maxItems": 20
}
| Input field | Type | What it does |
|---|---|---|
fileUrls | array | Direct links to files of any type (images, video, audio, PDF, documents, archives). |
pageUrls | array | Web pages to download files from: the images it shows (the largest size it offers), its video and audio, and the files it links to, filtered by File types. |
fileTypes | array | Which files to take from Pages. |
sameSiteOnly | boolean | Take only files on the host of the page or its subdomains, leaving out files on other hosts (many sites keep their images on a separate CDN host, so this can drop them). |
maxFilesPerPage | integer | Caps the files taken from one page, in the order they appear on it. |
minImageKB | integer | Images found on pages that are smaller than this are left out (icons, spacers, tracking pixels) and not charged; 0 keeps every image. |
maxFileMB | integer | Larger files come back as a row with the reason, at no charge. |
maxItems | integer | The run stops after this many result rows. |
Output sample
Real rows from a run of the Actor. Fields that name people are left out of the sample.
[
{
"kind": "file",
"url": "https://thumb.wikimedia.org/wikipedia/commons/thumb/7/7c/Trinidad_and_Tobago_hummingbirds_composite.jpg/1280px-Trinidad_and_Tobago_hummin...",
"pageUrl": "https://en.wikipedia.org/wiki/Hummingbird",
"finalUrl": "https://thumb.wikimedia.org/wikipedia/commons/thumb/7/7c/Trinidad_and_Tobago_hummingbirds_composite.jpg/1280px-Trinidad_and_Tobago_hummin...",
"foundIn": "og:image",
"fileName": "Trinidad_and_Tobago_hummingbirds_composite.jpg",
"fileType": "image",
"contentType": "image/jpeg",
"fileBytes": 292246,
"sha256": "82cafb5947635e2a5d5244de379932a7697c3aeb0e66bec7ea9e5fde9f78d303",
"imageWidth": 1280,
"imageHeight": 1280,
"fileUrl": "https://api.apify.com/v2/key-value-stores/GKrosZlTQ8ZrHctTs/records/000001-Trinidad_and_Tobago_hummingbirds_composite.jpg?signature=z1kCA...",
"chargeUnits": 1,
"downloadedAt": "2026-10-26T07:22:17Z"
},
{
"kind": "file",
"url": "https://en.wikipedia.org/static/images/icons/enwiki-25.svg",
"pageUrl": "https://en.wikipedia.org/wiki/Hummingbird",
"finalUrl": "https://en.wikipedia.org/static/images/icons/enwiki-25.svg",
"foundIn": "img",
"fileName": "enwiki-25.svg",
"fileType": "image",
"contentType": "image/svg+xml",
"fileBytes": 115918,
"sha256": "095fb188212ac25419535feb7aee7a6a7b2d58270ae42a168abf9942d1b44315",
"fileUrl": "https://api.apify.com/v2/key-value-stores/GKrosZlTQ8ZrHctTs/records/000002-enwiki-25.svg?signature=154Opp9Dy3wLYwkRpWX0e",
"chargeUnits": 1,
"downloadedAt": "2026-10-26T07:22:17Z"
}
]
Code: Python, JavaScript and cURL
Get your API token in Apify Console under Settings, then Integrations. The Actor id is v0iddo/bulk-file-downloader.
Python (apify-client)
from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run_input = {'pageUrls': ['https://en.wikipedia.org/wiki/Hummingbird'],
'fileTypes': ['image'],
'maxFilesPerPage': 20,
'maxItems': 20}
run = client.actor("v0iddo/bulk-file-downloader").call(run_input=run_input)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(item)
JavaScript (apify-client)
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const input = {
"pageUrls": [
"https://en.wikipedia.org/wiki/Hummingbird"
],
"fileTypes": [
"image"
],
"maxFilesPerPage": 20,
"maxItems": 20
};
const run = await client.actor('v0iddo/bulk-file-downloader').call(input);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
cURL
curl -X POST "https://api.apify.com/v2/acts/v0iddo~bulk-file-downloader/run-sync-get-dataset-items" \
-H "Authorization: Bearer YOUR_APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"pageUrls": ["https://en.wikipedia.org/wiki/Hummingbird"], "fileTypes": ["image"], "maxFilesPerPage": 20, "maxItems": 20}'
Price
$2.00 per 1,000 results. You pay per result row. There is no separate charge per run. Higher Apify plans pay less per result, down to $1.40 per 1,000. See the pricing tab for your plan. A new Apify account gets $5 of platform credit every month.
Good to know
- One row per file: the stored copy (fileUrl), the link it came from, the page it was found on and where on the page (img, srcset, link, video, og:image ...), its name, type, content type, size...
- The files are records in the run's key-value store; fileUrl opens them directly and works in the dataset table, in spreadsheets and in your own code. They are kept as long as your Apify plan keeps...
- Images on pages come in the largest size the page offers in srcset, and lazy loading attributes (data-src and the like) are read, so the real image is taken instead of a placeholder.
- The same file under two links is stored once: the second row has duplicateOf and costs nothing. A link that appears on several pages is downloaded once.
FAQ
What data does the Bulk file and image downloader return?
Each result is one row in an Apify dataset. Fields include fileUrl, fileName, fileType, fileBytes, imageWidth, imageHeight, altText, url, and more. The table above shows every field with an example value.
How do I use the Bulk file and image downloader from Python?
Install the apify-client package, create a client with your Apify API token, call the Actor v0iddo/bulk-file-downloader with an input like the one above, and read the rows from the run's dataset. The Python snippet above does exactly that.
Can I use it without writing code?
Yes. Open the Actor page on Apify, fill in the input form (an example is already filled in), press Start, and download the results as JSON, CSV, Excel or HTML. You can also schedule runs there.
How much does it cost?
$2.00 per 1,000 results. You pay per result row. There is no separate charge per run. Higher Apify plans pay less per result, down to $1.40 per 1,000. A new Apify account gets $5 of platform credit every month.
How do I limit the number of results?
Set the maxItems input field to the number of results you need; the run stops there, so it also caps the cost of one run. You can also set a maximum cost for a run in the run options on Apify, and the run stops when it is reached.
Can I send the results to Google Sheets, Make, Zapier or n8n?
Yes. Apify datasets connect to Google Sheets, Slack, Make, Zapier and n8n, and a webhook can call your own service when a run finishes. You can also export the dataset as JSON, CSV or Excel.
Open Bulk file and image downloader on Apify
Related guides
- Google Maps Scraper: Scrape Google Maps business listings by search and place: name, category, address, coordinates, rating, rev...
- Video frame extractor: Extract still frames from video files as JPEG, PNG or WebP images with timecodes: one every N seconds, a nu...
- Website screenshot API: Capture a public web page as a PNG, JPEG or WEBP image: any viewport size, full page, retina scaling, optio...