Commands
rs take
Take a screenshot of a URL or of HTML content.
rs take <url> [flags]
Basic Usage
# Screenshot a URL (saves to example-com.png) rs take https://example.com # Specify output file rs take https://example.com -o homepage.png # Use a preset rs take https://example.com --preset og_card # Multiple options rs take https://example.com --width 1920 --height 1080 --format webp --quality 90
Input Flags
| Flag | Description |
|---|---|
<url> |
URL to capture (positional argument) |
--html <string> |
Render HTML content instead of a URL |
One of <url> or --html is required. The CLI has no Markdown flag; to render Markdown, send markdown in a POST /v1/screenshot request (see the Markdown rendering guide) (see content input).
Output Flags
| Flag | Short | Description |
|---|---|---|
--output <file> |
-o |
Save to file (default: host name with dots replaced, e.g. example-com.png; screenshot.png for --html) |
--format <fmt> |
-f |
Output format: png, jpeg, webp, pdf (default: png) |
--quality <n> |
-q |
Image quality 1-100 (jpeg/webp only, default: 80) |
--json |
Return JSON metadata instead of binary (global flag) | |
--stdout |
Write binary to stdout (for piping) | |
--open |
Open the result in your default viewer |
Viewport Flags
| Flag | Description |
|---|---|
--width <n> |
Viewport width in pixels (API default: 1280) |
--height <n> |
Viewport height in pixels (API default: 800) |
--scale <n> |
Device scale factor, 1-3 (API default: 1) |
--mobile |
Enable mobile emulation |
--device <name> |
Emulate device (e.g., iphone_14_pro, pixel_7) |
Capture Flags
| Flag | Description |
|---|---|
--full-page |
Capture the full scrollable page |
--element <selector> |
Capture a specific CSS element |
--preset <name> |
Use a preset: og_card, twitter_card, full_page, etc. |
Wait Flags
| Flag | Description |
|---|---|
--delay <ms> |
Wait additional milliseconds before capture |
--wait-for <event> |
Wait condition: load, networkidle, domcontentloaded |
--wait-selector <sel> |
Wait for a CSS selector to appear |
--timeout <s> |
Maximum wait time in seconds (API default: 30, maximum: 60) |
Page Manipulation Flags
| Flag | Description |
|---|---|
--click <selector> |
CSS selector to click before capture |
--hide <selectors> |
Comma-separated selectors to hide (visibility: hidden) |
--remove <selectors> |
Comma-separated selectors to remove from DOM |
--inject-script <js> |
Inline JavaScript to inject before capture |
--inject-style <css> |
Inline CSS to inject before capture |
Content Blocking Flags
| Flag | Description |
|---|---|
--block-ads |
Block ad network requests |
--block-trackers |
Block analytics/tracking scripts |
--block-cookies |
Auto-dismiss cookie consent banners |
--block-chat |
Block chat widgets (Intercom, Drift, etc.) |
--block-urls <patterns> |
Block URLs matching patterns (comma-separated, glob syntax) |
--block-resources <types> |
Block resource types: font, media, image, script, stylesheet |
Browser Emulation Flags
| Flag | Description |
|---|---|
--dark-mode |
Force dark color scheme |
--reduced-motion |
Prefer reduced motion |
--media <type> |
Media type: screen or print |
--timezone <tz> |
Set timezone (e.g., America/New_York) |
--locale <loc> |
Set locale (e.g., fr-FR) |
--user-agent <ua> |
Custom User-Agent string |
--geolocation <lat,lng> |
Spoof geolocation (e.g., 40.7128,-74.006) |
Network Flags
| Flag | Description |
|---|---|
--headers <json> |
Custom HTTP headers as JSON (e.g., '{"X-Custom":"value"}') |
--cookies <json> |
Cookies as JSON array (e.g., '[{"name":"k","value":"v","domain":".example.com"}]') |
--auth-basic <user:pass> |
HTTP Basic auth for the target page |
--auth-bearer <token> |
Bearer token auth for the target page |
--bypass-csp |
Bypass Content Security Policy |
Cache Flags
| Flag | Description |
|---|---|
--cache-ttl <s> |
How long the result stays cached, in seconds (API default: 86400, range 3600-2592000) |
--cache-refresh |
Force a fresh render (sends cache.refresh: true) |
--cache-available |
Reuse a cached render with the same options when one exists, for 0 credits (sends cache.available: true) |
--no-cache |
Never reuse a cached render; always render fresh (sends cache.refresh: true). Using it together with --cache-available is an error |
Without --cache-available, every rs take renders fresh and costs 1 credit. With it, the API returns an earlier render of the same options from your account for 0 credits while it is within the cache TTL. See caching for the rules.
PDF Flags
Only apply when --format pdf is set.
| Flag | Description |
|---|---|
--pdf-paper <size> |
Paper size: a0 to a6, letter, legal or tabloid. ledger is an alias for tabloid. An unknown size is an error |
--pdf-width <size> |
Custom page width (e.g., 210mm, 8.5in) |
--pdf-height <size> |
Custom page height (e.g., 297mm, 11in) |
--pdf-landscape |
Landscape orientation |
--pdf-margin <css> |
Uniform margin (e.g., 1cm, 0.5in) |
--pdf-scale <n> |
Scale factor, 0.1-2.0 |
--pdf-background |
Include background graphics |
--pdf-header <html> |
Header HTML template |
--pdf-footer <html> |
Footer HTML template |
--pdf-fit-one-page |
Scale content to fit a single page |
--pdf-page-ranges <range> |
Pages to include (e.g., 1-5, 8, 10-12) |
--pdf-prefer-css-page-size |
Use the page size from the page's CSS @page rule |
Storage Flags
Upload the result to your own bucket (configure storage in the dashboard first).
| Flag | Description |
|---|---|
--storage-path <pattern> |
Enable storage upload and set the path template (e.g., screenshots/{year}/{month}/{day}/{hash}.{ext}) |
--storage-acl <acl> |
public-read or private |
Examples
# Social card for a blog post rs take https://myblog.com/hello-world --preset og_card -o og-image.png # Full page screenshot with ad blocking rs take https://news.site.com --full-page --block-ads --block-cookies # Mobile screenshot in dark mode rs take https://example.com --device iphone_14_pro --dark-mode # Generate a PDF rs take https://example.com/report --format pdf --pdf-paper a4 --pdf-margin 2cm -o report.pdf # Pipe to clipboard (macOS) rs take https://example.com --stdout | pbcopy # Get JSON metadata rs take https://example.com --json # Screenshot HTML content rs take --html '<h1>Hello World</h1>' --width 1200 --height 630 -o hello.png # Click a cookie banner, then hide the chat widget rs take https://example.com --click '.accept-cookies' --hide '.chat-widget,.popup' # Remove distracting elements from the page rs take https://example.com --remove '.sidebar,.footer,.ad-banner' # Inject custom CSS to style the page before capture rs take https://example.com --inject-style 'body { font-size: 20px; }' # Block specific URL patterns and resource types rs take https://example.com --block-urls '*google-analytics*,*.doubleclick.net' --block-resources font,media # Screenshot behind HTTP Basic auth rs take https://staging.example.com --auth-basic admin:secret123 # Capture one element rs take https://example.com --element '.logo' -o logo.png # Spoof timezone and locale for localized screenshots rs take https://example.com --timezone Europe/Paris --locale fr-FR --geolocation 48.8566,2.3522 # Pass custom headers (e.g., for feature flags) rs take https://example.com --headers '{"X-Feature-Flag":"new-design"}'
JSON output (--json prints the fields the CLI reads from the API response):
{ "id": "req_abc123", "status": "completed", "image": { "url": "https://cdn.renderscreenshot.com/xyz789.png", "width": 1280, "height": 800 }, "cache": { "hit": false, "key": "cache_xyz789" } }
rs batch
Take screenshots of multiple URLs at once.
rs batch <url1> <url2> ... [flags] rs batch --file <file> [flags]
Basic Usage
# Multiple URLs as arguments rs batch https://example.com https://github.com https://google.com # URLs from a file (one per line) rs batch --file urls.txt # URLs from stdin cat urls.txt | rs batch - # With shared options rs batch --file urls.txt --preset og_card --block-ads # Advanced: JSON manifest with per-URL options rs batch --manifest batch.json
Flags
| Flag | Description |
|---|---|
--file <path> |
Read URLs from file (one per line; lines starting with # are skipped) |
--manifest <path> |
JSON manifest with per-URL options |
--json |
Output results as JSON (global flag) |
All rs take flags (preset, viewport, blocking, browser, etc.) apply as shared options. Note that -f is the short form of --format, not --file. rs batch does not download files: it prints each result's image URL.
File Format
urls.txt (one URL per line):
https://example.com https://github.com https://google.com
batch.json (a JSON array, one object per URL):
[ { "url": "https://example.com", "preset": "og_card" }, { "url": "https://github.com", "preset": "full_page" }, { "url": "https://google.com", "width": 1920, "dark_mode": true } ]
Manifest keys the CLI reads: url (required), preset, device, width, height, scale, mobile, full_page, element, format, quality, delay, wait_for, wait_selector, click, inject_script, inject_style, block_ads, block_trackers, block_cookie_banners, block_chat_widgets, dark_mode, reduced_motion, user_agent, timezone, locale, cache_ttl and cache_refresh. Other keys are ignored.
Output
URL STATUS IMAGE URL https://example.com completed https://cdn.renderscreenshot.com/abc.png https://github.com completed https://cdn.renderscreenshot.com/def.png https://google.com error Page failed to load within 30 seconds
Check Batch Status
For async batches:
rs batch status <batch_id>
Batch ID: batch_abc123 Status: processing Total: 50 Completed: 33 Failed: 2
rs signed-url
Generate a signed GET /v1/screenshot URL for public embedding. Signed URLs don't expose your API key and expire automatically.
rs signed-url <url> [flags]
Usage
# Default: expires in 24 hours rs signed-url https://example.com --preset og_card # Custom expiration rs signed-url https://example.com --expires 7d # With screenshot options rs signed-url https://example.com --width 1200 --height 630 --block-ads
Flags
| Flag | Description |
|---|---|
--expires <duration> |
Expiration: 1h, 24h, 7d, 30d (default: 24h, max: 30d) |
--copy |
Copy the URL to clipboard |
A signed URL is a GET /v1/screenshot request, so only options that have a GET query parameter are carried into it. The URL carries --preset, --device, --width, --height, --scale, --full-page, --element (sent as selector), --format, --quality, --delay, --timeout, --click, --hide, --remove, --block-ads, --block-cookies, --dark-mode, --user-agent, --locale, --timezone, --cache-ttl, --cache-refresh, --cache-available, the --pdf-* flags and --html. Other rs take flags, such as --mobile, --block-trackers and --wait-for, have no GET query parameter and are left out of the URL.
The command signs with your secret key (rs_secret_) and puts your public key ID (rs_pub_) in the URL; it also needs an API key configured. The --expires value can be a Go duration (90m, 24h) or days (7d), up to 30 days.
Output
The parameters are sorted by name, then signature is appended:
https://api.renderscreenshot.com/v1/screenshot?expires=1710115200&format=png&key_id=rs_pub_xxxxx&preset=og_card&url=https%3A%2F%2Fexample.com&signature=a1b2c3d4e5f6...
Use in HTML
# Generate and use in an HTML meta tag URL=$(rs signed-url https://myblog.com/post --preset og_card --expires 30d) echo "<meta property=\"og:image\" content=\"$URL\" />"
Note: Signed URL generation requires your public key ID and secret key. See Authentication for setup.
rs preview
Fetch page metadata without taking a screenshot. Returns title, description, favicon, Open Graph tags, and Twitter card tags. The CLI fetches the page HTML itself, so rs preview uses no API credits and does not run JavaScript.
rs preview <url> [flags]
Basic Usage
rs preview https://github.com
Title: GitHub: Let's build from here Description: GitHub is where over 100 million developers shape the future of software... Favicon: https://github.githubassets.com/favicons/favicon.svg Open Graph: og:title: GitHub: Let's build from here og:description: GitHub is where over 100 million developers shape the future... og:image: https://github.githubassets.com/assets/github-logo-... og:url: https://github.com og:type: website og:site_name: GitHub Twitter Card: twitter:card: summary_large_image twitter:site: @github twitter:title: GitHub: Let's build from here twitter:description: GitHub is where over 100 million developers shape the future... twitter:image: https://github.githubassets.com/assets/github-logo-...
JSON Output
rs preview https://github.com --json
{ "title": "GitHub: Let's build from here", "description": "GitHub is where over 100 million developers shape the future of software...", "favicon": "https://github.githubassets.com/favicons/favicon.svg", "open_graph": { "title": "GitHub: Let's build from here", "description": "GitHub is where over 100 million developers shape the future...", "image": "https://github.githubassets.com/assets/github-logo-...", "url": "https://github.com", "type": "website", "site_name": "GitHub" }, "twitter_card": { "card": "summary_large_image", "site": "@github", "title": "GitHub: Let's build from here", "description": "GitHub is where over 100 million developers shape the future...", "image": "https://github.githubassets.com/assets/github-logo-..." } }
Flags
| Flag | Description |
|---|---|
--json |
Output as JSON (global flag) |
--timeout <s> |
Maximum wait time in seconds (default: 10) |
Use Cases
- Validate Open Graph tags before sharing
- Audit meta tags across multiple pages
- Build link preview features
- Check competitor social cards
- Debug missing or broken social sharing images
# Check multiple pages for url in https://example.com https://example.com/about https://example.com/blog; do echo "--- $url ---" rs preview "$url" echo done
rs cache
Manage cached screenshots.
Get Cached Screenshot
rs cache get <cache_key> -o screenshot.png
Delete a Cache Entry
rs cache delete <cache_key>
Cache entry deleted
Purge Multiple Entries
# Purge by keys rs cache purge --keys cache_abc,cache_def # Purge by URL pattern rs cache purge --url "https://example.com/*" # Purge entries older than a date rs cache purge --before 2026-01-01 # Purge by storage path pattern rs cache purge --pattern "screenshots/2026/01/*"
Purged 42 entries
--before takes YYYY-MM-DD or an RFC 3339 timestamp. If you pass several purge flags, only the first one in the order --keys, --url, --before, --pattern is used.
rs presets
List available screenshot presets.
rs presets
The output is a table with ID, NAME, WIDTH and HEIGHT columns. See the presets reference for the full settings of each preset:
| ID | Viewport | Format |
|---|---|---|
og_card |
1200×630 | png |
twitter_card |
1200×600 | png |
twitter_card_large |
1200×628 | png |
link_preview |
800×600 | png |
full_page |
1280×800, full page | png |
mobile |
390×844 | png |
mobile_landscape |
844×390 | png |
desktop_hd |
1920×1080 | png |
desktop_4k |
3840×2160 | png |
pdf_document |
Letter |
rs devices
List available device presets for viewport emulation.
rs devices
The output is a table with ID, NAME, WIDTH and HEIGHT columns. The devices reference lists every device with its viewport, scale and user agent.
ID NAME WIDTH HEIGHT iphone_14_pro iPhone 14 Pro 393 852 pixel_7 Google Pixel 7 412 915 ...
rs whoami
Show the masked API key, account, plan, credit usage, rate limit and config path.
rs whoami
API Key: rs_live_****xxxx Account: Acme Inc Plan: Growth (12000 credits per period) Credits: 12000 Used: 2518 Remaining: 9482 Period: 2026-10-05T08:00:00Z to 2026-11-05T08:00:00Z Rate limit: 120 requests per 60s Config: /Users/you/.config/renderscreenshot/config.json
rs whoami reads GET /v1/usage, which uses no credit. Period shows not reported for a paid account whose first invoice has not been recorded yet. --json prints the same fields as JSON.
rs config
View and manage CLI configuration.
Show Current Config
rs config
api_key: rs_live_****xxxx public_key_id: rs_pub_xxxxx secret_key: rs_secret_****xxxx path: /Users/you/.config/renderscreenshot/config.json
rs config show prints the same output.
Set a Config Value
rs config set api_key rs_live_xxxxx rs config set public_key_id rs_pub_xxxxx rs config set secret_key rs_secret_xxxxx
Get a Specific Value
rs config get api_key
rs_live_****xxxx
Show Config File Path
rs config path
/Users/you/.config/renderscreenshot/config.json
rs login / rs logout
See Authentication for details.
Global Flags
These flags work with all commands:
| Flag | Description |
|---|---|
--api-key <key> |
API key (overrides RS_API_KEY and the config file) |
--json |
Output as JSON (where applicable) |
--quiet |
Suppress progress output |
--verbose |
Show detailed request/response info |
--version |
Print version and exit |
--help |
Show help for any command |
rs take --help rs batch --help rs cache --help