# Website Image Extractor and Downloader (`greenrun/website-image-downloader`) Actor

List every image on public web pages (img, srcset, Open Graph) with size and alt text, filter by size or format, and optionally download them with a ZIP. robots.txt respected for pages and images, no proxies. Blocked and failed pages are free.

- **URL**: https://apify.com/greenrun/website-image-downloader.md
- **Developed by:** [Greenrun](https://apify.com/greenrun) (community)
- **Features:** 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 pages

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

## Website Image Extractor and Downloader

List every image on public web pages (img, srcset, Open Graph) with size and alt text, filter by size or format, and optionally download them with a ZIP. robots.txt respected for pages and images, no proxies. Blocked and failed pages are free.

Give it a list of web pages and get **every image with its URL, alt text, size, format and where on the page it comes from** (img, srcset, picture, Open Graph, Twitter card, video poster, link to a full-size photo, inline CSS background). Use the list as it is for an **alt text audit** or a content inventory, or switch on downloading to get **every image stored in your run with its real size, format and SHA-256, plus an optional ZIP**. **You pay per page with images and per image stored; pages that are not found, blocked or have no images are free, and so are images that fail or are filtered out.**

### What it does

- **Lists** images from `<img>` (src, srcset and lazy-load attributes such as `data-src`), `<picture>` sources, `og:image` and `twitter:image`, video posters, links to image files and inline `background-image` styles; icons and `data:` images on request.
- **Picks the largest version** of responsive images from srcset and picture sources, so you get the full-resolution file, not a thumbnail.
- **Reports the alt text** of every image: missing (`hasAlt: false`), empty (decorative) or the text itself, ready for accessibility and SEO checks.
- **Filters** by width, height and format (jpeg, png, webp, gif, svg, avif, ico ...).
- **Downloads** on request into the run's key-value store, measures the real width and height from the file, and stores identical images once.
- **Packs a ZIP** (`images.zip`) with every stored image and a `manifest.csv`.

### Why use it

- **Cheap alt text audit.** Listing costs one page event, however many images the page has; no image is downloaded unless you ask.
- **Pay only for results.** Pages that are not found, blocked or have no image are free; images that are filtered, too small, duplicate, blocked by robots.txt or fail to download are free, each with the reason in `error`.
- **Full-size images.** The largest srcset or picture candidate and the target of gallery links, instead of the small thumbnail in `src`.
- **Respectful.** robots.txt is checked for every page and every image host, Crawl-delay is kept. No proxies, no CAPTCHA solving, no login.
- **Built for AI agents.** One clear status message, a predictable price, and limited permissions, so it works as a tool in the Apify MCP server.

### How to use

#### In Apify Console

1. Paste the pages into **Web pages**, one per line.
2. To keep only real photos, set **Min width (px)**, for example 300. To list only some formats, fill **Only these formats**.
3. To save the files, switch on **Download the images** (and **Also create one ZIP** if you want one archive).
4. Press **Start**. The **Images** view shows thumbnails, alt text and sizes; the **Alt text audit** view shows what is missing.

#### From an AI agent (MCP)

Connect any MCP client to the Apify MCP server with only this Actor as a tool:

```
https://mcp.apify.com?tools=greenrun/website-image-downloader
```

#### Through the API

```bash
curl -X POST "https://api.apify.com/v2/acts/greenrun~website-image-downloader/run-sync-get-dataset-items?unwind=images" \
  -H "Authorization: Bearer <APIFY_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"urls": ["https://www.python.org", "https://docs.apify.com"], "minWidth": 100}'
```

### Input

| Field | Default | Description |
|---|---|---|
| `urls` | | Public web pages, one per line. |
| `downloadImages` | `false` | Also download every listed image into the key-value store. |
| `zip` | `false` | With downloading on: pack the stored images into `images.zip` with `manifest.csv`. |
| `minWidth`, `minHeight` | `0` | Skip smaller images: HTML sizes when listing (unknown sizes pass), real sizes when downloading. |
| `formats` | all | Keep only these formats, for example `jpeg`, `png`, `webp`. |
| `maxImagesPerPage` | `500` | Stop listing a page after this many images (1-10000). |
| `includeMetaImages` | `true` | List `og:image` and `twitter:image`. |
| `includeLinkedImages` | `true` | List links that point to image files. |
| `includeCssBackgrounds` | `true` | List inline `background-image` styles. |
| `includeIcons` | `false` | List favicons and touch icons. |
| `includeInlineImages` | `false` | List `data:` images (shortened, never downloaded). |
| `largestFromSrcset` | `true` | Use the largest srcset or picture candidate. |
| `maxImageSizeMb` | `20` | When downloading, larger images are skipped for free (1-500). |
| `maxConcurrency` | `5` | Pages read at the same time (1-20). |

### Output

One page item from a run on the Apify platform on 19 November 2026 (4 pages, downloading on, `minWidth` 50, ZIP on; signatures in `fileUrl` shortened):

```json
{
  "pageUrl": "https://www.python.org",
  "pageFinalUrl": "https://www.python.org",
  "pageTitle": "Welcome to Python.org",
  "pageHttpStatus": 200,
  "status": "read",
  "imagesOnPage": 2,
  "imagesListed": 2,
  "imagesDownloaded": 2,
  "imagesMissingAlt": 0,
  "images": [
    {
      "imageUrl": "https://www.python.org/static/opengraph-icon-200x200.png",
      "source": "og:image",
      "alt": null,
      "hasAlt": null,
      "width": 200,
      "height": 200,
      "sizeFrom": "file",
      "format": "png",
      "position": 1,
      "imageStatus": "downloaded",
      "fileName": "opengraph-icon-200x200.png",
      "key": "00021-opengraph-icon-200x200.png",
      "fileUrl": "https://api.apify.com/v2/key-value-stores/33cVyDmnXthHh0MyQ/records/00021-opengraph-icon-200x200.png?signature=...",
      "sizeBytes": 7821,
      "sha256": "fd04e86f3b8992bd599bab7ec407223aebd14541b7b055f5725d6d55398708c5",
      "zipName": "opengraph-icon-200x200.png",
      "imageError": null
    },
    {
      "imageUrl": "https://www.python.org/static/img/python-logo.png",
      "source": "img",
      "alt": "python™",
      "hasAlt": true,
      "width": 580,
      "height": 164,
      "sizeFrom": "file",
      "format": "png",
      "position": 2,
      "imageStatus": "downloaded",
      "fileName": "python-logo.png",
      "key": "00025-python-logo.png",
      "fileUrl": "https://api.apify.com/v2/key-value-stores/33cVyDmnXthHh0MyQ/records/00025-python-logo.png?signature=...",
      "sizeBytes": 15770,
      "sha256": "9c121e619bfe02eaba582d7080eea46fd53ec0b50717e6794a948fada4ae8f3c",
      "zipName": "python-logo.png",
      "imageError": null
    }
  ],
  "checkedAt": "2026-11-19T19:34:23Z",
  "error": null,
  "billableEvents": {"page": 1, "image": 2}
}
```

In the same run docs.apify.com gave 21 images (17 downloaded), the Wikipedia article on the alt attribute 9 of 13 (4 narrower than 50 px), and a missing page came back as `not_found` for free. Final status message: `Done: 3 of 4 pages read, 32 images listed, 25 downloaded; 1 page not found (not charged, see RUN-REPORT); 7 images not downloaded (free, reason in imageError). ZIP with 25 images: key images.zip`.

One dataset item per page, with the images in `images`. The **Images** and **Alt text audit** views in Console show one row per image; through the API, add `unwind=images` to get one row per image in JSON, CSV or Excel. Page `status` is `read` (one `page` event) or one of the free statuses `no_images`, `not_found`, `blocked`, `error` with the reason in `error`. Each image has `imageStatus`: `listed`, `downloaded` (one `image` event), or the free `duplicate` and `not_downloaded` with the reason in `imageError`. `hasAlt` is `null` for sources that cannot carry alt text (CSS backgrounds, Open Graph, video posters, icons).

### Pricing

Pay per event, no subscription:

| Event | Price | When |
|---|---|---|
| Actor start | $0.0045 per GB of memory | Once per run: $0.0045 at the default 512 MB. |
| Page | $0.003 | One page read and its images listed. A slow page counts more Pages (below). Not found, blocked and failed pages are free. |
| Image | $0.0008 | One image downloaded and stored. Large images count more Images (below). Filtered, too small, duplicate, blocked and failed images are free. |

**How Pages and Images are counted.** One Page covers 24 GB-seconds of the page's own work (robots.txt, fetching, parsing: 48 seconds at the default 512 MB, 6 s at 4 GB); a page that takes longer counts one more Page for each started 24 GB-s. One Image covers 5 GB-seconds of work on the image: its download time plus 1 GB-s for each MB stored (with the ZIP on each MB counts twice, as the ZIP holds a second copy); a larger image counts one more Image for each started 5 GB-s, for example a 3 MB photo is one Image, or two with the ZIP. The run time is shared equally between the pages and images in progress. Each row shows its Pages in `billableEvents` and `workGbSecs`, each image its count in `imageEvents`.

Examples: listing the images of 1,000 pages costs about $3.00, whatever the number of images, plus $0.0045 per run. Listing 100 pages and downloading 2,000 typical web images (under 2 MB) costs about $0.30 + $1.60 = $1.90.

Free: pages that are not found, blocked by robots.txt or refused by the site, pages without images, failed requests, and images that are filtered out, too small, duplicate or fail to download. An image is charged only when it is stored, so the downloads of free images take run time that the charges of the run pay for.

**Runs of mostly free pages and images stop early.** When the run time that the Actor start and the charged pages and images pay for is used up, the run stops: pages it did not read are listed in `RUN-REPORT` under `notProcessedInputs`, and images it did not download have the reason in `imageError`; start them in a new run.

You can cap the cost of a run with the maximum charge in the run options (at least $0.025); the run stops cleanly at that limit and the status message says so.

### Limits

- Reads the HTML as the server sends it, without a browser: images that only JavaScript adds to the page, and images in separate CSS files, are not listed.
- Lists the pages you give; it does not follow links to other pages.
- No login, cookies, proxies or CAPTCHA solving: such pages come back as `blocked` or `error`, for free.
- You are responsible for the rights to the images you download and reuse.

### FAQ

**Do you keep the images?** No. Results stay in your run's dataset and key-value store in your own Apify account, under your data retention settings.

**Why is the width empty?** When listing, the size comes from the page's HTML (width attribute or srcset); many pages do not state it. Switch on downloading to measure every image.

**Why was a page charged or not?** Each row has its events in `billableEvents` (each image its `imageEvents`) and free rows their reason in `error`, and the `RUN-REPORT` record in the key-value store counts them.

**Something is wrong with a result?** Open an issue on the Actor's **Issues** tab with the page URL.

# Actor input Schema

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

Public web pages (http or https), one per line. Every image on each page becomes one row with its alt text, size and source.

## `downloadImages` (type: `boolean`):

Also download every listed image into the run's key-value store, with the real size, format and SHA-256. Each stored image is at least one 'image' event (large images more, see Pricing); failed, filtered, too small and duplicate images are free. Off: only the list (one 'page' event per page).

## `zip` (type: `boolean`):

With downloading on: pack every stored image into images.zip with manifest.csv. The ZIP holds a second copy of every image, so its MB count twice (see Pricing).

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

Skip images narrower than this. When listing, the width comes from the HTML (width attribute, srcset); images without a known width are kept. When downloading, the real width of the file decides.

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

Skip images lower than this, the same way as the width.

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

Keep only these formats: jpeg, png, webp, gif, svg, avif, ico ... Empty: all images. When downloading, the format is checked from the file's bytes.

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

Stop listing a page after this many images.

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

List og:image and twitter:image from the page head (the share preview images).

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

List links that point to image files, such as full-size photos behind gallery thumbnails.

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

List images from style="background-image: url(...)" attributes. Images in separate CSS files are not read.

## `includeIcons` (type: `boolean`):

List favicons and touch icons from link rel=icon tags.

## `includeInlineImages` (type: `boolean`):

List images embedded as data: URIs (shortened in the output, never downloaded).

## `largestFromSrcset` (type: `boolean`):

For responsive images, use the largest candidate of srcset and picture sources instead of the src fallback.

## `maxImageSizeMb` (type: `integer`):

When downloading, larger images are skipped for free. Each MB stored counts in the image's events (see Pricing).

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

How many pages are read at the same time. Requests to one site are still spaced by its robots.txt Crawl-delay.

## Actor input object example

```json
{
  "urls": [
    "https://www.python.org",
    "https://docs.apify.com"
  ],
  "downloadImages": false,
  "zip": false,
  "minWidth": 0,
  "minHeight": 0,
  "maxImagesPerPage": 500,
  "includeMetaImages": true,
  "includeLinkedImages": true,
  "includeCssBackgrounds": true,
  "includeIcons": false,
  "includeInlineImages": false,
  "largestFromSrcset": true,
  "maxImageSizeMb": 20,
  "maxConcurrency": 5
}
```

# Actor output Schema

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

No description

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

No description

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

No description

## `report` (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://www.python.org",
        "https://docs.apify.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("greenrun/website-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://www.python.org",
        "https://docs.apify.com",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("greenrun/website-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://www.python.org",
    "https://docs.apify.com"
  ]
}' |
apify call greenrun/website-image-downloader --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,greenrun/website-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/dJUXgYnLQuZfaVI5X/builds/HdQdH8mMGDhgP3uND/openapi.json
