# Image Source Extractor (`zerobreak/image-source-extractor`) Actor

Image source extractor that pulls every image URL, alt text, file format, and lazy-load status from any web page, so SEO teams can find missing alt text and fix image issues fast.

- **URL**: https://apify.com/zerobreak/image-source-extractor.md
- **Developed by:** [ZeroBreak](https://apify.com/zerobreak) (community)
- **Categories:** SEO tools
- **Stats:** 3 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$4.99/month + usage

To use this Actor, you pay a monthly rental fee to the developer. The rent is subtracted from your prepaid usage every month after the free trial period.You also pay for the Apify platform usage, which gets cheaper the higher Apify subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#rental-actors

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Image Source Extractor: Find and Audit Every Image on Any Web Page

Extract every image from a web page with its full URL, alt text, file format, lazy-load status, and Open Graph meta images. Built for SEO auditors who need a complete image inventory without clicking through source code.

Point it at one URL or a list of pages and get back a structured dataset: every `<img>` element on the page, resolved to an absolute URL, with all the metadata you need to audit image SEO in one pass.

### Use cases

- **Alt text auditing**: find every image on a site with missing or empty alt text and get a prioritized fix list without manual inspection
- **Image format analysis**: identify pages still serving JPEG instead of WebP, which affects Core Web Vitals and page speed scores
- **Lazy-load verification**: confirm that below-the-fold images use `loading="lazy"` so they are not blocking page load
- **Open Graph image audit**: check that every page has an og:image and twitter:image set correctly for social sharing previews
- **Third-party image inventory**: flag images loaded from external CDNs or domains that could affect privacy compliance or page performance
- **Content migration prep**: export a full image list before migrating or redesigning a site so nothing gets missed

### What data does this actor extract?

Each record in the output dataset represents one image on the page.

```json
{
    "pageUrl": "https://apify.com",
    "pageTitle": "Apify: Full-Stack Web Scraping and Browser Automation Platform",
    "imageUrl": "https://apify.com/img/apify-logo.svg",
    "altText": "Apify logo",
    "hasAltText": true,
    "titleAttr": "",
    "width": "120",
    "height": "40",
    "loading": "lazy",
    "imageFormat": "svg",
    "isExternal": false,
    "ogImage": "https://apify.com/img/og-image.png",
    "twitterImage": "https://apify.com/img/og-image.png",
    "scrapedAt": "2026-03-01T08:45:12.345678+00:00"
}
````

| Field | Type | Description |
|-------|------|-------------|
| `pageUrl` | string | URL of the source page (final URL after redirects) |
| `pageTitle` | string | Title tag content of the source page |
| `imageUrl` | string | Full absolute URL of the image |
| `altText` | string | Alt attribute value. Empty string if alt is present but blank. Check `hasAltText` to tell missing from intentionally empty. |
| `hasAltText` | boolean | True if the img element has an alt attribute at all. False means the attribute is missing entirely, which is an SEO issue. |
| `titleAttr` | string | Title attribute on the img element, if present |
| `width` | string | Width attribute from the HTML (may be empty if not set) |
| `height` | string | Height attribute from the HTML (may be empty if not set) |
| `loading` | string | Loading attribute: `lazy`, `eager`, or empty if not set |
| `imageFormat` | string | Image file format from the URL extension: jpg, jpeg, png, gif, webp, svg, ico, avif, or other |
| `isExternal` | boolean | True if the image is hosted on a different domain than the page |
| `ogImage` | string | Open Graph image from the page's og:image meta tag |
| `twitterImage` | string | Twitter Card image from the page's twitter:image meta tag |
| `error` | string | Error message if the page could not be fetched (present only on failure) |
| `scrapedAt` | string | ISO 8601 timestamp of when the page was scraped |

### Input

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `url` | string | required | Single web page URL to extract images from |
| `urls` | array | \[] | List of page URLs. One per line. Use this to audit multiple pages in one run. |
| `includeExternalImages` | boolean | true | Include images hosted on external domains. Disable to see only images from the same domain as the page. |
| `maxUrls` | integer | 100 | Maximum number of pages to process. Hard cap is 1000. |
| `requestTimeoutSecs` | integer | 30 | Per-request timeout in seconds. Increase for slow sites. |
| `timeoutSecs` | integer | 300 | Overall actor run timeout in seconds. |
| `proxyConfiguration` | object | Datacenter (Anywhere) | Proxy type and location for requests. Supports Datacenter, Residential, Special, and custom proxies. Optional. |

#### Example input

```json
{
    "url": "https://apify.com",
    "urls": [
        "https://apify.com/about",
        "https://apify.com/pricing"
    ],
    "includeExternalImages": true,
    "maxUrls": 100,
    "requestTimeoutSecs": 30,
    "proxyConfiguration": { "useApifyProxy": true }
}
```

### How it works

1. Accepts one or more page URLs from the input
2. Deduplicates the URL list and caps at `maxUrls`
3. Fetches each page using an async HTTP client with a realistic browser User-Agent
4. Parses the HTML with BeautifulSoup and finds every `<img>` element
5. Resolves each image `src` to an absolute URL
6. Checks for the `alt`, `title`, `width`, `height`, and `loading` attributes
7. Detects the file format from the URL extension
8. Extracts Open Graph and Twitter Card meta images from the page head
9. Pushes one record per image to the output dataset
10. Rotates proxy per page when proxy configuration is enabled

### FAQ

**Can this actor check alt text on JavaScript-rendered pages?**
No. It uses a plain HTTP request and parses the raw HTML. If images are injected by JavaScript after the page loads, they will not appear in the output. For JS-rendered sites, you would need a browser-based actor using Playwright.

**What is the difference between hasAltText false and altText being an empty string?**
`hasAltText: false` means the alt attribute is completely missing from the img element. This is an SEO and accessibility problem. `altText: ""` with `hasAltText: true` means the attribute is present but intentionally empty, which is correct markup for decorative images.

**How many images can it extract per run?**
There is no hard limit on images per page. The `maxUrls` setting caps the number of pages processed, not the number of images per page. A single page might have 5 images or 500.

**Does it follow links and crawl the entire site?**
No. It only extracts images from the URLs you provide. It does not crawl to new pages. To audit a full site, export your URL list from a sitemap or crawl tool first and then feed it as the `urls` input.

**What formats does it detect?**
It detects jpg, jpeg, png, gif, webp, svg, ico, bmp, tiff, avif, and apng from the URL extension. If the extension is missing or unknown it returns `other`.

### Integrations

Connect Image Source Extractor with other apps and services using [Apify integrations](https://apify.com/integrations). You can integrate with Make, Zapier, Slack, Airbyte, GitHub, Google Sheets, Google Drive, and many more. You can also use [webhooks](https://docs.apify.com/integrations/webhooks) to trigger actions whenever the image audit is complete.

# Actor input Schema

## `url` (type: `string`):

Single web page URL to extract images from. You can also provide multiple URLs using the 'urls' field below.

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

List of web page URLs to extract images from. One URL per line. Use this to audit multiple pages in a single run.

## `includeExternalImages` (type: `boolean`):

If enabled, images hosted on external domains are included in the output. Disable to only see images served from the same domain as the page.

## `maxUrls` (type: `integer`):

Maximum number of pages to process per run. Keeps costs predictable on large URL lists. Hard cap is 1000.

## `requestTimeoutSecs` (type: `integer`):

How long to wait for each page to respond before giving up. Increase for slow sites.

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

Overall time limit for the entire actor run. Increase when processing many pages.

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

Select proxies to use for requests. Helps avoid IP blocking and rate limits. Datacenter proxies are fastest; Residential proxies are harder to detect.

## Actor input object example

```json
{
  "url": "https://apify.com",
  "urls": [
    "https://apify.com",
    "https://apify.com/about"
  ],
  "includeExternalImages": true,
  "maxUrls": 100,
  "requestTimeoutSecs": 30,
  "timeoutSecs": 300,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# 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 = {
    "url": "https://apify.com",
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("zerobreak/image-source-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 = {
    "url": "https://apify.com",
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("zerobreak/image-source-extractor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "url": "https://apify.com",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call zerobreak/image-source-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=zerobreak/image-source-extractor",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Image Source Extractor",
        "description": "Image source extractor that pulls every image URL, alt text, file format, and lazy-load status from any web page, so SEO teams can find missing alt text and fix image issues fast.",
        "version": "0.0",
        "x-build-id": "bNXq3dIw8JexoYgL3"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/zerobreak~image-source-extractor/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-zerobreak-image-source-extractor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/zerobreak~image-source-extractor/runs": {
            "post": {
                "operationId": "runs-sync-zerobreak-image-source-extractor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/zerobreak~image-source-extractor/run-sync": {
            "post": {
                "operationId": "run-sync-zerobreak-image-source-extractor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "url"
                ],
                "properties": {
                    "url": {
                        "title": "Page URL",
                        "type": "string",
                        "description": "Single web page URL to extract images from. You can also provide multiple URLs using the 'urls' field below."
                    },
                    "urls": {
                        "title": "Page URLs",
                        "type": "array",
                        "description": "List of web page URLs to extract images from. One URL per line. Use this to audit multiple pages in a single run.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "includeExternalImages": {
                        "title": "Include external images",
                        "type": "boolean",
                        "description": "If enabled, images hosted on external domains are included in the output. Disable to only see images served from the same domain as the page.",
                        "default": true
                    },
                    "maxUrls": {
                        "title": "Max pages to process",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Maximum number of pages to process per run. Keeps costs predictable on large URL lists. Hard cap is 1000.",
                        "default": 100
                    },
                    "requestTimeoutSecs": {
                        "title": "Request timeout (seconds)",
                        "minimum": 5,
                        "maximum": 120,
                        "type": "integer",
                        "description": "How long to wait for each page to respond before giving up. Increase for slow sites.",
                        "default": 30
                    },
                    "timeoutSecs": {
                        "title": "Actor timeout (seconds)",
                        "minimum": 30,
                        "maximum": 3600,
                        "type": "integer",
                        "description": "Overall time limit for the entire actor run. Increase when processing many pages.",
                        "default": 300
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Select proxies to use for requests. Helps avoid IP blocking and rate limits. Datacenter proxies are fastest; Residential proxies are harder to detect."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
