Commands

rs take

Take a screenshot of a URL, HTML, or Markdown content.

rs take <url> [flags]

Basic Usage

# Screenshot a URL (saves to screenshot.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
--markdown <string> Render Markdown content instead of a URL

One of <url>, --html, or --markdown is required.

Output Flags

Flag Short Description
--output <file> -o Save to file (default: auto-named from URL)
--format <fmt> -f Output format: png, jpeg, webp, pdf (default: png)
--quality <n> -q Image quality 1-100 (jpeg/webp only, default: 80)
--transparent Transparent background (png/webp only)
--json Return JSON metadata instead of binary
--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 (default: 1280)
--height <n> Viewport height in pixels (default: 800)
--scale <n> Device scale factor, 1-3 (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 (default: 30)

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> JavaScript to inject before capture (inline or URL)
--inject-style <css> CSS to inject before capture (inline or URL)

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> Cache duration in seconds (default: 86400)
--cache-refresh Bypass cache and force a fresh render
--cache-available Return cached screenshot if available, skip rendering if not
--no-cache Disable caching entirely

Validation Flags

Flag Description
--fail-on-error Fail if the page has console errors
--fail-if-missing <text> Fail if text is not found on the page (comma-separated)
--fail-if-contains <text> Fail if text is found on the page (comma-separated)

PDF Flags

Only apply when --format pdf is set.

Flag Description
--pdf-paper <size> Paper size: a4, letter, legal, tabloid
--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)

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

# Render Markdown
rs take --markdown '# Hello World' --width 800 --height 600 -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

# Transparent background (for logos, icons)
rs take https://example.com/logo --element '.logo' --transparent -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

# Validate page content after screenshot
rs take https://app.example.com/dashboard --fail-if-contains 'Error,404' --fail-if-missing 'Welcome'

# Pass custom headers (e.g., for feature flags)
rs take https://example.com --headers '{"X-Feature-Flag":"new-design"}'

JSON output:

{
  "id": "req_abc123",
  "status": "completed",
  "image": {
    "url": "https://cdn.renderscreenshot.com/xyz789.png",
    "width": 1280,
    "height": 800,
    "size": 123456,
    "format": "png"
  },
  "cache": {
    "hit": false,
    "key": "cache_xyz789",
    "url": "https://cdn.renderscreenshot.com/xyz789.png",
    "expires_at": "2026-03-10T00:00:00Z"
  },
  "usage": {
    "credits": 1,
    "remaining": 9999
  }
}

rs batch

Take screenshots of multiple URLs at once.

rs batch <url1> <url2> ... [flags]
rs batch -f <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 -f urls.txt

# URLs from stdin
cat urls.txt | rs batch -

# With shared options
rs batch -f urls.txt --preset og_card --block-ads

# Advanced: JSON manifest with per-URL options
rs batch --manifest batch.json

Flags

Flag Short Description
--file <path> -f Read URLs from file (one per line)
--manifest <path> JSON manifest with per-URL options
--output-dir <dir> -d Directory for output files (default: current dir)
--concurrency <n> -c Max concurrent requests (default: plan limit)
--json Output results as JSON
--preset <name> Apply preset to all URLs

All rs take flags (viewport, blocking, browser, etc.) apply as shared defaults.

File Format

urls.txt (one URL per line):

https://example.com
https://github.com
https://google.com

batch.json (manifest with per-URL options):

{
  "requests": [
    { "url": "https://example.com", "preset": "og_card" },
    { "url": "https://github.com", "preset": "full_page" },
    { "url": "https://google.com", "width": 1920, "dark_mode": true }
  ]
}

Output

Batch: 3 URLs
  [1/3] https://example.com ............ ok   (1.2s) → example-com.png
  [2/3] https://github.com ............ ok   (1.8s) → github-com.png
  [3/3] https://google.com ............ ok   (0.9s) → google-com.png

Completed: 3/3  |  Credits used: 3  |  Total: 3.9s

Check Batch Status

For async batches (>10 URLs or webhook specified):

rs batch status <batch_id>
Batch batch_abc123: processing
Progress: 35/50 (70%)
Completed: 33  |  Failed: 2

rs signed-url

Generate a signed 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

All rs take screenshot flags apply to set the rendering options.

Output

https://api.renderscreenshot.com/v1/screenshot?url=https%3A%2F%2Fexample.com&preset=og_card&key_id=rs_pub_xxxxx&expires=1710115200&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.

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:
  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
{
  "url": "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",
  "og": {
    "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": "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-..."
  },
  "status": 200
}

Flags

Flag Description
--json Output as JSON
--wait-for <event> Wait condition: load, networkidle (default: load)
--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>
Deleted cache entry: cache_xyz789

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 cache entries

rs presets

List available screenshot presets.

rs presets
Preset              Viewport     Format  Description
og_card             1200×630     png     Open Graph social cards
twitter_card        1200×600     png     Twitter cards
twitter_card_large  1200×628     png     Twitter large summary card
full_page           1280×full    png     Full page screenshot
mobile              390×844      png     iPhone 14 Pro viewport
mobile_landscape    844×390      png     Mobile landscape
desktop_hd          1920×1080    png     Full HD desktop
desktop_4k          3840×2160    png     4K desktop
pdf_document        Letter       pdf     Print-ready PDF

rs devices

List available device presets for viewport emulation.

rs devices
Device               Viewport     Scale  Mobile  Touch
iphone_14_pro        390×844      3x     yes     yes
iphone_14_pro_max    430×932      3x     yes     yes
iphone_se            375×667      2x     yes     yes
pixel_7              412×915      2.6x   yes     yes
pixel_7_pro          412×892      3.5x   yes     yes
samsung_galaxy_s23   360×780      3x     yes     yes
ipad_pro_12          1024×1366    2x     yes     yes
ipad_air             820×1180     2x     yes     yes
macbook_pro_16       1728×1117    2x     no      no
macbook_pro_14       1512×982     2x     no      no
macbook_air_15       1710×1112    2x     no      no
imac_24              2240×1260    2x     no      no
desktop_1080p        1920×1080    1x     no      no
desktop_1440p        2560×1440    1x     no      no
surface_pro          912×1368     2x     yes     yes

rs whoami

Show current authentication status and account info.

rs whoami
Account:    My Team
Plan:       Growth
Credits:    11,482 remaining
API Key:    rs_live_...xxxxx
Config:     ~/.config/renderscreenshot/config.json

rs config

View and manage CLI configuration.

Show Current Config

rs config
Config file: ~/.config/renderscreenshot/config.json

api_key:        rs_live_...xxxxx
public_key_id:  rs_pub_...xxxxx
secret_key:     (set)

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_...xxxxx

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 config and env)
--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

Was this page helpful?