You have a list of sites and need every image on them: product pages, portfolio sites, a competitor's catalogue. Doing it by hand is slow, and a quick script misses lazy-loaded srcset and CSS background images. Here is a one-call way, with the cost per 1,000 images worked out.
Runs on this actor so far are mostly bulk jobs: a list of page URLs goes in, about a thousand image rows come out in a single run. That is the sizing used below.
The Website Image Extractor needs no browser and no proxy setup. This returns one dataset row per image:
curl -X POST "https://api.apify.com/v2/acts/pennydata~website-image-extractor/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"mode":"images","startUrls":[{"url":"https://books.toscrape.com/"},{"url":"https://quotes.toscrape.com/"}],"maxImages":1000,"downloadMode":false}'
Python:
from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("pennydata/website-image-extractor").call(run_input={
"mode": "images",
"startUrls": [{"url": "https://books.toscrape.com/"}],
"maxImages": 1000,
"downloadMode": False,
})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
print(row["imageUrl"], row["pageUrl"])
Each row has pageUrl, imageUrl, alt, width, height, contentType, bytes and source (img, img-srcset, picture-source, og:image, twitter:image, css-background). Width and height are what the page declares; the actor does not decode images. Pages that need JavaScript to render are not executed.
| Event | Price | Per 1,000 |
|---|---|---|
| Image row (image-URL list) | $0.002 | $2.00 |
| File downloaded (ZIP mode, or one brand-kit row per site) | $0.001 | $1.00 |
So a 1,000-image URL list is about $2.00, and downloading 1,000 files into a ZIP is about $1.00. Setting maxImages caps a run's spend. Pages that fail or are blocked by robots.txt are not charged. Check the current prices on the actor page before you budget, since they can change.
downloadMode to true and you get a ZIP."mode":"brand".Open Website Image Extractor on the Apify Store
I built this actor and earn from its runs. Written with AI assistance (Claude).