# Website Image Extractor — Download All Images (`istmobot/website-image-extractor`) Actor

Extract and download every image from any website: img, srcset, lazy-loaded, og:image, JSON-LD product images and CSS backgrounds, with width, height, format, file size and alt text. Filter by size, crawl whole sites. Export JSON, CSV, Excel.

- **URL**: https://apify.com/istmobot/website-image-extractor.md
- **Developed by:** [Istmobot](https://apify.com/istmobot) (community)
- **Categories:** E-commerce, SEO tools, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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 — extract & download all images from any website

Extract **every image from any web page or whole website**: `<img>` tags, `srcset` (largest version), lazy-loaded images, `<picture>` sources, **og:image / Twitter cards**, **JSON-LD product images**, video posters, favicons and **CSS background images**. Get **width × height, format, file size and alt text** for each one, filter out icons by size and optionally **download all images** to cloud storage. No browser, no code.

### Use cases

- **Ecommerce**: collect all product photos from competitor or supplier pages (Shopify, WooCommerce, Amazon product pages).
- **SEO audits**: find images without alt text, oversized files and broken image links.
- **Dataset building**: gather images for AI / machine learning training sets.
- **Content migration and backups**: download every image of a site before a redesign.
- **Brand monitoring**: grab logos, og:images and social preview cards.

### Features

- Finds images other tools miss: lazy-load attributes (`data-src`, `data-lazy-src`, `data-original`…), `srcset`, JSON-LD and inline CSS.
- **Pixel dimensions without downloading** the full file (reads only the first bytes).
- **Size filters** (`minWidth`, `minHeight`) to drop tracking pixels, icons and thumbnails.
- **Download images** to the run's key-value store, each with a permanent download link.
- **Crawl a whole site**: follow same-site links up to N pages per start URL.
- Duplicates removed across pages. Broken image links are skipped and never charged.

### How much does it cost?

| Event | Price |
|---|---|
| Actor start | $0.005 per run |
| `image` | **$0.001** per image, or $1 per 1,000 |

Broken links, filtered-out images and page errors are free. The free plan's $5 monthly credit covers about **5,000 images**.

### Input

| Field | Default | Description |
|---|---|---|
| `startUrls` | – | Pages to extract images from |
| `maxPagesPerUrl` | `1` | Pages to crawl per start URL (same website) |
| `includeCssAndIcons` | `true` | Include CSS backgrounds and icons |
| `fetchImageInfo` | `true` | Width, height, format, content type, file size |
| `minWidth` / `minHeight` | `0` | Minimum size in pixels |
| `saveImages` | `false` | Download image files to storage |
| `maxImages` | `5000` | Max images per run |

```json
{
  "startUrls": ["https://www.allbirds.com/products/mens-tree-runners"],
  "minWidth": 300,
  "saveImages": true
}
```

### Output

```json
{
  "startUrl": "https://www.allbirds.com/products/mens-tree-runners",
  "pageUrl": "https://www.allbirds.com/products/mens-tree-runners",
  "imageUrl": "https://www.allbirds.com/cdn/shop/files/TR3MJBW080_SHOE_LEFT_GLOBAL_MENS_TREE_RUNNER.png",
  "source": "og:image",
  "alt": null,
  "width": 1600,
  "height": 1600,
  "format": "png",
  "contentType": "image/png",
  "fileSizeBytes": 302614,
  "storedUrl": "https://api.apify.com/v2/key-value-stores/.../records/068445430813b6cbc9f0.png",
  "fileName": "TR3MJBW080_SHOE_LEFT_GLOBAL_MENS_TREE_RUNNER.png",
  "scrapedAt": "2026-10-26T03:30:43.000Z"
}
```

`source` tells you where the image was found: `img`, `srcset`, `lazy`, `picture`, `og:image`, `twitter:image`, `json-ld`, `css`, `icon`, `video-poster` or `link`.

### API

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("istmobot/website-image-extractor").call(run_input={"startUrls": ["https://example.com"], "minWidth": 200})
for img in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(img["width"], img["height"], img["imageUrl"])
```

### FAQ

**Does it render JavaScript?** No. It reads the HTML the server sends, which already includes lazy-load attributes, srcset, JSON-LD and og:image on most sites. Images injected only by JavaScript after load are not found.

**A site returns HTTP 403?** Enable Apify Proxy in the input; some sites block cloud servers.

# Actor input Schema

## `startUrls` (type: `array`):

Web pages to extract images from: product pages, articles, landing pages, galleries, competitor sites.

## `maxPagesPerUrl` (type: `integer`):

1 = only the given page. Higher values also follow links on the same website (breadth-first) and extract images from those pages too.

## `includeCssAndIcons` (type: `boolean`):

Also return favicons, apple-touch icons and images referenced in inline CSS (background-image).

## `fetchImageInfo` (type: `boolean`):

Read the first bytes of every image to get width × height in pixels, format, content type and file size. Broken image links are skipped and never charged.

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

Skip images narrower than this, e.g. 200 to drop icons, tracking pixels and thumbnails. 0 = no filter.

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

Skip images shorter than this. 0 = no filter.

## `saveImages` (type: `boolean`):

Save every image file (up to 25 MB each) to the run's key-value store. Each item gets a storedUrl you can download from, even if the website later removes the image.

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

Maximum number of images for the whole run.

## `proxyConfiguration` (type: `object`):

Optional. Use a proxy for websites that block cloud servers.

## Actor input object example

```json
{
  "startUrls": [
    "https://apify.com"
  ],
  "maxPagesPerUrl": 1,
  "includeCssAndIcons": true,
  "fetchImageInfo": true,
  "minWidth": 0,
  "minHeight": 0,
  "saveImages": false,
  "maxImages": 5000
}
```

# Actor output Schema

## `results` (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 = {
    "startUrls": [
        "https://apify.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("istmobot/website-image-extractor").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 = { "startUrls": ["https://apify.com"] }

# Run the Actor and wait for it to finish
run = client.actor("istmobot/website-image-extractor").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 '{
  "startUrls": [
    "https://apify.com"
  ]
}' |
apify call istmobot/website-image-extractor --silent --output-dataset

```

## MCP server setup

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

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/w9DMus20GSYAqi9iq/builds/Jc2crP8uS7wDhywMR/openapi.json
