Website Image Extractor avatar

Website Image Extractor

Pricing

Pay per event

Go to Apify Store
Website Image Extractor

Website Image Extractor

Extract normalized image asset URLs, srcset variants, alt text, dimensions, context, and source-page provenance from anonymously reachable public web pages.

Pricing

Pay per event

Rating

0.0

(0)

Developer

Stas Persiianenko

Stas Persiianenko

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

8 days ago

Last modified

Categories

Share

Build a clean inventory of images referenced by public web pages.

Website Image Extractor turns <img>, <picture>, social preview, preload, and inline CSS image references into normalized dataset records. Each result keeps the source page, original HTML value, absolute asset URL, alt text, dimensions, responsive variants, semantic context, and discovery time.

It is designed for content audits, website migrations, accessibility reviews, media catalogs, and repeatable data pipelines. It extracts references and metadata; it does not download or re-host image files.

What the website image extractor does

The Actor accepts one or more anonymously reachable HTTP or HTTPS pages.

For every fetched HTML page it can find:

  • <img src> and common lazy-load attributes;
  • <img srcset> and lazy-loaded srcset candidates;
  • <picture><source srcset> candidates;
  • Open Graph and Twitter preview images;
  • rel=image_src and image preload links;
  • image URLs in inline background and background-image styles.

Relative and protocol-relative references become absolute URLs.

Fragments are removed for stable matching.

Repeated references to the same asset on one page produce one record.

The same asset on two pages produces two records so provenance is preserved.

Who is it for

Content and SEO teams can audit missing alt text and locate image assets before a redesign.

Migration teams can inventory media references before moving a site or CMS.

Developers can feed normalized asset URLs into validation, optimization, or archival workflows.

Data teams can schedule bounded crawls and compare exported datasets over time.

Accessibility reviewers can identify the HTML alt text and declared dimensions available in the server response.

Choose a search-engine image Actor when you want images discovered by a keyword search rather than assets referenced by supplied pages.

Why use this Actor

A raw list of URLs loses the evidence needed for review.

This Actor keeps page-level provenance and useful context in every record.

It also:

  • handles responsive srcset variants;
  • distinguishes element sources such as img, meta, and CSS;
  • records nearby semantic context and text;
  • supports multiple start pages;
  • supports bounded same-domain crawling;
  • rejects private and local destinations;
  • stops at explicit page and result limits;
  • produces CSV, JSON, Excel, XML, RSS, or API output through Apify datasets.

The HTTP-first implementation is lightweight and predictable. It does not start a browser when static server HTML already contains the references.

Getting started

  1. Open the Actor input page.
  2. Add one or more public page URLs under Public page URLs.
  3. Set Maximum image records.
  4. Leave Internal crawl depth at 0 for only the supplied pages.
  5. For a small site inventory, set crawl depth to 1 and choose a bounded page limit.
  6. Keep Keep crawls on the start domain enabled unless cross-domain page crawling is intentional.
  7. Run the Actor.
  8. Open the Image inventory dataset view.
  9. Export the results or connect the dataset API to a downstream workflow.

A useful first input is:

{
"startUrls": [
{ "url": "https://en.wikipedia.org/wiki/Apollo_11" }
],
"maxItems": 25,
"maxPages": 1,
"maxCrawlDepth": 0,
"includeCssBackgrounds": true
}

Input parameters

FieldTypeDefaultPurpose
startUrlsarrayrequiredPublic HTTP/HTTPS pages to inspect
maxItemsinteger100Maximum image records saved across all pages
maxPagesinteger1Maximum successfully fetched pages
maxCrawlDepthinteger0Internal link depth, from 0 through 5
sameDomainOnlybooleantrueKeep followed pages on each start hostname
includeCssBackgroundsbooleantrueParse inline CSS background URLs
includeDataUrlsbooleanfalseInclude large embedded data:image values

Up to 100 start URLs can be supplied in one run.

maxItems can be from 1 to 100,000.

maxPages can be from 1 to 1,000.

Page crawling follows ordinary anchor links found in fetched HTML.

Image assets can still live on a CDN when same-domain page crawling is enabled.

Extracted data

