# Image Scraper — Download All Images from Any Website (`actor-forge/image-scraper`) Actor

Scrape and download every image from the web pages and image URLs you list (not a Google Images search): img, srcset, lazy-loaded, CSS backgrounds, og:image. Size and format filters, dedupe, ZIP, direct download links. $3 per 1,000 images.

- **URL**: https://apify.com/actor-forge/image-scraper.md
- **Developed by:** [ActorForge](https://apify.com/actor-forge) (community)
- **Categories:** Developer tools, Automation, E-commerce
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 image results

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

## Image Scraper — Download All Images from Any Website

Scrape and download every image from the web pages and image URLs you list (not a Google Images search): img, srcset, lazy-loaded, CSS backgrounds, og:image. Size and format filters, dedupe, ZIP, direct download links. $3 per 1,000 images.

**Scrape and download every image from the web pages and image URLs you list. This is not a Google Images search:** you give it the pages or sites, and it collects their images. For each page it finds every image in the HTML: `<img>` tags, the **largest size from srcset** (one file per picture), lazy-loaded images (`data-src` and friends), `<picture>` sources, video posters, og:image / Twitter previews, favicons, linked full-size gallery images and **CSS backgrounds**. Direct image URLs are downloaded as they are. Each image is saved with a **direct download link**, its real **format (sniffed from the file), width, height, file size, SHA-256, alt text and source page**. Images narrower than 100 px (icons, spacers) and duplicates are skipped by default, and never charged; **filter by width, height, file size or format**, and optionally get everything as **ZIP files**. Use it for website migrations and backups, image datasets for machine learning, product images for e-commerce catalogues, SEO and alt-text audits, competitor creative research, or as an image tool for AI agents. You pay per image saved, not per URL: **$3 per 1,000 images**. Filtered, duplicate and failed images are never charged.

### What data does it return?

Every run outputs clean, schema-validated rows like these:

| fileName | format | width | height | bytes | foundIn | pageUrl |
| --- | --- | --- | --- | --- | --- | --- |
| 00006-500px-NJ_LBI_Lighthouse_04.jpg | jpeg | 500 | 375 | 34802 | srcset | https://en.wikipedia.org/wiki/Lighthouse |
| 00008-500px-Torre_de_He-rcules_2023.jpg | jpeg | 500 | 750 | 81015 | srcset | https://en.wikipedia.org/wiki/Lighthouse |
| 00001-1.sm.webp | webp | 320 | 214 | 10474 | direct |  |

### How much does it cost?

Transparent pay-per-event pricing — you only pay for what you get, and the
actor **always respects your run budget**: set a maximum total charge and it
stops cleanly at the cap instead of overrunning.

| Event | Price | Charged | Worked example |
| --- | --- | --- | --- |
| `image-result` | $0.003 | per image saved (metadata and ZIP included at no extra cost) | 100 images = $0.30; 1,000 images = $3.00; a page with 40 images = $0.12 |
| `file-downloaded` | $0.002 | per file saved in Any files mode (type detection, SHA-256 and ZIP included) | 100 PDFs of 2 MB = $0.20 + $0.10 transfer = $0.30 |
| `transfer-10mb` | $0.001 | per started 10 MB of each file saved in Any files mode | a 3 MB file = 1 event ($0.001); a 95 MB video = 10 events ($0.01) |
| `apify-actor-start` | $0.00005 | per run per GB of memory (platform start fee) | One run at 1 GB = $0.00005 |

### Input options

| Field | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `mode` | string | no | `"images"` | Images (default): scan pages for every image (img, srcset, lazy, CSS…) and download direct image URLs. Any files: download other file types (PDF, ZIP, CSV, DOCX, MP3…) from a URL list or page links; for type filters and size caps use Bulk File Downloader. Billing differs per mode, see Pricing. |
| `urls` | array | yes | — | Web pages to scrape all images from, and/or direct image URLs (mix freely). This is not a search: give the pages or sites whose images you want. Each page's static HTML is scanned; images added only by JavaScript aren't found. |
| `includeSrcset` | boolean | no | `true` | When an image offers several sizes (srcset), download the largest instead of the default src. One file per picture either way. |
| `includeCssBackgrounds` | boolean | no | `true` | Also download images set as CSS backgrounds in style attributes and \<style> blocks. |
| `includeLinkedImages` | boolean | no | `true` | Also download images that links point to (e.g. a gallery thumbnail linking to the full-size photo). |
| `includeMetaImages` | boolean | no | `true` | Also download og:image / twitter:image previews, favicons and apple-touch icons. |
| `formats` | array | no | `[]` | Only keep these formats (detected from the file itself, not the URL). Empty = all. |
| `minWidth` | integer | no | `100` | Skip images narrower than this. Default 100 drops icons and spacers; set 0 to keep everything. Skipped images are not charged. |
| `minHeight` | integer | no | `0` | Skip images shorter than this. Skipped images are not charged. |
| `minFileSizeKb` | number | no | `0` | Skip files smaller than this. Skipped files are not charged. |
| `maxFileSizeMb` | number | no | — | Skip files larger than this (up to 500 MB). Empty = 25 MB in image mode, 100 MB in file mode. |
| `skipDuplicates` | boolean | no | `true` | Skip files whose content (SHA-256) is identical to one already downloaded, even from different URLs. Duplicates are not charged. |
| `maxImages` | integer | no | `500` | Stop after saving this many images in total. |
| `maxImagesPerPage` | integer | no | `0` | Cap candidates taken from each page (0 = no cap). |
| `createZip` | boolean | no | `false` | Bundle everything into ZIP file(s) of up to 200 MB each. Links are in the run's OUTPUT record. No extra charge. |
| `respectRobotsTxt` | boolean | no | `true` | Skip pages that the site's robots.txt disallows for crawlers. |

### Limits & honest notes

- Not an image search engine: it does not search Google Images, Bing or stock sites. It downloads images from the pages and URLs you give it.
- Pages are scanned as static HTML without a browser, which is fast and cheap. Images inserted only by JavaScript (infinite-scroll galleries, some single-page apps) are not found. Pass those image URLs directly instead.
- Pages disallowed by the site's robots.txt are skipped by default (you can turn this off). If a site's robots.txt can't be fetched (HTTP 5xx or a network error, after one retry), all of that site's pages are skipped (RFC 9309), each with a free error row. Login-protected pages are not supported.
- Images over the maximum file size (default 25 MB, up to 500 MB) are skipped. ZIP files are split into parts of up to 200 MB.
- Formats: JPEG, PNG, GIF, WebP, AVIF, SVG, BMP, ICO, TIFF and HEIC, detected from the file bytes, so mislabelled files are handled correctly.
- Download links work for the lifetime of the run's storage (Apify's default retention for your plan).
- Only download images you have the right to use. Most images on the web are copyrighted.
- Internal and private network addresses are always refused, including through redirects or DNS tricks.
- Respects your run budget: set a maximum total charge and the actor stops cleanly at the cap.

