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.
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
| ScreenshotAPI | Urlbox | |
|---|---|---|
| Free tier | 200 free screenshots per month | 7-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
| Urlbox | ScreenshotAPI | Notes |
|---|---|---|
url | url | Same |
width | width | Same |
height | height | Same |
full_page=true | fullPage=true | Camel case |
format=png | type=png | Different param name |
quality=80 | quality=80 | Same |
wait_until=networkidle | waitUntil=networkidle | Camel case |
wait_for=.content | waitForSelector=.content | Different param name |
delay=2000 | delay=2000 | Same |
dark_mode=true | colorScheme=dark | Different approach |
retina=true | retina=true | Same functionality |
block_ads=true | blockAds=true | Built-in ad blocking |
s3_path=... | N/A | Store 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)
javascriptconst 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)
javascriptasync 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)
pythonimport 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)
pythonimport 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)
bashcurl "https://api.urlbox.io/v1/API_KEY/TOKEN/png?url=https://example.com&width=1440&height=900" \ --output screenshot.png
After: ScreenshotAPI (cURL)
bashcurl -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:
javascriptconst 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:
javascriptimport { 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
- Sign up at screenshotapi.to and get your API key
- Update auth: Switch from query-string tokens to
x-api-keyheader - Update parameters: Rename
format→type,full_page→fullPage,wait_until→waitUntil,wait_for→waitForSelector - Update endpoint: Change the base URL
- Test: Compare screenshots visually
- Remove Urlbox SDK: Uninstall the Urlbox package
Next Steps
- Read the Urlbox vs ScreenshotAPI comparison for a detailed feature matrix
- Browse the API documentation for all parameters
- Check pricing for subscription plans
- See the best screenshot APIs for a broader comparison
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.