Migrate from Urlbox to ScreenshotAPI

Switch from Urlbox to ScreenshotAPI with this migration guide. Parameter mapping, code changes, and pricing comparison for screenshot APIs.

Last updated: 2026-03-25

Try ScreenshotAPI free

200 free screenshots/month. No credit card required.

Start for free

Urlbox is a solid screenshot API, but its monthly subscription model means you pay for capacity whether you use it or not. ScreenshotAPI offers flexible subscriptions and pay-as-you-go credit packs, making it more cost-effective for teams with variable workloads. This guide walks through the migration.

Pricing Comparison

ScreenshotAPIUrlbox
Free tier200 free screenshots per month7-day trial
~5,000/mo$19/mo (5,000 screenshots)$19/mo (2,000 screenshots)
~25,000/mo$49/mo (25,000 screenshots)$49/mo (5,000 screenshots)
~100,000/mo$149/mo (100,000 screenshots)$99/mo (15,000 screenshots)

Our advantages:

  • 200 free screenshots per month free tier (vs 7-day trial)
  • Flexible credit packs for pay-as-you-go usage
  • Urlbox: Most expensive
  • Urlbox: Strict tier-gating
  • Urlbox: No free tier

Parameter Mapping

UrlboxScreenshotAPINotes
urlurlSame
widthwidthSame
heightheightSame
full_page=truefullPage=trueCamel case
format=pngtype=pngDifferent param name
quality=80quality=80Same
wait_until=networkidlewaitUntil=networkidleCamel case
wait_for=.contentwaitForSelector=.contentDifferent param name
delay=2000delay=2000Same
dark_mode=truecolorScheme=darkDifferent approach
retina=trueretina=trueSame functionality
block_ads=trueblockAds=trueBuilt-in ad blocking
s3_path=...N/AStore result yourself

Authentication Change

Urlbox

javascript
// Urlbox uses query-string API key or signed URLs const url = `https://api.urlbox.io/v1/${API_KEY}/${TOKEN}/png?url=https://example.com`;

ScreenshotAPI

javascript
// ScreenshotAPI uses header-based auth const response = await fetch( 'https://screenshotapi.to/api/v1/screenshot?url=https://example.com&type=png', { headers: { 'x-api-key': 'sk_live_your_api_key' } } );

Before: Urlbox (JavaScript)

javascript
const Urlbox = require('urlbox'); const urlbox = Urlbox(API_KEY, API_SECRET); async function takeScreenshot(targetUrl) { const imgUrl = urlbox.buildUrl({ url: targetUrl, width: 1440, height: 900, format: 'png', full_page: false, wait_until: 'networkidle', dark_mode: true, }); const response = await fetch(imgUrl); return Buffer.from(await response.arrayBuffer()); }

After: ScreenshotAPI (JavaScript)

javascript
async function takeScreenshot(targetUrl) { const params = new URLSearchParams({ url: targetUrl, width: '1440', height: '900', type: 'png', waitUntil: 'networkidle', colorScheme: 'dark', }); const response = await fetch( `https://screenshotapi.to/api/v1/screenshot?${params}`, { headers: { 'x-api-key': process.env.SCREENSHOT_API_KEY } } ); if (!response.ok) throw new Error(`Screenshot failed: ${response.status}`); return Buffer.from(await response.arrayBuffer()); }

Before: Urlbox (Python)

python
import requests def take_screenshot(url): response = requests.get( f"https://api.urlbox.io/v1/{API_KEY}/{TOKEN}/png", params={ "url": url, "width": 1440, "height": 900, "full_page": False, "wait_until": "networkidle", } ) return response.content

After: ScreenshotAPI (Python)

python
import requests def take_screenshot(url): response = requests.get( "https://screenshotapi.to/api/v1/screenshot", params={ "url": url, "width": 1440, "height": 900, "type": "png", "waitUntil": "networkidle", }, headers={"x-api-key": "sk_live_your_api_key"}, ) response.raise_for_status() return response.content

Before: Urlbox (cURL)

bash
curl "https://api.urlbox.io/v1/API_KEY/TOKEN/png?url=https://example.com&width=1440&height=900" \ --output screenshot.png

After: ScreenshotAPI (cURL)

bash
curl -G "https://screenshotapi.to/api/v1/screenshot" \ -d "url=https://example.com" \ -d "width=1440" \ -d "height=900" \ -d "type=png" \ -H "x-api-key: sk_live_your_api_key" \ --output screenshot.png

Handling Missing Features

Retina/HiDPI (Urlbox: retina=true)

ScreenshotAPI supports retina rendering via the retina=true parameter:

javascript
const params = new URLSearchParams({ url: 'https://example.com', width: '1440', height: '900', retina: 'true', type: 'png' });

S3 Upload (Urlbox: s3_path)

Upload the result yourself after capture:

javascript
import { S3Client, PutObjectCommand } from '@aws-sdk/client-s3'; const buffer = await takeScreenshot(url); await s3.send(new PutObjectCommand({ Bucket: 'my-screenshots', Key: `screenshots/${Date.now()}.png`, Body: buffer, ContentType: 'image/png' }));

Migration Steps

  1. Sign up at screenshotapi.to and get your API key
  2. Update auth: Switch from query-string tokens to x-api-key header
  3. Update parameters: Rename formattype, full_pagefullPage, wait_untilwaitUntil, wait_forwaitForSelector
  4. Update endpoint: Change the base URL
  5. Test: Compare screenshots visually
  6. Remove Urlbox SDK: Uninstall the Urlbox package

Next Steps

Frequently asked questions

Why switch from Urlbox to ScreenshotAPI?

ScreenshotAPI offers flexible subscriptions and pay-as-you-go credit packs, with competitive pricing compared to Urlbox's monthly subscriptions. For teams with variable screenshot volumes, this can reduce costs significantly.

How different is the API surface?

Both are REST APIs that accept query parameters and return image responses. Most parameters map directly. The main difference is authentication: Urlbox uses query-string auth tokens or signed URLs, while ScreenshotAPI uses an x-api-key header.

Do I need to change my code?

Yes, but minimally. You need to update the API endpoint URL, authentication method, and a few parameter names. The overall request/response pattern is the same.

Does ScreenshotAPI support Urlbox's webhook feature?

ScreenshotAPI returns screenshots synchronously. For async workflows, you can implement your own queue with a background job that calls the API and stores the result.

Related resources

Start capturing screenshots today

Create a free account and get 200 free screenshots per month to try the API. No credit card required.