# Bulk Image Downloader (URLs or Pages → Files + ZIP) (`scraper-forge/bulk-image-downloader`) Actor

Download images in bulk from a list of image URLs or straight from web pages. Size and format filters, duplicate removal, dimensions and a public link per image, plus one ZIP of everything.

- **URL**: https://apify.com/scraper-forge/bulk-image-downloader.md
- **Developed by:** [Scraper Forge](https://apify.com/scraper-forge) (community)
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $70.00 / 1,000 images

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: URLs or Pages → Files + ZIP

Download images **in bulk** from a list of image links, or straight from web pages, and get **a public link for every image plus one ZIP with everything**.

### Features

- 🔗 **Two inputs**: direct image URLs and/or pages to grab images from
- 🖼️ **Smart page extraction**: `<img>`, lazy-loaded `data-src`, the **largest `srcset` size**, `<picture>` sources, Open Graph / Twitter images
- 📏 **Filters**: minimum width/height (drop icons and tracking pixels), allowed formats (jpg, png, webp, gif, svg, avif…)
- ♻️ **Duplicate removal by content** (SHA-256), even when the same image lives at different URLs
- 🗜️ **One `images.zip`** with every file, ready to download (up to 400 MB per run)
- 📋 Per image: width, height, format, size, hash, original URL and source page
- ⚡ Parallel downloads; broken links are listed with the reason and **never charged**

### Use cases

- E-commerce: pull product photos from supplier pages or a URL list
- AI / ML: build image datasets from page lists
- Design & marketing: collect brand assets and campaign visuals
- Backups and migrations of a site's media

### Input example

```json
{
  "imageUrls": [{ "url": "https://example.com/photo.jpg" }],
  "pageUrls": [{ "url": "https://en.wikipedia.org/wiki/Cat" }],
  "minWidth": 300,
  "formats": ["jpg", "png", "webp"],
  "createZip": true
}
```

### Output

Dataset, one row per image:

```json
{
  "imageUrl": "https://upload.wikimedia.org/…/Cat_poster.jpg",
  "sourcePage": "https://en.wikipedia.org/wiki/Cat",
  "downloadUrl": "https://api.apify.com/v2/key-value-stores/…/records/00003-Cat_poster.jpg",
  "format": "jpg",
  "width": 1200,
  "height": 800,
  "sizeBytes": 245112,
  "sha256": "3b1f…"
}
```

Plus `images.zip` and a `RUN_SUMMARY` (downloaded / filtered / failed) in the run's storage. The **All images (ZIP)** link appears in the Output tab.

### FAQ

**Does it render JavaScript?** No. Images injected only by JavaScript after load won't be found from pages; pass their direct URLs instead.

**Is it legal?** You are responsible for having the right to download and use the images (copyright, licenses).

# Actor input Schema

## `imageUrls` (type: `array`):

Direct links to images (jpg, png, webp, gif, svg, avif…).

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

Web pages whose images should be downloaded (img, srcset in the largest size, picture sources, og:image).

## `maxImages` (type: `integer`):

Stop after this many images are saved.

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

Skip smaller images (icons, tracking pixels). 0 = no limit.

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

0 = no limit.

## `formats` (type: `array`):

Leave empty for all formats.

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

Skip identical images (same content), even under different URLs.

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

One images.zip with everything (up to 400 MB in total).

## `concurrency` (type: `integer`):

How many images to download at once.

## Actor input object example

```json
{
  "imageUrls": [
    {
      "url": "https://upload.wikimedia.org/wikipedia/commons/a/a9/Example.jpg"
    }
  ],
  "pageUrls": [
    {
      "url": "https://en.wikipedia.org/wiki/Cat"
    }
  ],
  "maxImages": 1000,
  "minWidth": 0,
  "minHeight": 0,
  "skipDuplicates": true,
  "createZip": true,
  "concurrency": 10
}
```

# Actor output Schema

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

One row per image with a download link.

## `zip` (type: `string`):

Every downloaded image in one ZIP file.

## `runSummary` (type: `string`):

Downloaded, filtered and failed counts.

# 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 = {
    "imageUrls": [
        {
            "url": "https://upload.wikimedia.org/wikipedia/commons/a/a9/Example.jpg"
        }
    ],
    "pageUrls": [
        {
            "url": "https://en.wikipedia.org/wiki/Cat"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("scraper-forge/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 = {
    "imageUrls": [{ "url": "https://upload.wikimedia.org/wikipedia/commons/a/a9/Example.jpg" }],
    "pageUrls": [{ "url": "https://en.wikipedia.org/wiki/Cat" }],
}

# Run the Actor and wait for it to finish
run = client.actor("scraper-forge/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 '{
  "imageUrls": [
    {
      "url": "https://upload.wikimedia.org/wikipedia/commons/a/a9/Example.jpg"
    }
  ],
  "pageUrls": [
    {
      "url": "https://en.wikipedia.org/wiki/Cat"
    }
  ]
}' |
apify call scraper-forge/bulk-image-downloader --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scraper-forge/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/lme2Glfv7GGkJNbGP/builds/8nhg1F0b9b1iQSOfN/openapi.json
