# Website Screenshot ## Overview | Property | Value | |----------|-------| | **Status** | active | | **Method** | `GET` | | **Endpoint** | `/v1/website/screenshot` | | **Base URL** | `https://api.browsersolver.com` | | **Credit Cost** | 2 credits per call | | **Documentation** | https://www.browsersolver.com/library/website-screenshot | ## Description Turn any public URL into a PNG, JPEG, WebP, or PDF asset rendered by BrowserSolver. No local Chromium fleet to operate. ## Authentication - **Key Name:** `x-api-key` - **Location:** HTTP Header - **Get an API key:** https://app.browsersolver.com/register ## Example Request ```bash curl --location --request GET 'https://api.browsersolver.com/v1/website/screenshot' \ --header 'Content-Type: application/json' \ --header 'x-api-key: YOUR_API_KEY' ``` ## Documentation ## Purpose [Website Screenshot](/v1/website/screenshot) renders a live page in BrowserSolver infrastructure and returns a binary asset: PNG, JPEG, WebP, or PDF. You get pixel output for dashboards, QA, audits, and archives without maintaining your own browser farm. For HTML extraction instead of images, use [Website Rendering](/v1/website/rendering). To learn whether bot protection is present first, run [Website Antibot](/v1/website/antibot). **Pricing:** 2 credits per successful capture. ## Quickstart Pass `url` plus your API key. The response body is the generated file. ``` curl -L "https://api.browsersolver.com/v1/website/screenshot?url=https://books.toscrape.com" \ -H "x-api-key: YOUR_KEY" --output page.png ``` ## Popular options **Full page height** ``` curl -L "https://api.browsersolver.com/v1/website/screenshot?url=https://books.toscrape.com&full_page=true" \ -H "x-api-key: YOUR_KEY" --output full.png ``` **Mobile profile** ``` curl -L "https://api.browsersolver.com/v1/website/screenshot?url=https://books.toscrape.com&device=iphone_14_pro" \ -H "x-api-key: YOUR_KEY" --output mobile.png ``` **PDF export** ``` curl -L "https://api.browsersolver.com/v1/website/screenshot?url=https://books.toscrape.com&format=pdf&full_page=true" \ -H "x-api-key: YOUR_KEY" --output page.pdf ``` ## Parameter groups | Group | Highlights | |---|---| | Output | `format`, `viewport_width`, `viewport_height`, `scale_factor`, `image_quality` | | Devices | `device` presets for phones and tablets | | Full page | `full_page`, `full_page_scroll`, `full_page_scroll_duration` | | Timing | `wait_for_selector`, `wait_until`, `delay` for SPAs | | Cleanup | `remove_cookie_banners`, `remove_ads`, `remove_selectors`, `selector` | | Performance | `block_urls`, `block_resources`, `proxy` | | Storage | Optional direct upload to S3 or compatible object storage | ## Practical notes - Dynamic pages differ between captures; store a timestamp with each file. - Prefer `wait_for_selector` over blind `delay` on JavaScript-heavy sites. - Full-page mode on infinite-scroll pages can produce very tall images. - Overlay removal varies by site; custom `remove_selectors` is the most reliable knob. - Treat the HTTP body as binary (Blob or ArrayBuffer) in clients.