# Bulk Image Downloader: every image on a page, as files or ZIP (`opstoolkit/bulk-image-downloader`) Actor

Give it web page URLs or image links, get every image as ZIP files or single files, plus a table with size, format, alt text and source. Reads img, lazy-load, srcset, og:image, CSS and JSON-LD. Filters by size and format. $0.01 per page that yields images.

- **URL**: https://apify.com/opstoolkit/bulk-image-downloader.md
- **Developed by:** [Elio Saliba](https://apify.com/opstoolkit) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 address processeds

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 Downloader: every image on a page, as files or ZIP

Give it a list of web pages or direct image links and get every image back as ZIP files, single files or both. For each web page it finds every image and saves it. For each image link it saves that file. A table lists the size, format, alt text and original address of every image.

Built for people who move or reuse pictures in bulk: site migrations, product catalogs, design reference, archives, datasets and audits of what a page really loads.

**$0.01 per web page or image link that yields images.** Pages with no images, failed downloads and invalid addresses are free. Apify's free monthly credit covers a first test run at no cost.

### What you get

One row per image found, plus one row per address that gave nothing, with the reason.

| Column | Example | Notes |
|---|---|---|
| `status` | `saved` | `saved`, `skipped`, `failed`, `no_images`, `blocked_by_robots_txt`, `limit_reached`, `invalid_input` or `not_processed` (the run reached your max cost per run before this address) |
| `imageUrl` | `https://upload.wikimedia.org/.../Siam_lilacpoint.jpg` | Where the image came from |
| `source` | `https://en.wikipedia.org/wiki/Cat` | The address you gave |
| `foundIn` | `og:image` | `img`, `img data-src`, `img srcset`, `picture srcset`, `og:image`, `css background`, `json-ld`, `link to image`, `video poster`, `direct image address` |
| `alt` | `Siamese cat` | The alt text, when the page has one |
| `format` / `width` / `height` | `jpeg` / `982` / `1000` | Read from the file |
| `bytes` | `647001` | |
| `sha256` | `9c121e61...` | Fingerprint of the file |
| `zipFile` / `zipPath` / `zipUrl` | `images-1.zip` / `en.wikipedia.org_wiki_Cat/Siam_lilacpoint.jpg` | Where it sits in the ZIP |
| `fileKey` / `fileUrl` | `img-019dafad....jpg` | Single file with a public link, when you ask for single files |
| `reason` | `smaller than 50x50 pixels` | Why a row was skipped or failed |

The ZIP files and single files are in the run's key-value store. The `SUMMARY` record has the counts and the links to every ZIP.

### How to use

1. **Paste addresses**, one per line. A web page gives you every image on it. A link that ends in `.jpg`, `.png` or similar gives you that image.
2. **Pick how to save.** ZIP files are the default. Choose single files if you need a link for each image.
3. **Press Start.** Open the ZIP links in the `SUMMARY` record, or the table in the dataset.

### Use it from an AI agent

In Claude, ChatGPT or Cursor, add the Apify MCP server (https://mcp.apify.com) and let the agent call this Actor (`opstoolkit/bulk-image-downloader`). It needs only `urls`. Ask for single files if the agent needs a link to each image, because the default is ZIP only.

Example prompt: "Download every image wider than 400 pixels from https://example.com/gallery, save them as single files and ZIP, and list each image with its alt text."

### Input example

```json
{
  "urls": ["https://en.wikipedia.org/wiki/Cat", "https://www.python.org/static/img/python-logo.png"],
  "saveAs": "zip",
  "maxImagesPerUrl": 50,
  "minWidth": 200,
  "minHeight": 200,
  "allowedFormats": ["jpeg", "png", "webp"]
}
```

Other things you can set:

- **Smallest size.** Images under 50 by 50 pixels are skipped by default, which drops tracking pixels and tiny icons. Set 0 to keep everything.
- **Formats.** JPEG, PNG, GIF, WebP, SVG, AVIF, BMP, TIFF. ICO (favicons) is off by default.
- **Skip identical files.** On by default. A picture used on five pages is saved once, and the other rows point to it.
- **Same site only.** Skip images that load from another domain, such as a CDN.
- **Largest single image.** 15 MB by default. Larger files are refused before the full download.
- **ZIP size.** A new ZIP starts at about 25 MB. Many parts are fine, and each one is its own download.

### Real results

From real runs (a page can look different on another day):

| Address | Saved | Skipped | Notes |
|---|---|---|---|
| `https://en.wikipedia.org/wiki/Cat` | 25 (the cap) | 12 | Images from `upload.wikimedia.org`, stopped at `maxImagesPerUrl` |
| `https://apify.com` | 25 (the cap) | 34 | Most skips are icons under 50 by 50 pixels |
| `https://www.python.org/static/img/python-logo.png` | 1 | 0 | Direct link, 580 by 164 PNG |
| `https://example.com` | 0 | 0 | `no_images`, free |

A cloud run on these 4 addresses saved 51 images (1.9 MB) in 5 seconds.

One row, shortened:

```json
{
  "source": "https://en.wikipedia.org/wiki/Cat",
  "status": "saved",
  "imageUrl": "https://upload.wikimedia.org/wikipedia/commons/2/25/Siam_lilacpoint.jpg",
  "foundIn": "og:image",
  "format": "jpeg",
  "width": 982,
  "height": 1000,
  "bytes": 647001,
  "zipFile": "images-1.zip",
  "zipPath": "en.wikipedia.org_wiki_Cat/Siam_lilacpoint.jpg"
}
```

### Where it looks for images

The markup the server sends to every visitor:

- `<img src>` and the lazy-load attributes `data-src`, `data-lazy-src`, `data-original` and similar
- `srcset` and `<picture><source>`, where it takes the largest version of each picture
- `og:image`, `twitter:image` and `image_src` preview tags
- Links to image files, such as a thumbnail that links to the full-size image
- Inline `style="background-image:url(...)"` and `<style>` blocks
- `image`, `logo` and `thumbnailUrl` fields in JSON-LD
- `<video poster>`

Images inside data URIs (small inline pictures) are not downloaded.

### Use cases

- **Site migration.** Pull every image off the old site before it goes down.
- **Product catalogs.** Save the pictures from a list of your own product pages.
- **Content audits.** See which images a page loads, how big they are, and which have no alt text.
- **Design reference and datasets.** Collect pictures from pages you have the right to use.
- **Image link lists.** Turn a spreadsheet column of image links into one ZIP.

Check that you may use the pictures you download. This Actor saves what a page serves to every visitor. It does not tell you who owns it.

### Pricing

Pay per event: **$0.01 per address that yields at least one saved image** ($10 per 1,000). Apify adds a small fee for each run start.

| Addresses | Cost |
|---|---|
| 100 | $1 |
| 1,000 | $10 |

An address that yields 5 images costs the same as one that yields 50, up to your `maxImagesPerUrl`. Pages with no images, 404 pages, blocked pages and invalid addresses are free, and they still appear in the table with a reason. Set a max cost per run in the Apify run options to cap spending. The Actor starts an address only when the budget can still pay for it, so it never saves images you are not charged for, and the addresses left over are listed as `not_processed`, free.

**Compared with other options.** The most used bulk image downloader on the Store charges $0.07 per address on Apify's free plan and $0.02 on the first paid plan, and its runs default to 4 GB of memory on top. This one is $0.01 on every plan, with the platform usage included, and runs on 512 MB.

### How it treats other people's servers

- It follows robots.txt for every page and every image, including each redirect. A site that disallows an address gets a `skipped` or `blocked_by_robots_txt` row, free.
- At most 4 downloads at once from any one website.
- It sends a plain User-Agent that names the tool, and the page address as the referrer, as a browser does.
- No login, no cookies, no proxies, no CAPTCHA solving. If a site blocks it, the row says so.
- Addresses that are not on the public internet are refused.

### Limits

- It reads the HTML the server sends. It does not run JavaScript. Pages that build their image list in the browser, such as infinite scrolls and many single-page apps, show few or no images. Those rows say `no_images`.
- Images that a site protects with a login, a token or hotlink checks beyond the referrer are not saved.
- Inline data URIs and CSS in separate files are not read.
- Up to 200 images per address per run (50 by default), up to 10,000 addresses per run.
- Each ZIP part is at most 50 MB (25 MB by default), so a run never needs more than 512 MB. Big runs make many parts.
- The picture's license is not checked.

### Works well with

- **[Sitemap URL Extractor](https://apify.com/opstoolkit/sitemap-url-extractor)**: list the pages of a site, then pass the ones you want here to pull their images.
- **[Image and Scanned PDF OCR](https://apify.com/opstoolkit/image-pdf-ocr)**: set `saveAs` to `both` so each image has a public link, then read the text in banners, scans and screenshots.
- **[AI Structured Data Extractor](https://apify.com/opstoolkit/ai-structured-extractor)**: pull product names and prices from the same pages as JSON, and match them to the images by page address.
- **[Dataset Cleaner](https://apify.com/opstoolkit/dataset-cleaner)**: tidy the combined table: remove duplicates and fix fields before you export it.

### Integrations

Everything Apify supports works here: schedules, webhooks, the REST API, and the official integrations with Zapier, Make, n8n and Google Sheets. The **API** tab on this page has ready code for JavaScript, Python and cURL.

### FAQ

**Why did a page give me only a few images?**
Usually the images load through JavaScript after the page opens, or most are under the minimum size. Check the `skipped` rows for the reason, and try `minWidth: 0`.

**Can I get the original size and not the thumbnail?**
It takes the largest `srcset` version and follows links from thumbnails to the full image. It cannot guess a bigger version of an address.

**Single files or ZIP?**
ZIP is faster and the default. Choose single files when another tool needs a link to each image.

**Something broke.**
Open an issue on the Issues tab with the run link. I reply within a day.

# Changelog

This Actor's version history is a separate document: https://apify.com/opstoolkit/bulk-image-downloader/changelog.md

# Actor input Schema

## `urls` (type: `array`):

Web pages or image links, one address per line, for example https://example.com/gallery or https://example.com/logo.png. A web page gives you every image on it. A direct link to an image file gives you that image. Each address that yields at least one image counts as one charged URL. Up to 10,000 per run.

## `saveAs` (type: `string`):

How to save the images: zip (default, ZIP files only, fastest), both (ZIP files and single files) or files (single files only). Single files give every image its own public link but take longer to write.

## `maxImagesPerUrl` (type: `integer`):

Most images to save from one address, 1 to 200, default 50. Many pages hold hundreds of small images, so set the number you need. The price per address stays the same.

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

Size in MB at which a new ZIP file starts, 10 to 50, default 25. Many smaller ZIP files are fine, each one is its own download.

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

Skip images narrower than this many pixels, 0 to 20000, default 50. The default drops tracking pixels and tiny icons. Set 0 to keep everything. SVG files without a stated size are never skipped.

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

Skip images shorter than this many pixels, 0 to 20000, default 50. Set 0 to keep everything.

## `allowedFormats` (type: `array`):

Optional list of image formats to keep, for example \["jpeg", "png", "webp"]. Allowed values: jpeg, png, gif, webp, svg, avif, bmp, ico, tiff. Leave empty to keep every format except ico (favicons).

## `includeSrcset` (type: `boolean`):

true (default) downloads only the largest version of each picture that a page lists in several sizes (srcset). false ignores srcset and uses only the plain src of each image.

## `skipDuplicates` (type: `boolean`):

true (default) saves the same picture once, even when it appears on several pages or under several addresses. The other rows say which file it matches. false saves every copy.

## `sameSiteOnly` (type: `boolean`):

true skips images served from other domains. Default false, because many sites host pictures on a CDN with a different name.

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

Largest single image to save, in MB, 1 to 100, default 15. Bigger images are skipped before they are downloaded in full.

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

How many images to download at the same time, 1 to 50, default 10. A single website never gets more than 4 at once.

## Actor input object example

```json
{
  "urls": [
    "https://crawlee.dev",
    "https://www.python.org/downloads/"
  ],
  "saveAs": "zip",
  "maxImagesPerUrl": 50,
  "zipPartSizeMb": 25,
  "minWidth": 50,
  "minHeight": 50,
  "includeSrcset": true,
  "skipDuplicates": true,
  "sameSiteOnly": false,
  "maxFileSizeMb": 15,
  "maxConcurrency": 10
}
```

# Actor output Schema

## `images` (type: `string`):

No description

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

No description

## `files` (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 = {
    "urls": [
        "https://crawlee.dev",
        "https://www.python.org/downloads/"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("opstoolkit/bulk-image-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 = { "urls": [
        "https://crawlee.dev",
        "https://www.python.org/downloads/",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("opstoolkit/bulk-image-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 '{
  "urls": [
    "https://crawlee.dev",
    "https://www.python.org/downloads/"
  ]
}' |
apify call opstoolkit/bulk-image-downloader --silent --output-dataset

```

## MCP server setup

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