### Related ActorForge actors

- [Bulk Image Downloader](https://apify.com/actor-forge/bulk-image-downloader) — the same engine, no default size filter
- [Bulk File Downloader](https://apify.com/actor-forge/bulk-file-downloader) — PDFs, ZIPs, CSVs and media with type filters
- [Image Converter & Compressor](https://apify.com/actor-forge/image-converter) — convert and compress what you download

### Changelog

- **2026-10-22** — Initial release of the Image Scraper listing: the Bulk Image Downloader engine with a 100 px minimum width, duplicate skipping and a 500-image cap by default.

***

*Built and maintained by **ActorForge**. Reliability first: every actor in the
portfolio is monitored by an automated nightly self-test, and breakages are
typically fixed the same day.*

# Actor input Schema

## `mode` (type: `string`):

Images (default): scan pages for every image (img, srcset, lazy, CSS…) and download direct image URLs. Any files: download other file types (PDF, ZIP, CSV, DOCX, MP3…) from a URL list or page links; for type filters and size caps use Bulk File Downloader. Billing differs per mode, see Pricing.

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

Web pages to scrape all images from, and/or direct image URLs (mix freely). This is not a search: give the pages or sites whose images you want. Each page's static HTML is scanned; images added only by JavaScript aren't found.

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

When an image offers several sizes (srcset), download the largest instead of the default src. One file per picture either way.

## `includeCssBackgrounds` (type: `boolean`):

Also download images set as CSS backgrounds in style attributes and <style> blocks.

## `includeLinkedImages` (type: `boolean`):

Also download images that links point to (e.g. a gallery thumbnail linking to the full-size photo).

## `includeMetaImages` (type: `boolean`):

Also download og:image / twitter:image previews, favicons and apple-touch icons.

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

Only keep these formats (detected from the file itself, not the URL). Empty = all.

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

Skip images narrower than this. Default 100 drops icons and spacers; set 0 to keep everything. Skipped images are not charged.

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

Skip images shorter than this. Skipped images are not charged.

## `minFileSizeKb` (type: `number`):

Skip files smaller than this. Skipped files are not charged.

## `maxFileSizeMb` (type: `number`):

Skip files larger than this (up to 500 MB). Empty = 25 MB in image mode, 100 MB in file mode.

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

Skip files whose content (SHA-256) is identical to one already downloaded, even from different URLs. Duplicates are not charged.

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

Stop after saving this many images in total.

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

Cap candidates taken from each page (0 = no cap).

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

Bundle everything into ZIP file(s) of up to 200 MB each. Links are in the run's OUTPUT record. No extra charge.

## `respectRobotsTxt` (type: `boolean`):

Skip pages that the site's robots.txt disallows for crawlers.

## Actor input object example

```json
{
  "mode": "images",
  "urls": [
    "https://en.wikipedia.org/wiki/Lighthouse"
  ],
  "includeSrcset": true,
  "includeCssBackgrounds": true,
  "includeLinkedImages": true,
  "includeMetaImages": true,
  "formats": [],
  "minWidth": 200,
  "minHeight": 0,
  "minFileSizeKb": 0,
  "skipDuplicates": true,
  "maxImages": 3,
  "maxImagesPerPage": 0,
  "createZip": false,
  "respectRobotsTxt": true
}
```

# Actor output Schema

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

One row per downloaded image with a direct download link, dimensions, format, size and source page.

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

Counts of saved and skipped images and, when createZip is on, download links for the ZIP file(s).

# 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://en.wikipedia.org/wiki/Lighthouse"
    ],
    "minWidth": 200,
    "maxImages": 3
};

// Run the Actor and wait for it to finish
const run = await client.actor("actor-forge/image-scraper").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://en.wikipedia.org/wiki/Lighthouse"],
    "minWidth": 200,
    "maxImages": 3,
}

# Run the Actor and wait for it to finish
run = client.actor("actor-forge/image-scraper").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://en.wikipedia.org/wiki/Lighthouse"
  ],
  "minWidth": 200,
  "maxImages": 3
}' |
apify call actor-forge/image-scraper --silent --output-dataset

```

## MCP server setup

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

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/dfRspf5MkRBFqDeqh/builds/I1G1mJcfHqVV7ov0s/openapi.json
