# Bulk Image and File Downloader - Scan Pages, ZIP (`tiger19935/bulk-image-file-downloader`) Actor

Download images, PDFs and files in bulk from direct links or scan any web page for media. Saves every file to storage with a public link, optional ZIP archive.

- **URL**: https://apify.com/tiger19935/bulk-image-file-downloader.md
- **Developed by:** [Andrew Boiko](https://apify.com/tiger19935) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.20 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 - Images, PDFs, Docs from Any Page

Download every image, PDF, document, audio or video file from a list of web pages - or from a list of direct links - in one run. Duplicates are removed, images can be resized and converted, and every file gets a public download link. Optionally get everything as one ZIP archive.

### What you can do

- **Scan web pages** and collect all images (img tags, responsive srcset, lazy-loaded images, social preview images, icons) and linked documents (PDF, Word, Excel, PowerPoint, CSV), archives, audio and video files.
- **Download from a URL list** - turn off page scanning and paste direct file links.
- **Remove duplicates** by content hash (SHA-256). Duplicates are listed but not billed.
- **Filter** by minimum image size, file size, URL pattern (regex) and domain.
- **Convert and resize** images: WebP, JPEG or PNG, longest side limit, quality control.
- **ZIP archive** of everything (up to 400 MB).
- **Rich metadata**: size, content type, extension, width and height, alt text, the page where the file was found.
- Public download links for each file; files are stored in the run's key-value store.

### Typical uses

- Archive product photos and brochures from a supplier website.
- Collect PDFs, price lists and reports from a list of company pages.
- Build image datasets for machine learning and design research.
- Back up your own website's media.
- Migrate images between shops and CMS.

### Input

| Field | Description |
|---|---|
| URLs | Pages to scan, or direct file links (required). |
| Scan pages for files | On by default. Turn off for direct file links. |
| File types | Images, documents, archives, audio, video. |
| Max files | Cap on downloaded files (default 100). |
| Remove duplicates | On by default. |
| Min width / height / file size | Skip icons and tiny files. |
| Convert images to / Resize | Original, WebP, JPEG or PNG; longest side in pixels. |
| URL must (not) match | Regular expression filters. |
| Create a ZIP archive | One files.zip with everything. |

Example input:

```
{
    "startUrls": [{ "url": "https://example.com/gallery" }],
    "fileTypes": ["images", "documents"],
    "minWidth": 400,
    "imageFormat": "webp",
    "maxImageDimension": 1600,
    "createZip": true
}
```

### Output

```
{
    "status": "downloaded",
    "sourceUrl": "https://example.com/img/photo-1.jpg",
    "pageUrl": "https://example.com/gallery",
    "alt": "Red bicycle",
    "contentType": "image/webp",
    "extension": "webp",
    "sizeBytes": 84213,
    "sha256": "9b1f...",
    "width": 1600,
    "height": 1067,
    "fileKey": "file-0001-9b1f2c3d.webp",
    "downloadUrl": "https://api.apify.com/v2/key-value-stores/.../records/file-0001-9b1f2c3d.webp"
}
```

### Pricing

| Event | Price |
|---|---|
| File downloaded (unique) | $0.004 |
| Web page scanned | $0.01 |

Duplicates, files skipped by your filters and failed downloads are free. Volume discounts apply automatically for Bronze, Silver and Gold Apify subscribers. Downloading 100 images from one page costs about $0.41. Set a maximum cost per run to stay in control.

### Tips

- Set a minimum width of 100-200 px to skip icons and tracking pixels.
- For a whole site, first collect page URLs (for example with a crawler or sitemap), then pass them here.
- Use WebP conversion and a 1600 px limit to cut storage by 70-90%.
- Some sites block downloads without a referer; the actor sends the page address as the referer automatically.

### Limits

- Pages are read as HTML. Images that appear only after JavaScript runs (for example some single-page apps) may not be found; direct links always work.
- The actor does not bypass logins, paywalls or bot protection.
- Please respect copyright and the terms of the websites you download from.

### FAQ

**Where are my files?** In the Storage tab of the run (key-value store). Links are in the dataset and in the OUTPUT record.

**Are duplicates detected across pages?** Yes, within one run by file content.

**Can I download PDFs only?** Yes: choose Documents as the file type and add the URL pattern .pdf$.

### More tools by the same author

- [Image OCR Bulk](https://apify.com/tiger19935/image-ocr-bulk): Bulk OCR for images
- [PDF Text and Table Extractor](https://apify.com/tiger19935/pdf-text-table-extractor): PDF to text, tables and Markdown with OCR
- [Website Screenshot API](https://apify.com/tiger19935/website-screenshot-api): Full-page and mobile screenshots in bulk
- [Video Frame Extractor](https://apify.com/tiger19935/video-frame-extractor): Extract frames and scenes from video

# Actor input Schema

## `startUrls` (type: `array`):

Web pages to scan (default) or direct file links (turn off Scan pages).

## `scanPages` (type: `boolean`):

On: each URL is a web page and the actor finds the files on it. Off: each URL is a direct link to a file.

## `fileTypes` (type: `array`):

Which kinds of files to collect when scanning pages. Images are taken from img tags, srcset, social preview tags and icons; other types from links and media tags.

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

Stop after this many files have been downloaded (billing applies per downloaded file).

## `maxFilesPerPage` (type: `integer`):

Only the first N candidate files found on each page are used.

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

Skip files with identical content (compared by SHA-256). Duplicates are not billed.

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

Skip smaller images such as icons and tracking pixels.

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

Skip images shorter than this.

## `minFileSizeKb` (type: `integer`):

Skip files smaller than this.

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

Skip files larger than this.

## `imageFormat` (type: `string`):

Keep originals or convert all raster images to one format.

## `maxImageDimension` (type: `integer`):

Shrink larger images so that neither side exceeds this. 0 keeps the original size.

## `imageQuality` (type: `integer`):

Compression quality 1-100 for converted images.

## `sameDomainOnly` (type: `boolean`):

Only collect files hosted on the same domain as the page. CDN-hosted images are skipped when on.

## `urlIncludePattern` (type: `string`):

Optional regular expression. Only file URLs that match are downloaded, for example /uploads/ or .pdf$

## `urlExcludePattern` (type: `string`):

Optional regular expression. File URLs that match are skipped, for example thumb|logo|sprite

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

Also save all files as one files.zip in the key-value store (up to 400 MB).

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

How many files are downloaded at once.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://crawlee.dev"
    }
  ],
  "scanPages": true,
  "fileTypes": [
    "images"
  ],
  "maxFiles": 20,
  "maxFilesPerPage": 100,
  "dedupe": true,
  "minWidth": 100,
  "minHeight": 0,
  "minFileSizeKb": 0,
  "maxFileSizeMb": 25,
  "imageFormat": "original",
  "maxImageDimension": 0,
  "imageQuality": 85,
  "sameDomainOnly": false,
  "createZip": false,
  "maxConcurrency": 6
}
```

# 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 = {
    "startUrls": [
        {
            "url": "https://crawlee.dev"
        }
    ],
    "fileTypes": [
        "images"
    ],
    "maxFiles": 20,
    "minWidth": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("tiger19935/bulk-image-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 = {
    "startUrls": [{ "url": "https://crawlee.dev" }],
    "fileTypes": ["images"],
    "maxFiles": 20,
    "minWidth": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("tiger19935/bulk-image-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 '{
  "startUrls": [
    {
      "url": "https://crawlee.dev"
    }
  ],
  "fileTypes": [
    "images"
  ],
  "maxFiles": 20,
  "minWidth": 100
}' |
apify call tiger19935/bulk-image-file-downloader --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,tiger19935/bulk-image-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/82bv68mu9U8H1fj1T/builds/bPYcXN8nPhc8jVrcT/openapi.json
