1. Get an API key and make one call
Sign up for the free plan and send your key in the apikey header (or the apikey query parameter):
curl -G "https://api.screenshotbase.com/v1/take" \
--data-urlencode "url=https://example.com" \
-d full_page=1 -d format=png \
-H "apikey: YOUR-API-KEY" \
-o screenshot.png
The response is the file itself. Errors come back as JSON with an HTTP status code; every response carries an X-Request-Id header for support.
2. Map your options
From another screenshot API
Most screenshot APIs offer the same core options under similar names. Look for the option you use in the left column:
| What you want | screenshotbase parameter |
|---|---|
| The page to capture | url |
| Your own HTML instead of a URL | html in the JSON body of POST /v1/take |
| Output format | format: png (default), jpg, webp, gif, pdf or markdown |
| Image quality | quality, 0 to 100 (JPG and WebP) |
| Full-page capture | full_page=1 |
| Viewport size | viewport_width, viewport_height (default 1280 × 800) |
| Retina / device pixel ratio | device_scale_factor, 0.5 to 3 |
| Wait for the page | wait_until (load, domcontentloaded, networkidle0, networkidle2), delay in seconds, timeout |
| Block ads, cookie banners, chat widgets | block_ads=1, block_cookie_banners=1, block_chats=1 |
| Hide elements | hide_selectors[], up to 50 CSS selectors |
| Custom CSS | styles |
| Load the page from another country | ip_country_code, a lowercase country code such as de |
| Store the file and get a URL | upload=1 |
| File name of the download | attachment_name |
| PDF paper, margins, page ranges | pdf_paper_format, pdf_landscape, pdf_margin, pdf_page_ranges, pdf_print_background, pdf_media_type, pdf_scale, pdf_fit_one_page |
From Puppeteer or Playwright
If you run a headless browser yourself, these Puppeteer calls map to parameters of one API request. Playwright’s page.screenshot() and page.pdf() take the same options, and its networkidle corresponds to networkidle0.
| Your code | screenshotbase parameter |
|---|---|
page.setViewport({ width, height, deviceScaleFactor }) | viewport_width, viewport_height, device_scale_factor |
page.goto(url, { waitUntil }) | url, wait_until |
page.setContent(html) | html in the JSON body of POST /v1/take |
page.screenshot({ fullPage: true }) | full_page=1 |
page.screenshot({ type: 'jpeg', quality }) | format=jpg, quality |
page.addStyleTag({ content }) | styles |
page.pdf({ format, landscape, margin, printBackground, scale, pageRanges }) | format=pdf with pdf_paper_format, pdf_landscape, pdf_margin, pdf_print_background, pdf_scale, pdf_page_ranges |
The take endpoint documentation lists every parameter with its range and default.
3. Check the limits that matter for you
- Time: a screenshot of a URL has up to 90 seconds; a PDF, markdown and any render of HTML input about 12 seconds. See status codes.
- Size: viewport and image size limits are in size limits.
- Quota: see pricing and rate limits.
4. Switch over
Run your captures on the free plan side by side with your current setup, compare the results, then choose a plan and replace the calls.