Skip to content
Docs

Screenshots

Images of any public page for previews, checks and archives.Any public URL as a PNG, JPEG or WebP image, after the page has run its JavaScript and loaded its images. Capture the viewport at the width, height and pixel ratio you choose (scale 2 or 3 for retina), the whole scrollable page, or one element by CSS selector. Wait for load, network idle, a selector or a fixed pause first, and load the page from a country you name. Call it with GET and query parameters or POST with JSON; the answer is the image itself or JSON with the image base64-encoded.
Look up by
The page URL
Coverage
Public pages on ports 80, 443, 8080 and 8443. Private and internal addresses are refused.
Cost
From 1 credit a call; failed and empty calls are free
Endpoints
2 endpoints
  • Details

Endpoints

Example

Screenshot a page (GET), with GET /v1/screenshot. Set SCRAPERCOMPANY_API_KEY to your key and run it; the full parameter list is in the API reference.

curl -f "https://api.scrapercompany.com/v1/screenshot?url=https%3A%2F%2Fexample.com" \
  -H "x-api-key: $SCRAPERCOMPANY_API_KEY" \
  -o screenshot.png
200 response
{
  "url": "https://example.com/",
  "final_url": "https://example.com/",
  "status_code": 200,
  "format": "png",
  "media_type": "image/png",
  "image": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==",
  "meta": {
    "render": true,
    "premium": false,
    "elapsed_s": 2.84,
    "format": "png",
    "width": 1440,
    "height": 900,
    "scale": 1,
    "full_page": false,
    "image_bytes": 21873
  }
}

Try it on your key

Good to know

  • The site's own status comes back in the X-Upstream-Status header. Only a 2xx page that produced an image is charged; an error page is returned free.
  • 1 credit for most pages; 5 for a site that refuses standard requests or with country; 75 with premium. 5 (75) is held while the capture runs.
  • Viewport 1440 x 900 by default, 320-3840 wide and 240-2160 high; full_page captures the whole page; selector captures one element.
  • jpeg and webp take a quality from 1 to 100 (80 by default); png is lossless.
  • An error is always JSON, never an image, so check the status before you save the body.

Any public page as HTML, markdown or text, when no ready-made source covers the site.

Or browse every data source.

Questions about this page?

Send the page link and your question, and the team will answer.

Email support