jsonlink
DocsScreenshot
Endpoints

Screenshot

Capture any web page as an image: desktop, mobile, full page or retina. Cookie banners are hidden automatically.

GEThttps://jsonlink.io/api/screenshot
2 credits per successful requestFailed requests are freeTry it live →

Parameters

All options are optional except url and api_key; every screenshot costs 2 credits, whatever options you use.

urlstringRequired

The full URL of the page to capture.

api_keystringRequired

Your API key.

viewport_widthintegerDefault: 1920

Browser width in pixels. Use 390 for a phone.

viewport_heightintegerDefault: 1080

Browser height in pixels.

device_scale_factornumberDefault: 1

Pixel density, from 1 to 3. Use 2 for retina-quality images.

viewport_devicestring

A device preset that sets viewport, pixel density, touch and user agent: iphone_15, iphone_15_pro_max, iphone_se, pixel_8, galaxy_s24, ipad, ipad_pro, laptop, macbook_air, desktop_hd. Overrides the viewport options.

full_pagebooleanDefault: false

Set to true to capture the whole scrollable page instead of the viewport.

full_page_scrollbooleanDefault: false

With full_page=true, scroll through the page first so lazy-loaded images and sections appear. Recommended for most full-page captures.

selectorstring

CSS selector of one element to capture instead of the page, e.g. #pricing. Returns SELECTOR_NOT_FOUND (not billed) if it doesn’t exist.

Image output

formatstringDefault: jpg

jpg, png or webp. WebP files are usually 30–50% smaller than JPG.

qualityintegerDefault: 80

JPG and WebP quality from 1 to 100. Ignored for PNG.

image_widthinteger

Width of the resulting image in pixels, for thumbnails. The page is rendered at the viewport size and scaled down; the height keeps the proportion.

Clean screenshots

block_cookie_bannersbooleanDefault: true

Hide cookie and consent banners.

block_adsbooleanDefault: true

Block ads (EasyList). Set false to capture the page with its ads.

block_trackersbooleanDefault: true

Block tracking and analytics scripts (EasyPrivacy). Pages often load faster too. Set false to allow them.

block_chatsbooleanDefault: false

Hide live chat widgets: Intercom, Drift, Crisp, HubSpot, Zendesk, Tawk.to, Tidio, LiveChat and more.

hide_selectorsstring

Comma-separated CSS selectors to hide, e.g. .promo-bar,#newsletter-popup.

stylesstring

Custom CSS injected before the capture, up to 10,000 characters.

dark_modebooleanDefault: false

Emulate prefers-color-scheme: dark, for sites with a dark theme.

reduced_motionbooleanDefault: false

Emulate prefers-reduced-motion and stop CSS animations and transitions.

Timing

wait_untilstringDefault: networkidle2

When the page counts as loaded: load, domcontentloaded, networkidle0 or networkidle2.

wait_for_selectorstring

Wait until this CSS selector is on the page before capturing (up to 15 seconds). Returns SELECTOR_NOT_FOUND (not billed) if it never appears.

delaynumberDefault: 0

Seconds to wait after the page loads before capturing, up to 10, for animations or late content.

timeoutintegerDefault: 15

Seconds to wait for the page to load, from 5 to 60. Slow pages are still captured with what loaded.

Response

pathstring

Path of the image on our server.

urlstring

Public URL of the image. Download it — it is deleted after 7 days.

Store your screenshots. Images are kept for 7 days and hotlinking them is not allowed. Download the file and serve it from your own storage.

Errors

When a page can't be loaded the API returns {"error": "UNABLE_TO_LOAD_PAGE"} instead of capturing an error page, and{"error": "SELECTOR_NOT_FOUND"} when selector or wait_for_selector doesn't match. Neither is billed. See Errors.

Recipes

  • Clean marketing screenshot: block_chats=true (ads and trackers are already blocked by default)
  • Full page with lazy images: full_page=true&full_page_scroll=true&format=webp
  • iPhone, retina: viewport_device=iphone_15
  • Thumbnail: image_width=400&format=webp&quality=70
  • Open Graph image: viewport_width=1200&viewport_height=630
  • One section of a page: selector=%23pricing (URL-encode # as %23)
  • Dark theme: dark_mode=true
  • Single-page apps: wait_for_selector=.loaded or delay=2
  • Remove a banner: hide_selectors=.promo-bar