Take a screenshot
Waits for the screenshot and returns the image. A failed screenshot is not charged. Send an Idempotency-Key header to make a retry safe: the same key returns the same screenshot without charging twice.
Request
- Base URL: https://localscreenshot.com/v1
- URL: https://localscreenshot.com/v1/screenshot
- Auth: HTTP bearer
Headers
Request body
The public http or https page to capture.
Load the page from this country (ISO 3166-1 alpha-2 code, see /v1/countries). The response reports the country actually observed. If it cannot be obtained, the request fails and is not charged. Costs 2 credits instead of 1.
Screen size as WIDTHxHEIGHT, for example 1440x900. Shortcut for viewport_width and viewport_height.
Width of the browser window, in pixels.
Height of the browser window, in pixels. With full_page, the image is taller than this.
Pixel density. 2 gives a sharper, larger image.
Capture as this device (screen size, pixel density, mobile browser).
Hold a phone or a tablet upright (portrait) or on its side (landscape). Needs a phone or tablet device.
Capture the whole scrollable page instead of the visible part.
Capture only the first element matching this CSS selector.
File format. pdf saves the whole page as a document; it cannot be combined with selector or max_width.
Quality for jpeg and webp. Ignored for png and pdf.
Ask the page for its light or dark theme.
Browser language, for example fr or fr-FR. Without it, a screenshot from a country uses the main language of that country.
Browser time zone, for example Europe/Paris. Without it, a screenshot from a country uses the main time zone of that country.
User-Agent the page receives. A preset (googlebot, googlebot_mobile) or your own string. Useful to compare what a site shows to a crawler and to a visitor. A site that checks the crawler's IP address is not fooled.
Wait until an element matching this CSS selector is visible.
Click this one element before the screenshot, to open a menu, a tab or a dialog. A CSS selector matching exactly one element: use it when you know the code of the page. One click, no typing. Costs 1 more credit. Not with pdf, not with click_text.
Same click, pointed at by the text a visitor reads on the element, for example "Show all": use it when you do not know the code of the page. The whole text of exactly one visible button, tab or other clickable element, upper or lower case. Not a part of it, not a pattern. One click, no typing. Costs 1 more credit. Not with pdf, not with click_selector.
Extra wait before the capture, in milliseconds.
Hide every element matching these CSS selectors. In a URL, separate them with commas.
Freeze animations and transitions.
Hide headers, bars and buttons that stay fixed on screen.
Removes most cookie banners. A banner the filters do not know stays in the picture.
Block ads. Screenshots taken from a country block ads by default: set block_ads to false to see them. Without a country, ads stay unless you set it to true.
Hide chat bubbles.
Close pop-ups and newsletter overlays.
Scale the image down to this width. Useful to keep it small for a vision model.
image returns the picture itself. json returns its link, the page details and the attestation.
Return an id right away instead of waiting. Read the result at /v1/screenshots/{id}.
Response
The image, or the JSON document when response=json.
Signed technical attestation, only when a country was requested. It is not legal proof.
Changes
No recorded changes to this operation across all 1 revision of this API.