Introducing /answers: web research in one API call
Backed byY CombinatorCombinator

Extract Images from {Website}

A website image scraper API for developers.

Turn a page URL into image URLs, SVGs, CSS backgrounds, and responsive sources with alt text. Add browser controls for JavaScript-heavy pages and image enrichment for catalogs and computer vision datasets.

Daydream logo
Kovai logo
Passionfroot logo
Orange logo
SendX logo
Klarna logo
Super.com logo
Daydream logo
Kovai logo
Passionfroot logo
Orange logo
SendX logo
Klarna logo
Super.com logo
Daydream logo
Kovai logo
Passionfroot logo
Orange logo
SendX logo
Klarna logo
Super.com logo
Daydream logo
Kovai logo
Passionfroot logo
Orange logo
SendX logo
Klarna logo
Super.com logo

What You Get

Get a structured image inventory, then add the metadata your workflow needs.

Image URLs and embedded assets

Extract img and responsive sources, inline SVGs, base64 data, CSS backgrounds, favicons, metadata images, and video posters.

Alt text and source elements

Each image includes src, type, element, and alt. Keep the source page URL alongside its images for traceable catalog and dataset records.

Optional image enrichment

Request measured width and height, visual asset classification, or hosted image URLs. Enrichment fields are returned when processing succeeds.

Visual deduplication

Enable dedupe to keep the highest-resolution copy of each visual duplicate group on a page. Images that cannot be downloaded or hashed are kept.

How to extract images from a website

An image scraping API takes a webpage URL and returns the images it finds as structured data. Context.dev handles page rendering and extraction behind one endpoint.

Create an API key, set CONTEXT_DEV_API_KEY in your server environment, and replace the example URL with your target page. For JavaScript or TypeScript, install the SDK with npm install context.dev.

cURL

curl --get --fail-with-body 'https://api.context.dev/v1/web/scrape/images' \
  --header "Authorization: Bearer $CONTEXT_DEV_API_KEY" \
  --data-urlencode 'url=https://example.com/products/canvas-bag'

JavaScript / TypeScript

import ContextDev from 'context.dev';

const client = new ContextDev({
  apiKey: process.env.CONTEXT_DEV_API_KEY,
});

const { images } = await client.web.webScrapeImages({
  url: 'https://example.com/products/canvas-bag',
});

console.log(images);

Read images from the response. Each entry includes src, element, type, and alt. One request processes one page; use your own page list for a whole site.

API Response

Illustrative base response showing URL, inline SVG, and base64 images. Actual results depend on the target page.

GET /v1/web/scrape/images
{
  "success": true,
  "url": "https://example.com/products/canvas-bag",
  "images": [
    {
      "src": "https://example.com/images/canvas-bag.jpg",
      "element": "img",
      "type": "url",
      "alt": "Canvas bag with shoulder strap"
    },
    {
      "src": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><circle cx=\"12\" cy=\"12\" r=\"10\"/></svg>",
      "element": "svg",
      "type": "html",
      "alt": null
    },
    {
      "src": "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",
      "element": "img",
      "type": "base64",
      "alt": null
    }
  ],
  "cache_metadata": {
    "status": "miss",
    "age_ms": 0
  },
  "request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
  "key_metadata": {
    "credits_consumed": 1,
    "credits_remaining": 499
  }
}

Product image scraping at e-commerce scale

Collect product images across thousands of e-commerce sites for AI pipelines, visual search, and catalog enrichment.

Context.dev gives your pipeline one image extraction endpoint for public product and category pages across storefronts. Each request processes one page and returns the same JSON structure, so you can collect image URLs and metadata without maintaining a separate image parser for each store.

Build a bulk product-image pipeline

  1. Discover and queue pages. Start with your catalog URLs or the Sitemap API. Deduplicate the URL list, limit concurrent requests, and save progress so a failed page does not restart the whole collection.
  2. Extract and select images. Request dimensions and asset classification to filter candidates. Use wait controls or browser actions for dynamic galleries. Set maxAgeMs: 0 when a catalog refresh needs a fresh scrape.
  3. Prepare the AI dataset. Download and validate selected images, retain the source page and collection date, and remove duplicates across stores. The API's dedupe option operates within each page. Follow the computer vision example to filter images before ingestion.

Handle blocking and rate limits at scale

Context.dev's managed scraping infrastructure handles JavaScript rendering, bot-detection bypass, and proxy escalation. If a target still blocks the scrape, a WEBSITE_BLOCKED response is not billed. Test representative storefronts before scaling; access and image coverage depend on the target.

Pace your queue using the rate-limit headers. Honor Retry-After on 429 responses and use bounded retries with backoff for temporary failures. Record persistently blocked pages for review while other jobs continue. Image downloads need their own failure handling because a returned URL can expire or reject a later fetch.