FieldMeaning
imageUrlAbsolute normalized image asset URL
originalUrlReference exactly as found in HTML
sourcePageUrlPage where the reference was found
sourceElementimg, picture-source, meta, link, or css-background
altTextAlt attribute, or null
titleTextTitle attribute, or null
width / heightInteger HTML dimensions, or null
srcsetVariantsResponsive candidate URLs and descriptors
linkUrlNearest wrapping link, or null
contextTypeNearest semantic container
contextTextNearby normalized text, truncated to 300 characters
loadingLoading attribute, or null
fileNameDecoded final URL path segment
extensionLowercase extension inferred from the path
isDataUrlWhether the value is an embedded data image
discoveredAtISO 8601 extraction timestamp

Fields may be null when the source page does not declare that metadata.

The Actor does not request each image file, so dimensions are HTML declarations rather than measured binary dimensions.

Output example

A current result has this shape:

{
"imageUrl": "https://upload.wikimedia.org/example/mission-photo.jpg",
"originalUrl": "//upload.wikimedia.org/example/mission-photo.jpg",
"sourcePageUrl": "https://en.wikipedia.org/wiki/Apollo_11",
"sourceElement": "img",
"altText": "Mission crew photograph",
"titleText": null,
"width": 220,
"height": 174,
"srcsetVariants": [
{
"url": "https://upload.wikimedia.org/example/mission-photo-440.jpg",
"descriptor": "2x"
}
],
"linkUrl": "https://en.wikipedia.org/wiki/File:Mission_photo.jpg",
"contextType": "figure",
"contextText": "Mission crew photograph",
"loading": "lazy",
"fileName": "mission-photo.jpg",
"extension": "jpg",
"isDataUrl": false,
"discoveredAt": "2026-01-15T12:00:00.000Z"
}

The example values are anonymized; actual records contain the source page's public values.

How much does it cost to extract website images?

Pricing uses one start event plus one item event for each saved image record.

The current start fee is $0.005 per run.

At the BRONZE tier, each saved image record is $0.001336.

Approximate BRONZE totals are:

Saved imagesApproximate total
25$0.0384
100$0.1386
1,000$1.3410

Higher usage tiers receive lower per-item prices.

Failed or duplicate image candidates are not charged as item events.

Page count affects platform runtime but is not a separate charge event.

Always check the live pricing panel for the tier applied to your account.

Website migration workflow

  1. Start with the most important landing pages.
  2. Run a one-page inventory to verify the source HTML exposes expected assets.
  3. Increase maxCrawlDepth to 1.
  4. Set a conservative maxPages such as 25.
  5. Export the dataset as CSV or JSON.
  6. Group by sourcePageUrl for page ownership.
  7. Group by imageUrl to identify assets reused across pages.
  8. Validate or copy assets in a separate authorized system.
  9. Rerun after migration and compare normalized URLs.

Because provenance is retained, one shared image can be traced back to every page that references it.

Accessibility and content audit workflow

Filter records where sourceElement is img and altText is null.

Review decorative images separately from meaningful content images.

Use contextType and contextText to prioritize records without opening every page first.

A missing alt attribute and an empty alt attribute both appear as null; verify decorative intent against the source page before changing content.

The Actor reports declarations, not accessibility conformance.

Recurring inventory and monitoring

Apify schedules can run the same bounded input daily, weekly, or monthly.

Export each run's dataset to your warehouse or spreadsheet.

Compare stable keys built from sourcePageUrl and imageUrl.

This can reveal:

  • newly referenced assets;
  • removed references;
  • URL changes after CDN or CMS migrations;
  • changes to declared alt text;
  • changes to declared dimensions;
  • new responsive variants.

The Actor does not itself send alerts or compare past runs.

Use an Apify integration, webhook, or your own pipeline for that step.

JavaScript and rendered-page limitations

The Actor parses the HTML returned by an HTTP request.

It does not execute JavaScript.

Images inserted only after client-side rendering will not appear.

Lazy references already present in data-src, data-original, data-lazy-src, or data-srcset are supported.

Images discovered only through external stylesheets are not included.

Inline CSS backgrounds are optional and enabled by default.

Shadow DOM, canvas content, video poster extraction, and authenticated pages are outside the current scope.

For JavaScript-only pages, supply a server-rendered public URL when the site offers one.

Crawling behavior and limits

Depth 0 processes only supplied pages.

Depth 1 can follow links found on those pages.

The queue stops when maxPages or maxItems is reached.

Redirects are followed up to five times and each destination is checked again.

Transient 408, 425, 429, and selected 5xx responses can be retried twice.

Responses must be successful HTML and no larger than 10 MB.

