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 and navigator.languages in JavaScript
It does not change the browser's default Intl locale. Dates and numbers that a page formats with Intl or toLocaleString() without an explicit locale keep the browser default. Pages that pick their language from the header or from navigator.language show the requested locale. See the localized screenshots guide.
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 |
user_agent |
browser.user_agent |
locale |
browser.locale |
timezone |
browser.timezone |
GET /v1/screenshot?url=https://example.com&dark_mode=true&locale=fr-FR&timezone=Europe/Paris
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
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
Java
import com.renderscreenshot.sdk.Client; import com.renderscreenshot.sdk.TakeOptions; Client client = new Client("rs_live_xxxxx"); byte[] image = client.take( TakeOptions.url("https://docs.example.com") .darkMode() .reducedMotion() );
Node.js
import { Client, TakeOptions } from 'renderscreenshot'; const client = new Client('rs_live_xxxxx'); const image = await client.take( TakeOptions.url('https://docs.example.com') .darkMode() .reducedMotion() );
PHP
use RenderScreenshot\Client; use RenderScreenshot\TakeOptions; $client = new Client('rs_live_xxxxx'); $image = $client->take( TakeOptions::url('https://docs.example.com') ->darkMode() ->reducedMotion() );
Python
from renderscreenshot import Client, TakeOptions client = Client('rs_live_xxxxx') image = client.take( TakeOptions.url('https://docs.example.com') .dark_mode() .reduced_motion() )
Ruby
require 'net/http' require 'json' uri = URI('https://api.renderscreenshot.com/v1/screenshot') http = Net::HTTP.new(uri.host, uri.port) http.use_ssl = true request = Net::HTTP::Post.new(uri) request['Authorization'] = 'Bearer rs_live_xxxxx' request['Content-Type'] = 'application/json' request.body = { url: 'https://docs.example.com', browser: { dark_mode: true, reduced_motion: true } }.to_json response = http.request(request) File.binwrite('docs-dark.png', response.body)
French Localization Test
curl
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
Java
import com.renderscreenshot.sdk.Client; import com.renderscreenshot.sdk.TakeOptions; Client client = new Client("rs_live_xxxxx"); byte[] image = client.take( TakeOptions.url("https://example.com") .locale("fr-FR") .timezone("Europe/Paris") );
Node.js
import { Client, TakeOptions } from 'renderscreenshot'; const client = new Client('rs_live_xxxxx'); const image = await client.take( TakeOptions.url('https://example.com') .locale('fr-FR') .timezone('Europe/Paris') );
PHP
use RenderScreenshot\Client; use RenderScreenshot\TakeOptions; $client = new Client('rs_live_xxxxx'); $image = $client->take( TakeOptions::url('https://example.com') ->locale('fr-FR') ->timezone('Europe/Paris') );
Python
from renderscreenshot import Client, TakeOptions client = Client('rs_live_xxxxx') image = client.take( TakeOptions.url('https://example.com') .locale('fr-FR') .timezone('Europe/Paris') )
Ruby
require 'net/http' require 'json' uri = URI('https://api.renderscreenshot.com/v1/screenshot') http = Net::HTTP.new(uri.host, uri.port) http.use_ssl = true request = Net::HTTP::Post.new(uri) request['Authorization'] = 'Bearer rs_live_xxxxx' request['Content-Type'] = 'application/json' request.body = { url: 'https://example.com', browser: { locale: 'fr-FR', timezone: 'Europe/Paris' } }.to_json response = http.request(request) File.binwrite('french-version.png', response.body)
See Also
- Viewport - Device and viewport settings
- Network Options - Headers and authentication
- Page Modifications - Custom styles
- Dark mode guide - Force light or dark captures
- Custom user agent guide - What changing the user agent does and does not do
- Print media guide - Capture
@media printlayouts