Base calls cost 1 credit. Calls with browser actions require a paid plan and cost 2 credits total; enriched calls cost 5 credits total, including actions. Plan throughput and enrichment costs separately using current pricing and the error-handling guide.

Compare Context.dev, Bright Data, and Oxylabs

For product images, compare the returned image fields and how bulk work reaches your pipeline. These products expose different collection and delivery workflows.

Scroll sideways to see the image and bulk workflows.

Context.dev, Bright Data, and Oxylabs for bulk product image extraction
APIImage workflowBulk workflow
Context.devImage Scraper APIOne image schema across page URLs, with alt text, source elements, and optional dimensions, classification, and visual deduplication.Queue one request per page within your plan limits. Your pipeline manages URL discovery, checkpoints, and dataset storage.
Bright DataWeb Scraper APIDedicated e-commerce scrapers return product records with image fields on supported targets, such as Amazon. Fields depend on the scraper.Supports asynchronous collections, with completed results retrieved as snapshots and options for delivery to your storage.
OxylabsWeb Scraper APIUse a supported product parser or configure Custom Parser for the image fields you need. Browser instructions support dynamic pages.Supports batches of up to 5,000 URLs or queries, asynchronous jobs, and cloud storage delivery.

Start with Context.dev when you have page URLs and want a consistent image inventory across storefronts. Evaluate Bright Data or Oxylabs when their dedicated product parsers or managed batch delivery fit your requirements. Compare usable images, resolution, completed-page cost, and throughput on the same sample of sites.

Sources: the product documentation linked above, Bright Data snapshot delivery, and Oxylabs batch queries. Checked .

Website image scraper comparison

Comparing image extractor tools for developers in 2026 starts with the job: extracting a known page, crawling a site, or discovering images through search.

Context.dev is a direct fit when your application has page URLs and needs a consistent image response, including from JavaScript-rendered pages. Apify offers a marketplace of specialized Actors. The two below handle different discovery workflows, so compare the specific Actor with your requirements.

Scroll sideways to compare all three tools.

Context.dev compared with Apify Website Image/Media Extractor and Google Images Scraper
Compare byContext.devImage Scraper APIApify Website Image/Media ExtractorBy LogioverApify Google Images ScraperBy Hooli
Starting inputA webpage URLWebsite start URLs and a crawl limitGoogle Images search queries
Page coverageOne page per request; you supply the URL listFollows internal links across a websiteSearch results with links to source pages
JavaScript contentBrowser rendering, wait controls, and optional browser actionsParses server-rendered HTML; does not execute JavaScriptCollects results from Google Images
Image outputURLs, inline SVGs, base64, responsive sources, CSS backgrounds, and postersImage, video, and audio URLs, including responsive and CSS sourcesImage URLs, thumbnails, and source page URLs
MetadataAlt text and source elements; optional dimensions and asset classificationAlt text, source pages, and media attributesPage titles and image / thumbnail dimensions
IntegrationREST endpoint and SDKs with a consistent image schemaApify Console or Actor API, with dataset exportsApify Console or Actor API, with dataset exports

Sources: the API reference and Actor documentation linked above, checked . These are specific Actors; other Apify tools have different capabilities. For a site-wide media inventory, evaluate the website Actor. For keyword-based image discovery, evaluate the Google Images Actor.

Image scraping workflows

Load dynamic galleries and prepare the images your computer vision pipeline needs.

Extract images from JavaScript-heavy websites

A gallery may insert images after the initial HTML arrives. Use waitForMs to allow that content to load before extraction, up to 30,000 milliseconds. If you also set timeoutMS, allow at least waitForMs + 10000.

Images triggered by scrolling, pagination, or clicks may need browser actions. Actions require a paid plan. Check their returned outcomes and the resulting images; a timed wait alone cannot guarantee that every item in an infinite gallery loads.

Collect images for computer vision training datasets

Request resolution and classification enrichment to filter images by measured dimensions and asset type. This example fetches a fresh page, waits two seconds, deduplicates its images, and selects photographs measuring at least 512 pixels in each dimension.

import ContextDev from 'context.dev';

const client = new ContextDev({
  apiKey: process.env.CONTEXT_DEV_API_KEY,
});

const page = await client.web.webScrapeImages({
  url: 'https://example.com/gallery',
  waitForMs: 2000,
  timeoutMS: 30000,
  maxAgeMs: 0,
  dedupe: true,
  enrichment: { resolution: true, classification: true },
});

const candidates = page.images
  .filter((image) =>
    image.type === 'url' &&
    image.enrichment?.type === 'photography' &&
    (image.enrichment?.width ?? 0) >= 512 &&
    (image.enrichment?.height ?? 0) >= 512
  )
  .map((image) => ({
    sourcePage: page.url,
    imageUrl: image.src,
    alt: image.alt,
  }));

