# Bulk Image & File Downloader - URLs or Web Pages to ZIP (`wood-between-studio/bulk-file-downloader`) Actor

Download images, PDFs and any files in bulk from a URL list, or grab every image on web pages. Size filters, dedupe, original names, one ZIP plus direct links. $1 per 1,000 files.

- **URL**: https://apify.com/wood-between-studio/bulk-file-downloader.md
- **Developed by:** [Wood Between Studio](https://apify.com/wood-between-studio) (community)
- **Categories:** Automation, Developer tools, E-commerce
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 file downloadeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Bulk Image & File Downloader: URLs or Web Pages to ZIP

Download **images, PDFs, documents and any other files in bulk**, either from a list of URLs or by collecting every image on the web pages you give it. You get **one ZIP file**, a direct download link for every file, and a dataset with size, type, dimensions and SHA-1 for each one.

### Why use it?

- **Two ways in.** Paste direct file links, or paste page URLs and let the Actor find the images (`img`, `srcset` at the highest resolution, `<picture>`, lazy-load attributes, `og:image`, CSS backgrounds and linked image files).
- **Linked files too.** Add extensions like `pdf`, `docx`, `xlsx`, `zip` or `mp3` to grab every matching link on a page.
- **Clean results.** Minimum width and height filters drop icons and spacers. Duplicates are removed by URL and by content hash. Files keep their original names, or use numbered or hash names.
- **One ZIP.** Everything is bundled into `files.zip` (split into parts for very large jobs), plus individual direct links if you want them.
- **Fair, simple price.** $1 per 1,000 files. Failed, skipped, too-small and duplicate files are free.
- **Polite.** robots.txt is respected for page crawling, a real referer is sent, and size and time limits are applied per file.

### Use cases

- Archive product photos or catalog images from your own or partner sites
- Collect public-domain or openly licensed images for datasets and ML training
- Download all PDFs (reports, manuals, forms) linked from a page
- Turn a scraped dataset's image URLs into a ZIP you can share

### Input

| Field | Default | Notes |
|---|---|---|
| `fileUrls` | — | Direct links to any file |
| `pageUrls` | — | Pages to collect images (and linked files) from |
| `linkedFileExtensions` | none | e.g. `["pdf","docx"]` |
| `includePageImages` | `true` | |
| `minWidth` / `minHeight` | `0` | Pixels |
| `maxFileSizeMb` | `100` | Larger files are skipped |
| `maxFiles` | `1000` | |
| `dedupe` | `true` | By URL and SHA-1 |
| `createZip` | `true` | `zipPartSizeMb` default 300 |
| `saveIndividualFiles` | `true` | Direct link per file |
| `fileNaming` | `original` | `original`, `numbered` or `hash` |

```json
{ "pageUrls": ["https://books.toscrape.com/"], "minWidth": 100, "createZip": true }
```

### Output

Dataset item per file:

```json
{ "url": "https://books.toscrape.com/media/cache/2c/da/2cdad67c44b002e7ead0cc35693c0e8b.jpg", "sourcePage": "https://books.toscrape.com/",
  "status": "success", "fileName": "2cdad67c44b002e7ead0cc35693c0e8b.jpg", "contentType": "image/jpeg", "sizeBytes": 6566,
  "width": 120, "height": 174, "sha1": "…", "downloadUrl": "https://api.apify.com/v2/key-value-stores/…/records/file-….jpg" }
```

The `SUMMARY` record has the ZIP download link(s), totals and a per-page report.

### Pricing

- **$0.001 per file downloaded** ($1 per 1,000)
- **$0.002 per extra 10 MB** for files over 10 MB (covers storage and bandwidth). Most images and PDFs never hit this.

Platform usage is included. Failed, skipped and duplicate files are free. Set a maximum charge per run for a hard cap.

### Limits

- Pages are read as HTML without running JavaScript. Images that only appear after scripts run may be missed. Pass their URLs directly if so.
- No logins, paywalls or CAPTCHAs are bypassed.

### Responsible use

You are responsible for having the right to download and use the files: respect copyright, licences and each site's terms. Only collect content you are allowed to use.

### Support

Need S3 or Google Drive upload, resizing or a browser mode? Open an issue on the **Issues** tab. We read every one.

### Call it from curl, JavaScript or Python

You can run this Actor in the [Apify Console](https://apify.com/wood-between-studio/bulk-file-downloader) with no code, or call it as an API from curl, JavaScript or Python. Replace `YOUR_TOKEN` with an [Apify API token](https://console.apify.com/account/integrations).

#### curl

```bash
curl "https://api.apify.com/v2/acts/wood-between-studio~bulk-file-downloader/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"fileUrls": ["https://www.irs.gov/pub/irs-pdf/fw9.pdf"], "pageUrls": ["https://books.toscrape.com/"], "maxFiles": 25}'
```

#### JavaScript

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('wood-between-studio/bulk-file-downloader').call({
  "fileUrls": [
    "https://www.irs.gov/pub/irs-pdf/fw9.pdf"
  ],
  "pageUrls": [
    "https://books.toscrape.com/"
  ],
  "maxFiles": 25
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

#### Python

```python
import os
from apify_client import ApifyClient

client = ApifyClient(os.environ["APIFY_TOKEN"])
run = client.actor("wood-between-studio/bulk-file-downloader").call(run_input={
  "fileUrls": [
    "https://www.irs.gov/pub/irs-pdf/fw9.pdf"
  ],
  "pageUrls": [
    "https://books.toscrape.com/"
  ],
  "maxFiles": 25
})
items = client.dataset(run["defaultDatasetId"]).list_items().items
print(items)
```

You can also schedule the Actor, cap the spend per run, and send the dataset to Google Sheets, Slack or a webhook from the Console. Store page: [apify.com/wood-between-studio/bulk-file-downloader](https://apify.com/wood-between-studio/bulk-file-downloader).

# Actor input Schema

## `fileUrls` (type: `array`):

Direct links to images, PDFs, documents, audio, archives or any file. One per line.

## `pageUrls` (type: `array`):

The Actor reads each page and downloads the images on it (img, srcset, picture, og:image, CSS backgrounds) and, optionally, linked files with the extensions below. Pages blocked by robots.txt are skipped.

## `linkedFileExtensions` (type: `array`):

For web pages: download <a href> links ending in these extensions, e.g. pdf, docx, xlsx, zip, mp3. Empty = images only.

## `includePageImages` (type: `boolean`):

Turn off to download only linked files.

## `minWidth` (type: `integer`):

Skip smaller images (icons, spacers). Not charged.

## `minHeight` (type: `integer`):

Skip smaller images. Not charged.

## `maxFileSizeMb` (type: `integer`):

Larger files are skipped and not charged.

## `maxFiles` (type: `integer`):

Stop after this many files.

## `dedupe` (type: `boolean`):

Same URL or identical content (SHA-1) is stored once and charged once.

## `createZip` (type: `boolean`):

Bundle all files into ZIP(s) in the key-value store. Large jobs are split into parts.

## `zipPartSizeMb` (type: `integer`):

A new ZIP part starts after this size.

## `saveIndividualFiles` (type: `boolean`):

Store every file as its own record with a direct download link.

## `fileNaming` (type: `string`):

How files are named in the ZIP.

## `maxConcurrency` (type: `integer`):

Files downloaded at once.

## `timeoutSecs` (type: `integer`):

Per file.

## Actor input object example

```json
{
  "fileUrls": [
    "https://upload.wikimedia.org/wikipedia/commons/a/a9/Example.jpg",
    "https://www.irs.gov/pub/irs-pdf/fw9.pdf"
  ],
  "pageUrls": [],
  "linkedFileExtensions": [],
  "includePageImages": true,
  "minWidth": 0,
  "minHeight": 0,
  "maxFileSizeMb": 100,
  "maxFiles": 1000,
  "dedupe": true,
  "createZip": true,
  "zipPartSizeMb": 300,
  "saveIndividualFiles": true,
  "fileNaming": "original",
  "maxConcurrency": 8,
  "timeoutSecs": 60
}
```

# Actor output Schema

## `results` (type: `string`):

No description

## `summary` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "fileUrls": [
        "https://upload.wikimedia.org/wikipedia/commons/a/a9/Example.jpg",
        "https://www.irs.gov/pub/irs-pdf/fw9.pdf"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("wood-between-studio/bulk-file-downloader").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "fileUrls": [
        "https://upload.wikimedia.org/wikipedia/commons/a/a9/Example.jpg",
        "https://www.irs.gov/pub/irs-pdf/fw9.pdf",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("wood-between-studio/bulk-file-downloader").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "fileUrls": [
    "https://upload.wikimedia.org/wikipedia/commons/a/a9/Example.jpg",
    "https://www.irs.gov/pub/irs-pdf/fw9.pdf"
  ]
}' |
apify call wood-between-studio/bulk-file-downloader --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,wood-between-studio/bulk-file-downloader"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/nE7STR1m1Vx5pj2ru/builds/df31DNGTxUTDdGcoC/openapi.json
