# Bulk Image Downloader & Converter — Resize, WebP, ZIP (`tidydata/bulk-image-downloader-converter`) Actor

Download images in bulk from image URLs or whole web pages. Optionally resize, compress and convert to JPG, PNG or WebP (HEIC and AVIF input supported), dedupe, filter small icons and get one ZIP. Public link, size and dimensions per image. Failed images are free.

- **URL**: https://apify.com/tidydata/bulk-image-downloader-converter.md
- **Developed by:** [tidydata](https://apify.com/tidydata) (community)
- **Categories:** Developer tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.60 / 1,000 image saveds

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 Downloader & Converter — resize, compress, WebP, ZIP

Download **images in bulk** from a list of image URLs **or whole web pages**, and get every file back with a **public download link**, its size and dimensions. Optionally **resize, compress and convert** everything to **JPG, PNG or WebP** in the same run, and bundle it all in **one ZIP**.

- ✅ **Image URLs or web pages**: pages are scanned for `<img>`, `srcset` (the largest version is picked), lazy-loaded images, `og:image` and links to image files
- ✅ **Convert** to JPG, PNG or WebP — reads JPG, PNG, WebP, GIF, BMP, TIFF, **HEIC (iPhone)** and **AVIF**
- ✅ **Resize** to a max width/height (aspect ratio kept, never upscaled) and **compress** with a quality setting
- ✅ **Remove EXIF/GPS metadata** for privacy (photos are rotated upright first)
- ✅ **Skip icons and tracking pixels** with a minimum width/height
- ✅ **Dedupe** identical images (SHA-256)
- ✅ **One ZIP** with everything, optional
- ✅ **You only pay for images saved.** Failed, skipped and duplicate images are free.

### How to use it

1. Paste **image URLs** or **page URLs** (one per line, or upload a list / use a dataset from another Actor).
2. Pick an **output format** (keep *Original* to just download), and optionally a **max width/height** and **quality**.
3. Run. Each image becomes one row in the dataset with a `fileUrl` you can open, embed or download. Turn on **Create ZIP** to get `images.zip` too (link in the Output tab and run log).

### Output example

```json
{
  "sourceUrl": "https://en.wikipedia.org/wiki/Photography",
  "pageUrl": "https://en.wikipedia.org/wiki/Photography",
  "status": "saved",
  "key": "00002-Nicephore-Niepce-View-from-the-Window-at-Le-Gras.webp",
  "fileUrl": "https://api.apify.com/v2/key-value-stores/…/records/00002-….webp",
  "format": "webp",
  "width": 800,
  "height": 643,
  "bytes": 61240,
  "originalFormat": "jpg",
  "originalWidth": 1000,
  "originalHeight": 804,
  "originalBytes": 154989,
  "sha256": "fb60a65f79804a32e387e040d657231021c473532899241a2db0c4be8f20bb51",
  "error": null
}
```

Images that can't be saved get a row with `status: "failed"` or `"skipped"` and the reason in `error` (broken link, not an image, too small, duplicate, too big). **You are not charged for them.**

### Use cases

- 🛒 **E-commerce** — download your product photos from your own store or supplier feeds and convert them to WebP at a fixed size.
- 🤖 **Datasets for AI / ML** — collect, dedupe and normalise images to one format and size.
- 🌐 **Web performance** — turn heavy JPG/PNG into light WebP for your site.
- 📱 **iPhone HEIC to JPG** in bulk.
- 🗄️ **Backups and migrations** — move a media library from one platform to another, with a ZIP.
- 🔗 **Automations** — chain it after any scraper that outputs image URLs (Make, Zapier, n8n, API).

### Pricing

Pay per image saved. Failed, skipped and duplicate images are free. Set **Max images in total** to cap the cost of a run.

### Good to know

- Files are stored in the run's key-value store and follow your Apify data retention settings; download them or the ZIP before they expire.
- SVG (vector) images are kept as they are with *Original* format; they can't be converted to bitmaps.
- Pages that build their images with JavaScript after loading may show fewer images; in that case pass the image URLs directly (for example from another scraper's output).
- **Only download images you have the right to use.** This tool fetches the URLs you provide; copyright and terms of use of the source sites remain your responsibility.

# Actor input Schema

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

Direct image URLs and/or web page URLs. Pages are scanned for images (img, srcset, lazy-loaded images, og:image and links to image files). Detected automatically.

## `outputFormat` (type: `string`):

Keep the original file untouched, or convert every image to the same format.

## `maxWidth` (type: `integer`):

Shrink images wider than this, keeping the aspect ratio. Images are never upscaled. Leave empty to keep the size.

## `maxHeight` (type: `integer`):

Shrink images taller than this, keeping the aspect ratio. Leave empty to keep the size.

## `quality` (type: `integer`):

Compression quality 1-100. 80-85 is visually lossless for most photos and much smaller.

## `stripMetadata` (type: `boolean`):

When an image is converted or resized, drop EXIF/GPS data (orientation is applied first, so photos stay upright).

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

Skip images narrower than this (useful to ignore icons, logos and tracking pixels when scanning pages). Skipped images are free.

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

Skip images shorter than this. Skipped images are free.

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

Bundle all saved images into images.zip in the key-value store (link in the run log and output).

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

Skip images whose content is identical to one already saved (SHA-256). Duplicates are free.

## `maxImagesPerPage` (type: `integer`):

Only the first N images found on each web page are downloaded.

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

Stop after saving this many images (protects your budget).

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

Images bigger than this are skipped.

## Actor input object example

```json
{
  "urls": [
    {
      "url": "https://upload.wikimedia.org/wikipedia/commons/a/a9/Example.jpg"
    },
    {
      "url": "https://en.wikipedia.org/wiki/Photography"
    }
  ],
  "outputFormat": "original",
  "quality": 85,
  "stripMetadata": true,
  "minWidth": 0,
  "minHeight": 0,
  "createZip": false,
  "dedupe": true,
  "maxImagesPerPage": 200,
  "maxImages": 1000,
  "maxFileSizeMb": 30
}
```

# Actor output Schema

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

One row per image with its public download link, format, dimensions and size.

## `files` (type: `string`):

All saved image files, plus images.zip when enabled.

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

// Run the Actor and wait for it to finish
const run = await client.actor("tidydata/bulk-image-downloader-converter").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": [
        { "url": "https://upload.wikimedia.org/wikipedia/commons/a/a9/Example.jpg" },
        { "url": "https://en.wikipedia.org/wiki/Photography" },
    ] }

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,tidydata/bulk-image-downloader-converter"
        }
    }
}
```

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/Nuwo6dfhWcFilc8Nu/builds/tGtPtOS38BLvXfbhF/openapi.json
