# Website Images Scraper (`neuro-scraper/website-images-scraper`) Actor

Website Images Scraper SD - Website Images Scraper is a no-login tool that extracts every image from any website (img, srcset, picture, lazy data-src, CSS backgrounds, og:image) with alt text, size, type and dimensions, crawls pages, filters, and downloads files to storage or a ZIP.

- **URL**: https://apify.com/neuro-scraper/website-images-scraper.md
- **Developed by:** [Neuro Scraper](https://apify.com/neuro-scraper) (community)
- **Categories:** Automation, Developer tools, SEO tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.49 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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

./README.md

# Actor input Schema

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

Pages to collect images from, e.g. https://books.toscrape.com/ . Each page's images are read, then (Crawl scope, Maximum crawl depth) its links are followed page by page. A link straight to an image file (…/photo.jpg) is read as one image. The names urls and startUrl are accepted too.

## `imageUrls` (type: `array`):

Optional. Direct links to image (or video / audio) files, one per line, e.g. https://upload.wikimedia.org/wikipedia/commons/a/a7/Camponotus_flavomarginatus_ant.jpg . Each gives one row with type, size and dimensions; turn on Download images to store the files.

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

auto = a start URL ending in an image / video / audio extension (or answering with an image) is read as a file, every other one as a page. page = always parse as a web page. direct = every start URL is an image file.

## `crawlScope` (type: `string`):

Which links are followed from the start page: only the start page, pages on the same domain (www. ignored), or the domain and its subdomains. Allowed page URL globs replace this when given.

## `maxCrawlDepth` (type: `integer`):

How many links away from a start URL pages are read: 0 = the start page only, 1 = the start page and the pages it links to, 2 = one level further. crawlDepth is accepted as the same setting.

## `maxPagesToCrawl` (type: `integer`):

Most pages read in the whole run (start pages included), breadth-first. The crawl also stops when Max images is reached or no page is left to read. maxPages is accepted as the same setting.

## `urlGlobs` (type: `array`):

Optional. Only follow links matching one of these globs (\*\* = anything, \* = anything except /), e.g. https://books.toscrape.com/catalogue/page-\*.html . Replaces Crawl scope when set.

## `excludeUrlGlobs` (type: `array`):

Optional. Never follow links matching these globs, e.g. **/login** or **/cart/**.

## `maxItems` (type: `integer`):

Most image rows in the whole run (every row is one result). The crawl follows the site's links page by page until this number, Max pages to crawl or the end of the site. maxTotalImages is accepted as the same setting.

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

Most images saved from one page (0 = no limit).

## `maxImagesPerUrl` (type: `integer`):

Most images saved for one start URL and the pages crawled from it (0 = no limit).

## `includeImages` (type: `boolean`):

Collect images (img tags and every source below). Turn off to collect only video / audio.

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

Read responsive images: srcset, data-srcset and <picture><source>. The largest candidate is returned (see Merge resized copies).

## `includeBackgroundImages` (type: `boolean`):

Images set with CSS: style="background-image:url(...)", <style> blocks, data-bg attributes and the old background= attribute.

## `includeOgTags` (type: `boolean`):

Share images and structured-data images: og:image, twitter:image, itemprop=image, link rel=image_src and JSON-LD image / logo / thumbnailUrl.

## `includeDataAttributes` (type: `boolean`):

Lazy-loading attributes (data-src, data-lazy-src, data-original, data-srcset ...). When src is a placeholder, the lazy URL is the image.

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

Links (<a href>) that point straight to an image file - often the full-size photo of a gallery thumbnail.

## `includeStylesheets` (type: `boolean`):

Also read up to 10 same-site stylesheets per page (cached) for url(...) images. One extra request per stylesheet.

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

Add link rel=icon / apple-touch-icon / mask-icon and msapplication tile images.

## `includeVideo` (type: `boolean`):

Add <video> / <source> files, og:video and links to video files (mediaType = video, with the poster image).

## `includeAudio` (type: `boolean`):

Add <audio> / <source> files and links to audio files (mediaType = audio).

## `includeDataUris` (type: `boolean`):

Add images embedded in the page as data: URIs (base64). Off by default - most are placeholders.

## `skipTrackingPixels` (type: `boolean`):

Leave out 1x1 / 2x2 images and analytics pixels (Facebook, Google Analytics, DoubleClick, Bing, LinkedIn ...).

## `mergeResponsiveVariants` (type: `boolean`):

On: one row per image with the largest srcset / picture candidate as url and every size in variants (variantCount). Off: every candidate is its own row.

## `dedupeAcrossPages` (type: `boolean`):

Return an image once even when several pages show it (logos, icons). Off: one row per page it appears on.

## `imageExtensions` (type: `array`):

Optional. Only these file types, e.g. jpg, png, webp (jpg = jpeg, tif = tiff). Checked on the URL and, when the file is read, on its real content type. Empty = all. includeExtensions is accepted too.

## `includeMimeTypes` (type: `array`):

Optional. Only files whose real content type matches, e.g. image/jpeg, image/png or image/\* (the file is checked).

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

Only images at least this wide, measured from the file itself (the file is checked). 0 = no limit.

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

Only images at least this tall, measured from the file. 0 = no limit.

## `minSizeBytes` (type: `integer`):

Only files of at least this many bytes, e.g. 10000 to drop icons. 0 = no limit.

## `maxSizeBytes` (type: `integer`):

Only files up to this many bytes; larger files are left out (and not downloaded). 0 = no limit (downloads stop at 200 MB). maxBytes is accepted too.

## `checkImages` (type: `boolean`):

Read the first 128 KB of every file (one Range request, the page as referer) to fill contentType, sizeBytes, width, height, format, httpStatus, finalUrl, ok and error without downloading it. Off = URLs and HTML attributes only (fastest).

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

Download every file in full: adds sha256 and, with Store the files, saves it in the run's key-value store (key, storedUrl).

## `storeFiles` (type: `boolean`):

With Download images: save each file in the run's key-value store under the file name pattern and give its public link (storedUrl). store is accepted too.

## `dedupByHash` (type: `boolean`):

With Download images: a file whose bytes (sha256) equal one already saved is left out, even under another URL.

## `filenamePattern` (type: `string`):

Key-value store key / ZIP name of each downloaded file. Tokens: {name} (file name without extension), {hash} (12 hex of sha256), {sha256}, {index}, {host}, {page} (page path), {ext}.

## `convertFormat` (type: `string`):

With Download images: convert WebP files to PNG, or PNG files to JPG (transparency on white), before storing.

## `stripExif` (type: `boolean`):

With Download images: remove EXIF / XMP blocks (camera, GPS) from JPEG files without re-encoding them.

## `resultsType` (type: `string`):

list = the image rows (plus stored files if chosen). zip = also one ZIP of all downloaded files in the key-value store (images.zip; parts of 400 MB). zipPerUrl = one ZIP per start URL. A ZIP turns Download images on. The ZIP links are in the log and the ZIP_FILES record.

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

How many image files are checked or downloaded at the same time. Pages are read one at a time per site, politely.

## `downloadTimeoutMs` (type: `integer`):

Time limit for one image request.

## `imageCheckMaxRetries` (type: `integer`):

Retries after a network error, 429 or 5xx answer for one image file.

## `requestDelayMs` (type: `integer`):

Pause between two page requests to the same site (robots.txt Crawl-delay raises it, up to 10 s).

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

Skip pages the site's robots.txt disallows. Turn off only for sites you may crawl.

## `userAgent` (type: `string`):

Optional. Sent instead of the default desktop Chrome User-Agent, for pages and images.

## `useProxyForImages` (type: `boolean`):

Off: pages go through the proxy below, image files are fetched directly (image CDNs rarely block, and it keeps proxy traffic low). Turn on when an image host refuses direct requests.

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

Proxy for the page requests. Residential is the default; pick a country when a site serves other content (or blocks) by country.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://books.toscrape.com/"
    }
  ],
  "mode": "auto",
  "crawlScope": "same-domain",
  "maxCrawlDepth": 1,
  "maxPagesToCrawl": 10,
  "maxItems": 100,
  "maxImagesPerPage": 0,
  "maxImagesPerUrl": 0,
  "includeImages": true,
  "includeSrcset": true,
  "includeBackgroundImages": true,
  "includeOgTags": true,
  "includeDataAttributes": true,
  "includeLinkedImages": true,
  "includeStylesheets": false,
  "includeIcons": false,
  "includeVideo": false,
  "includeAudio": false,
  "includeDataUris": false,
  "skipTrackingPixels": true,
  "mergeResponsiveVariants": true,
  "dedupeAcrossPages": true,
  "minWidth": 0,
  "minHeight": 0,
  "minSizeBytes": 0,
  "maxSizeBytes": 0,
  "checkImages": true,
  "downloadImages": false,
  "storeFiles": true,
  "dedupByHash": true,
  "filenamePattern": "{name}-{hash}.{ext}",
  "convertFormat": "none",
  "stripExif": false,
  "resultsType": "list",
  "maxConcurrency": 5,
  "downloadTimeoutMs": 30000,
  "imageCheckMaxRetries": 2,
  "requestDelayMs": 1000,
  "respectRobotsTxt": true,
  "useProxyForImages": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# 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": [
        {
            "url": "https://books.toscrape.com/"
        }
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("neuro-scraper/website-images-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 = {
    "startUrls": [{ "url": "https://books.toscrape.com/" }],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("neuro-scraper/website-images-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 '{
  "startUrls": [
    {
      "url": "https://books.toscrape.com/"
    }
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call neuro-scraper/website-images-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,neuro-scraper/website-images-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/3Hin2TmEkkAkVkCjW/builds/tBLHzcYEkyizOacoP/openapi.json
