# Website Image Extractor: Image URLs, Alt Text, Sizes (`joesimo/website-image-extractor`) Actor

Extract every image from web pages or whole sites: image URLs, alt text, srcset, Open Graph and JSON-LD images, CSS backgrounds and icons. Optional check reads file size, pixel size and type, and finds broken images. Alt text audit mode. Fast HTTP, no browser, no login.

- **URL**: https://apify.com/joesimo/website-image-extractor.md
- **Developed by:** [Joe Simo](https://apify.com/joesimo) (community)
- **Categories:** SEO tools, Developer tools, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

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

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: Image URLs, Alt Text, Sizes

Get every image from any web page or whole website as a clean table: absolute image URL, the page it was found on, where it was found (img tag, srcset, picture source, Open Graph, Twitter card, CSS background, schema.org JSON-LD, icons), alt text, file name and size attributes. Turn on **Check each image** to also get HTTP status, content type, file size in bytes and real width x height in pixels, and to find broken images.

Fast plain HTTP, no browser, no login, no proxy. Pay only for images saved.

### Quick start

Input:

```json
{
    "startUrls": ["https://en.wikipedia.org/wiki/Kingfisher", "https://go.dev/"]
}
```

One output row (real result from a 12 November 2026 cloud run on go.dev):

```json
{
    "type": "image",
    "imageUrl": "https://go.dev/images/gophers/biplane.svg",
    "pageUrl": "https://go.dev/",
    "source": "img",
    "alt": "Go Gopher is skateboarding.",
    "altMissing": false,
    "fileName": "biplane.svg",
    "extension": "svg",
    "widthAttr": 229,
    "heightAttr": 148
}
```

Run it with an empty input to try 3 demo pages.

### What you can use it for

- **Image inventory and downloads:** a list of every image URL on a site, ready for a download script, Google Sheets or a DAM import.
- **Alt text audit:** `onlyMissingAlt` saves only img tags without an alt attribute, with the page they sit on. Good for accessibility (WCAG) and SEO fixes.
- **Broken image check:** with checks on, `checkError` shows 404s and non-image responses.
- **Heavy image report:** sort by `fileSizeBytes` to find images that slow pages down; compare `width` and `height` with `widthAttr` and `heightAttr` to spot oversized images.
- **Product and social images:** Open Graph, Twitter card and JSON-LD product images for catalogs, link previews and AI pipelines.
- **Competitor and brand research:** logos, hero banners and icons across a site.

### What you get

| Field | Meaning |
|---|---|
| imageUrl | Absolute image URL (resolved against the page and any base tag) |
| pageUrl, pageTitle, depth | The page where the image was found |
| source, sources | First place it was found (img, img-lazy, srcset, picture-source, og:image, twitter:image, meta, icon, preload, css-background, json-ld, video-poster) and every place on that page |
| alt, altMissing | Alt text; altMissing is true for img tags with no alt attribute (an empty alt="" counts as present, which is right for decorative images) |
| title, caption | Title attribute, icon sizes, or the JSON-LD caption |
| fileName, extension | From the URL |
| widthAttr, heightAttr, loading | HTML attributes as written |
| srcsetCount, srcsetLargest | Number of srcset candidates and the largest one |
| sameSite | True when the image is on the same site as the page |
| checkStatusCode, contentType, fileSizeBytes, width, height, format, checkError | Only with Check each image on |

Pages that fail, are blocked by robots.txt, are not HTML or have no images get one free row with `type: "page"` and a `status` (failed, not_found, robots_blocked, not_html, no_images, invalid_input). The run summary (pages, images, missing alt, broken images, stop reason) is saved as OUTPUT in the key-value store.

### Input options

- **startUrls:** pages or bare domains, one per line.
- **crawl, maxPages, maxCrawlDepth, includeUrlPatterns, excludeUrlPatterns:** follow same-site links to cover a whole site.
- **imageSources:** pick img, srcset, meta, icons, css, jsonld (default: all except icons; or turn on includeIcons).
- **dedupeAcrossPages** (default on): a logo on every page is saved once per run.
- **excludeImagePatterns:** skip tracking pixels, spacers and so on.
- **onlyMissingAlt:** alt text audit mode.
- **checkImages, minWidth, minHeight:** read the first 128 KB of each image for size and pixels; skip small images (skipped images are not charged).
- **maxImagesPerPage, maxImages:** limits.
- **respectRobotsTxt** (default on), **concurrency**, **checkConcurrency**, **timeoutSecs**.

### Pricing

Pay per event:

- **Image:** $0.0002 per image saved ($0.20 per 1,000 images).
- **Image check:** $0.0003 extra per image when Check each image is on ($0.50 per 1,000 checked images in total).

Free rows: failed, blocked, not HTML, no images and invalid inputs. The run stops cleanly at your max cost per run.

Examples: a 3-page demo with about 80 images costs about $0.016. A 200-page site crawl with 2,000 unique images costs about $0.40, or $1.00 with checks.

### Integrations and API

Run it from the Apify API, the Apify CLI, Make, Zapier, n8n, Google Sheets export, webhooks or MCP clients. Results come back as JSON, CSV, Excel or XML from the dataset.

### Limits

- Plain HTTP: images that only appear after JavaScript runs (some single-page apps and infinite scroll galleries) are not seen. Lazy-load attributes such as data-src and data-srcset are read.
- Images are not downloaded or stored; the check reads at most 128 KB per image.
- Inline data: URIs are counted in the summary but not saved.
- External CSS files are not fetched; inline style attributes and style blocks are read.
- Some image hosts refuse automated requests (403); those show up in checkError.

### Responsible use

The Actor reads public pages only, sends an honest User-Agent, respects robots.txt by default and waits between requests to the same host. Images belong to their owners: check the site's terms and copyright before reusing any image. Do not use it to collect personal photos.

### FAQ

**Does it download the images?** No. It returns URLs and metadata. Use the URLs with your own downloader or storage.

**Why is an image I see in the browser missing?** It is probably added by JavaScript after load or comes from an external CSS file.

**Is alt="" counted as missing?** No. Empty alt is the correct markup for decorative images, so altMissing is false. Only img tags with no alt attribute are flagged.

**Can I limit cost?** Yes: set Max images per run, Max pages, or a max cost per run in the run options.

# Actor input Schema

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

Pages to read, one per line. Bare domains work (example.com). The form is prefilled with two public pages. Leave empty to try 3 demo pages.

## `crawl` (type: `boolean`):

Also follow links on each page to other pages of the same site (www and non-www count as one site), up to Max pages and Max crawl depth.

## `maxPages` (type: `integer`):

Upper limit of pages fetched in this run, start URLs included.

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

How many clicks away from a start URL the crawl may go. Used only when Crawl is on.

## `includeUrlPatterns` (type: `array`):

Optional. Text (for example /products/) or a regular expression in slashes. Start URLs are always read.

## `excludeUrlPatterns` (type: `array`):

Optional. Text or /regex/. Matching links are not crawled.

## `imageSources` (type: `array`):

Leave empty for everything except icons.

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

Used only when Where to look is empty.

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

On: a logo shown on every page is saved (and charged) once. Off: one row per image per page.

## `excludeImagePatterns` (type: `array`):

Optional. Text or /regex/, for example /pixel|spacer|tracking/.

## `onlyMissingAlt` (type: `boolean`):

Save only img tags that have no alt attribute. Handy for accessibility and SEO checks.

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

Reads the first 128 KB of every image to get HTTP status, content type, file size and width x height. Charged as an extra event per image.

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

Needs Check each image. 0 = off. Smaller images are skipped and not charged.

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

Needs Check each image. 0 = off.

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

0 = no limit.

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

0 = no limit. The run also stops at your max cost per run.

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

Pages disallowed for all user agents are skipped (free row, status robots_blocked). Turn off only for sites you own or have permission to crawl.

## `concurrency` (type: `integer`):

Pages in flight at once. Each host also gets a 250 ms gap between page requests.

## `checkConcurrency` (type: `integer`):

Used only with Check each image.

## `timeoutSecs` (type: `integer`):

Per request.

## `maxRunSecs` (type: `integer`):

Stop after this many seconds, save the images found so far and finish cleanly. 0 means no limit (the run still stops 25 s before the platform timeout).

## Actor input object example

```json
{
  "startUrls": [
    "https://en.wikipedia.org/wiki/Kingfisher",
    "https://go.dev/"
  ],
  "crawl": false,
  "maxPages": 50,
  "maxCrawlDepth": 2,
  "includeIcons": false,
  "dedupeAcrossPages": true,
  "onlyMissingAlt": false,
  "checkImages": false,
  "minWidth": 0,
  "minHeight": 0,
  "maxImagesPerPage": 0,
  "maxImages": 0,
  "respectRobotsTxt": true,
  "concurrency": 5,
  "checkConcurrency": 10,
  "timeoutSecs": 30,
  "maxRunSecs": 120
}
```

# Actor output Schema

## `images` (type: `string`):

No description

## `summary` (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://en.wikipedia.org/wiki/Kingfisher",
        "https://go.dev/"
    ],
    "maxRunSecs": 120
};

// Run the Actor and wait for it to finish
const run = await client.actor("joesimo/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://en.wikipedia.org/wiki/Kingfisher",
        "https://go.dev/",
    ],
    "maxRunSecs": 120,
}

# Run the Actor and wait for it to finish
run = client.actor("joesimo/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://en.wikipedia.org/wiki/Kingfisher",
    "https://go.dev/"
  ],
  "maxRunSecs": 120
}' |
apify call joesimo/website-image-extractor --silent --output-dataset

```

## MCP server setup

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