Browser Options
Configure browser emulation settings including color scheme, media type, locale, timezone, and geolocation.
Full Configuration
{ "browser": { "dark_mode": true, "reduced_motion": true, "media": "print", "user_agent": "custom-agent/1.0", "locale": "en-US", "timezone": "America/New_York", "geolocation": { "latitude": 40.7128, "longitude": -74.0060, "accuracy": 100 } } }
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
dark_mode |
boolean | — | Force dark/light color scheme |
reduced_motion |
boolean | false |
Prefer reduced motion |
media |
string | screen |
Media type: screen or print |
user_agent |
string | — | Custom User-Agent string |
locale |
string | en-US |
Browser locale (BCP 47 format) |
timezone |
string | — | Timezone (IANA format) |
geolocation |
object | — | Spoof geolocation coordinates |
Dark Mode
Force dark or light color scheme:
{ "browser": { "dark_mode": true } }
This sets prefers-color-scheme: dark media query, which triggers dark mode on sites that support it.
For light mode:
{ "browser": { "dark_mode": false } }
Reduced Motion
Disable animations for cleaner screenshots:
{ "browser": { "reduced_motion": true } }
Sets prefers-reduced-motion: reduce, which asks sites to minimize motion.
Media Type
Emulate print or screen media:
{ "browser": { "media": "print" } }
Useful for capturing print-optimized layouts.
Custom User Agent
Set a custom User-Agent string:
{ "browser": { "user_agent": "Mozilla/5.0 (compatible; MyBot/1.0)" } }
Useful for accessing bot-friendly versions of pages or bypassing user-agent checks.
Locale
Set the browser locale for localized content:
{ "browser": { "locale": "fr-FR" } }
This affects:
- Accept-Language header
- navigator.language in JavaScript
- Date/number formatting
Common Locale Codes
| Code | Language |
|---|---|
en-US |
English (US) |
en-GB |
English (UK) |
fr-FR |
French |
de-DE |
German |
es-ES |
Spanish |
ja-JP |
Japanese |
zh-CN |
Chinese (Simplified) |
Timezone
Set the browser timezone:
{ "browser": { "timezone": "America/New_York" } }
This affects JavaScript Date objects and time displays.
Common Timezones
| Timezone | Location |
|---|---|
America/New_York |
US Eastern |
America/Los_Angeles |
US Pacific |
Europe/London |
UK |
Europe/Paris |
Central Europe |
Asia/Tokyo |
Japan |
Asia/Shanghai |
China |
Geolocation
Spoof the browser's geolocation:
{ "browser": { "geolocation": { "latitude": 51.5074, "longitude": -0.1278, "accuracy": 100 } } }
| Parameter | Type | Description |
|---|---|---|
latitude |
number | Latitude (-90 to 90) |
longitude |
number | Longitude (-180 to 180) |
accuracy |
number | Accuracy in meters |
Useful for location-based content like store locators or local search results.
GET Request Parameters
| Query Param | Maps to |
|---|---|
dark_mode |
browser.dark_mode |
GET /v1/screenshot?url=https://example.com&dark_mode=true
Common Patterns
Dark Mode Social Card
{ "url": "https://example.com", "preset": "og_card", "browser": { "dark_mode": true } }
Localized Screenshot
{ "url": "https://example.com", "browser": { "locale": "ja-JP", "timezone": "Asia/Tokyo" } }
Print-Optimized Capture
{ "url": "https://example.com/article", "browser": { "media": "print", "reduced_motion": true } }
Location-Based Content
{ "url": "https://maps.example.com/nearby", "browser": { "geolocation": { "latitude": 34.0522, "longitude": -118.2437, "accuracy": 50 } } }
Examples
Dark Mode Documentation
curl -X POST https://api.renderscreenshot.com/v1/screenshot \ -H "Authorization: Bearer rs_live_xxxxx" \ -H "Content-Type: application/json" \ -d '{ "url": "https://docs.example.com", "browser": { "dark_mode": true, "reduced_motion": true } }' \ --output docs-dark.png
French Localization Test
curl -X POST https://api.renderscreenshot.com/v1/screenshot \ -H "Authorization: Bearer rs_live_xxxxx" \ -H "Content-Type: application/json" \ -d '{ "url": "https://example.com", "browser": { "locale": "fr-FR", "timezone": "Europe/Paris" } }' \ --output french-version.png
See Also
- Viewport - Device and viewport settings
- Network Options - Headers and authentication
- Page Modifications - Custom styles