# Website Image Downloader: Extract & Download All Images (`larkmoor/website-image-downloader`) Actor

Extract every image from web pages or whole small sites: img, srcset (largest), lazy-load, picture, og:image, CSS backgrounds, linked files. Alt text, size, format. Optional download to storage + one ZIP. Size/type filters. $2 per 1,000 images.

- **URL**: https://apify.com/larkmoor/website-image-downloader.md
- **Developed by:** [Larkmoor Data](https://apify.com/larkmoor) (community)
- **Categories:** Automation, Developer tools
- **Features:** Limited permissions
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.70 / 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.
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

## Website Image Downloader: Extract and Download All Images from Any Website

Paste one or more web pages and get **every image on them** as a clean list: the full-size image URL, alt text, width and height, format, where on the page it was found, and the page it came from. Turn on downloading and the actor also **saves every image file** to your run's storage (each row gets a direct file link) and packs them all into **one ZIP**.

It works on product pages, blogs, galleries, news articles, documentation and whole small sites (follow links up to 200 pages per start URL). It is a plain HTTP crawler, so it is fast and cheap: **$2 per 1,000 images**, with failed pages and failed downloads free.

### What does it find?

- `<img>` tags, taking the **largest version from srcset** instead of the thumbnail.
- **Lazy-loaded** images (`data-src`, `data-lazy-src`, `data-original`, `data-srcset`).
- `<picture>` / `<source>` images.
- The **Open Graph and Twitter** sharing image.
- **CSS background images** set in style attributes.
- Links that point straight to image files (gallery "full size" links).
- **Direct image URLs** in the input are taken as they are.

Each image appears once per run (same URL), and with downloading on, files with identical bytes are stored once (`duplicateOf`). Icons, sprites, spacers and 1x1 tracking pixels are skipped by default.

### Who is it for?

- **E-commerce teams** collecting product photos from their own or their suppliers' catalogue pages.
- **Designers and marketers** gathering visual references and mood boards.
- **SEO specialists** auditing missing alt text and oversized images.
- **Researchers and data scientists** building image datasets from pages they are allowed to use.
- **Web archivists** saving the images of a site before a redesign or migration.

### Input

| Field | What it does |
|---|---|
| `startUrls` | pages (or direct image URLs), one per line |
| `maxPagesPerStartUrl` | 1 = just the page; higher = also follow same-site links |
| `downloadImages` | save the files and read their real size (default off) |
| `createZip` | with downloading on, one `images.zip` of everything (up to 400 MB) |
| `minWidth`, `minHeight` | skip small images (HTML size, or real size when downloading) |
| `imageTypes` | keep only jpg / png / webp / gif / svg / avif |
| `includeSocialImages`, `includeCssBackgrounds`, `skipIcons` | what to include |
| `maxImagesPerPage`, `maxImageSizeMb`, `maxConcurrency`, `maxResults` | limits |

```json
{
  "startUrls": ["https://books.toscrape.com/"],
  "maxPagesPerStartUrl": 5,
  "downloadImages": true,
  "createZip": true,
  "minWidth": 100
}
```

### Output

One row per image:

```json
{
  "imageUrl": "https://books.toscrape.com/media/cache/2c/da/2cdad67c44b002e7ead0cc35693c0e8b.jpg",
  "alt": "A Light in the Attic",
  "format": "jpg",
  "width": 125,
  "height": 155,
  "sizeKb": 9.6,
  "sourceType": "img",
  "pageUrl": "https://books.toscrape.com/",
  "domain": "books.toscrape.com",
  "fileName": "2cdad67c44b002e7ead0cc35693c0e8b.jpg",
  "downloaded": true,
  "sha1": "95cf48d399796e40...",
  "kvKey": "img-95cf48d399796e40.jpg",
  "fileUrl": "https://api.apify.com/v2/key-value-stores/.../records/img-95cf48d399796e40.jpg",
  "error": null
}
```

Without downloading, `width`/`height` come from the HTML attributes when the page states them, and `sizeKb`, `sha1` and `fileUrl` are empty.

The ZIP is saved as `images.zip` in the run's key-value store, with one folder per image host, and its link is written to the `OUTPUT` record.

Pages that fail, are blocked or contain no images (for example pages that build everything with JavaScript) get one free row with a note in `error`.

### Tips for good results

- **Only product photos**: set `minWidth` to 300 and turn off social images and CSS backgrounds; logos, badges and icons drop out.
- **Alt-text audit**: run without downloading on your own pages and filter rows where `alt` is empty. That is the cheapest way to find every image that needs a description.
- **Oversized images**: turn on downloading and sort by `sizeKb`; anything over 500 KB on a normal page is worth compressing.
- **Big catalogues**: give the category pages as start URLs with `maxPagesPerStartUrl` 1 rather than crawling from the homepage; you get the images you want without paying for banners on hundreds of unrelated pages.
- **Repeat runs**: schedule the actor weekly and compare `sha1` values to see which images changed.

### How much does it cost?

**$0.002 per image** ($2 per 1,000) plus a one-time $0.001 actor start, downloading and ZIP included. Failed pages and failed downloads are free. Downloading uses some extra platform storage on your account, usually cents.

- **One product page with 40 photos**: about $0.08.
- **A 50-page catalogue with 1,500 images**, downloaded and zipped: about $3.
- **10,000 image URLs** from a list of articles: about $20.

Higher Apify plans get automatic volume discounts.

### FAQ

**Is this legal?** The actor reads publicly served pages and image files, respects robots.txt and never logs in. Images are usually protected by copyright: you are responsible for having the right to download and use them (your own site, a supplier's catalogue you resell, licensed or public-domain images, fair use for research).

**Why are some images missing?** Images inserted by JavaScript after the page loads are not in the HTML. The actor tells you when a page has no images in its HTML.

**Does it get the full-size image?** It takes the largest candidate in srcset. Some sites serve only resized versions; the actor downloads exactly what the site serves.

**Can it crawl a whole site?** Up to 200 pages per start URL, staying on the same site. For bigger sites, run it on a list of category or sitemap URLs.

### Integrations

Export the list as JSON, CSV or Excel, read the files from the key-value store through the API, or connect the actor to Make, Zapier, n8n, Google Drive, Dropbox or a webhook to move images where you need them.

### Changelog

- **0.1** (Nov 2026): first release: srcset/lazy-load/picture/og/background/linked images, crawl, size and type filters, download with dedupe, ZIP.

# Actor input Schema

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

Web pages to take images from, one per line. Direct image URLs work too. With 'Pages per start URL' above 1 the actor also follows links on the same site.

## `maxPagesPerStartUrl` (type: `integer`):

1 = only the page itself. Higher = also visit links on the same site (breadth-first) until this many pages.

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

Save every image file to the run's key-value store (each row gets a fileUrl) and read its real width, height, format and size. Duplicate files (same bytes) are saved once.

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

With downloading on, put all images in images.zip in the key-value store (up to 400 MB), one folder per image host. The link is in the run's OUTPUT record and the log.

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

Skip images narrower than this. Uses the HTML width attribute, or the real size when downloading. 0 = no limit.

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

Skip images shorter than this. 0 = no limit.

## `imageTypes` (type: `array`):

Keep only these file formats. Leave empty for all.

## `includeSocialImages` (type: `boolean`):

Include the page's social sharing image.

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

Include images set as background-image in style attributes.

## `skipIcons` (type: `boolean`):

Leave out .ico files, sprites, spacers and 1x1 tracking pixels.

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

Stop collecting from a page after this many images.

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

With downloading on, skip files bigger than this.

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

Parallel requests.

## `maxResults` (type: `integer`):

Stop after this many images in total.

## Actor input object example

```json
{
  "startUrls": [
    "https://books.toscrape.com/",
    "https://www.allbirds.com"
  ],
  "maxPagesPerStartUrl": 1,
  "downloadImages": false,
  "createZip": true,
  "minWidth": 0,
  "minHeight": 0,
  "imageTypes": [],
  "includeSocialImages": true,
  "includeCssBackgrounds": true,
  "skipIcons": true,
  "maxImagesPerPage": 500,
  "maxImageSizeMb": 15,
  "maxConcurrency": 8,
  "maxResults": 1000
}
```

# Actor output Schema

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

One row per input as JSON items in the run's default dataset (also downloadable as CSV/Excel from the dataset).

# 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://books.toscrape.com/",
        "https://www.allbirds.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("larkmoor/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 = { "startUrls": [
        "https://books.toscrape.com/",
        "https://www.allbirds.com",
    ] }

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

```

## MCP server setup

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