A failed page is logged and other queued pages continue.

The run fails if none of the supplied pages can be fetched successfully.

A successfully fetched page with no image references is a valid empty result.

Legality and responsible use

Only anonymously reachable public HTTP and HTTPS pages are supported.

The Actor rejects URL credentials, localhost names, private IP space, link-local addresses, and reserved addresses.

Redirect destinations receive the same validation.

Only process pages and asset references you are authorized to access.

Respect website terms, robots guidance, copyright, privacy, and database rights.

An image URL in a public page does not grant permission to copy, redistribute, or train on the image.

This Actor extracts references and metadata; users remain responsible for downstream use.

Export and integrations

The default Apify dataset can be downloaded as JSON, CSV, Excel, XML, or RSS.

Common integrations include:

  • Google Sheets for a content-owner review queue;
  • cloud storage for dated inventory snapshots;
  • webhooks for pipeline completion;
  • Make or Zapier for no-code routing;
  • Python or JavaScript jobs for diffing datasets;
  • a media validator that checks status, content type, or binary dimensions.

Use imageUrl as the asset identifier and sourcePageUrl as the provenance dimension.

API usage with cURL

Start a run and wait for its dataset items:

curl -X POST \
"https://api.apify.com/v2/acts/automation-lab~website-image-extractor/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"startUrls": [{"url": "https://www.python.org/"}],
"maxItems": 50,
"maxPages": 1,
"maxCrawlDepth": 0
}'

Keep your token in an environment variable rather than source code.

API usage with JavaScript

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('automation-lab/website-image-extractor').call({
startUrls: [{ url: 'https://www.python.org/' }],
maxItems: 50,
maxPages: 1,
maxCrawlDepth: 0,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);

API usage with Python

import os
from apify_client import ApifyClient
client = ApifyClient(os.environ['APIFY_TOKEN'])
run = client.actor('automation-lab/website-image-extractor').call(run_input={
'startUrls': [{'url': 'https://www.python.org/'}],
'maxItems': 50,
'maxPages': 1,
'maxCrawlDepth': 0,
})
items = client.dataset(run['defaultDatasetId']).list_items().items
print(items)

Use with Apify MCP

Add the Actor to Claude Code:

claude mcp add --transport http apify \
"https://mcp.apify.com?tools=automation-lab/website-image-extractor"

The same endpoint works in Claude Desktop, Cursor, and VS Code MCP configuration panels. Add this HTTP server configuration in the client you use:

{
"mcpServers": {
"apify": {
"url": "https://mcp.apify.com?tools=automation-lab/website-image-extractor"
}
}
}

Example prompts:

  • "Extract up to 50 image records from the Python.org homepage and show items without alt text."
  • "Build an image inventory from three public pages and group results by source page."
  • "Crawl at most five internal pages from this homepage and export normalized image URLs."

Troubleshooting

The run returned no records

Open the page source rather than only the rendered browser view.

If image references are inserted solely by JavaScript, this HTTP Actor will not see them.

Also verify that the response is public HTML and that maxItems is at least 1.

A page failed with HTTP 403 or 429

The website may disallow automated anonymous requests or rate-limit traffic.

Reduce the page count and retry later.

The current Actor does not expose a residential proxy or browser fallback.

Some dimensions are null

The HTML did not provide integer width or height attributes.

The Actor does not download image binaries to measure intrinsic dimensions.

CSS images are missing

Only inline style declarations are parsed.

Images found exclusively in external CSS files are outside the current scope.

sameDomainOnly defaults to true.

Disable it only when cross-domain page crawling is intentional and authorized.

FAQ

Does this website image downloader save image files?

No. It extracts image URLs and metadata into a dataset. Use a separate authorized downloader if you need the binary files.

Does it extract responsive images?

Yes. It normalizes srcset and <picture><source> candidates with width or density descriptors.

Can it crawl a complete website?

It supports bounded link crawling, not an unlimited whole-site guarantee. Set explicit depth, page, and item limits.

Does it use a browser?

No. It uses lightweight HTTP requests and parses server-returned HTML.

Can it access logged-in pages?

No. The supported scope is anonymously reachable public pages.

Are duplicate images removed?

Duplicate asset URLs on one source page are collapsed. The same asset on different pages remains in each page's inventory.

Can I schedule it?

Yes. Use Apify schedules and send each run's dataset to your preferred integration.

These tools complement the image inventory without changing this Actor's output contract.