console.log(candidates);

Enriched calls cost 5 credits total. Metadata can be missing when an image cannot be processed, so the example excludes unmeasured or unclassified images. The available resolution comes from the source website; extraction does not create a higher-resolution original.

Download the selected URLs, validate the files, and retain the source page, collection date, and usage rights with your dataset records. Review alt text before using it as a label, and deduplicate across pages before creating training and evaluation splits.

Frequently asked questions

Explore the web scraping API or check pricing and rate limits.

How do I extract all images from a website?
Send an authenticated GET request to /v1/web/scrape/images with a page URL. Context.dev returns the discovered images as JSON. To cover a whole website, first collect its page URLs from a sitemap or your own URL list, then request each page. A single image extraction request processes one page.
Can I scrape images from JavaScript-heavy websites?
Yes. Context.dev renders the page, and waitForMs lets you wait up to 30 seconds after initial load before collecting images. For content that needs scrolling or clicks, configure browser actions on a paid plan. Coverage depends on the page state reached; an initial load does not necessarily reveal every gallery item.
What image formats and HTML sources are supported?
The image scraper extracts standard image URLs, inline SVG or HTML, and base64 data URIs. Sources include img elements, responsive picture/source variants, CSS backgrounds, favicon links, metadata images, video posters, and embedded objects. The type field identifies url, html, or base64; element identifies where the image was found.
Does the image extractor return alt text?
Yes. Each image includes alt text from the source when available, otherwise null. This supports accessibility audits and image search indexing. Alt text is source content, so review it before treating it as a computer vision label or a verified caption.
Can I download all the extracted images?
The API returns image data in JSON. For type=url, download src with an HTTP client and handle failed or expired URLs. For type=html, save or process the inline SVG or HTML; for type=base64, decode the data URI. There is no ZIP download in the base response. Optional hostedUrl enrichment provides a CDN URL for images that can be processed.
Can I extract full-resolution product images?
The available resolution depends on the image sources exposed by the website. Request resolution enrichment to measure width and height, then choose candidates that meet your requirements. Visual deduplication keeps the highest-resolution image in each duplicate group it can process. Extraction does not upscale images or guarantee access to an original file.
Can I scrape product images from thousands of e-commerce sites for an AI pipeline?
Yes. Build a URL list from your catalogs or sitemaps, then queue one image extraction request per public product or category page. Context.dev returns the same image schema across sites. Pace requests to your plan limits, save progress and source URLs, and download and validate the selected images. Optional dimensions and classification help filter candidates; deduplicate across pages in your own pipeline.
How does Context.dev handle blocked requests during bulk image scraping?
Context.dev manages JavaScript rendering, bot-detection bypass, and proxy escalation. Access is still target-dependent: a WEBSITE_BLOCKED scrape response is not billed. Honor Retry-After on 429 rate-limit responses, use bounded retries for temporary failures, and record persistently blocked pages for review. Test a representative sample of storefronts before scaling your collection.
Can I use an image scraping API for computer vision training datasets?
Yes, as the collection stage of a dataset pipeline. Extract images and source metadata, request resolution and classification enrichment, and filter candidates by dimensions and asset type. Then download and validate the files, review labels and usage rights, and remove duplicates across the dataset before training.
How does Context.dev compare with Apify image scrapers?
Context.dev provides a page image extraction endpoint with a consistent response schema. Apify offers specialized Actors: Website Image/Media Extractor by Logiover crawls media in server-rendered HTML, while Google Images Scraper by Hooli collects search results. Choose based on whether you have page URLs, need a site-wide media inventory, or want keyword-based image discovery.
How does Context.dev compare with Bright Data and Oxylabs for product images?
Context.dev focuses on a consistent page image inventory with optional dimensions, classification, and deduplication. You queue one request per page. Bright Data offers dedicated e-commerce scrapers with product image fields and asynchronous snapshot delivery. Oxylabs offers supported product parsers, custom parsing, browser controls, and batch queries. Choose based on whether you need image metadata across storefronts or a provider-specific product schema and managed bulk delivery.
Is the image scraper API free to try, and how are calls priced?
Work-email signups get 1,000 free API credits every month at 30 req/min, with no credit card required. A base image extraction call costs 1 credit. Calls with browser actions cost 2 credits and require a paid plan. Enriched calls cost 5 credits total, including when actions are also used. See the pricing page for current plan allowances and rate limits.
Am I billed for failed requests?
No. Failed requests and requests blocked by the target are not billed. Credits are consumed on successful responses.

Ship an agent that actually knows things.

Free tier, 10-minute integration, and the same API powering agents at Mintlify, daily.dev, and Propane. No credit card to start.