GET /v1/screenshot
The GET endpoint provides a simple way to capture screenshots using query parameters. Ideal for direct use in <img> tags and og:image meta tags.
Endpoint
GET https://api.renderscreenshot.com/v1/screenshot
Authentication
Include your API key as a query parameter:
?api_key=rs_live_xxxxx
Or use a signed URL for better security (see Signed URLs).
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
url |
string | Yes | The URL to screenshot (URL encoded) |
api_key |
string | Yes* | Your API key (*or use signed URL) |
preset |
string | No | Preset: og_card, twitter_card, full_page, pdf_document |
width |
integer | No | Viewport width in pixels |
height |
integer | No | Viewport height in pixels |
format |
string | No | Output format: png, jpeg, webp, pdf |
quality |
integer | No | Image quality 1-100 |
click |
string | No | CSS selector to click before capture |
hide |
string | No | Comma-separated selectors to hide |
remove |
string | No | Comma-separated selectors to remove |
block_ads |
boolean | No | Block ad networks |
block_cookies |
boolean | No | Dismiss cookie banners |
cache_available |
boolean | No | Return cached result if available (0 credits on hit) |
cache_ttl |
integer | No | Cache duration in seconds (default: 86400) |
cache_refresh |
boolean | No | Bypass cache and force a fresh render |
pdf_paper |
string | No | PDF paper size: letter, a4, legal, etc. |
pdf_landscape |
boolean | No | PDF landscape orientation |
pdf_print_background |
boolean | No | Include background graphics in PDF |
pdf_margin |
string | No | PDF margin (CSS units: 1cm, 0.5in) |
Response
Returns the screenshot binary with appropriate Content-Type header.
Examples
Basic Usage
<img src="https://api.renderscreenshot.com/v1/screenshot?url=https://example.com&api_key=rs_live_xxxxx" />
With Preset
<meta property="og:image" content="https://api.renderscreenshot.com/v1/screenshot?url=https://mysite.com/post/123&preset=og_card&api_key=rs_live_xxxxx" />
Custom Dimensions
https://api.renderscreenshot.com/v1/screenshot?url=https://example.com&width=800&height=600&api_key=rs_live_xxxxx
Clean Screenshot (Hide/Remove Elements)
https://api.renderscreenshot.com/v1/screenshot?url=https://example.com&hide=.ads,.popup&remove=footer&api_key=rs_live_xxxxx
With Content Blocking
https://api.renderscreenshot.com/v1/screenshot?url=https://example.com&block_ads=true&block_cookies=true&api_key=rs_live_xxxxx
Generate PDF
https://api.renderscreenshot.com/v1/screenshot?url=https://example.com&format=pdf&pdf_paper=a4&pdf_print_background=true&api_key=rs_live_xxxxx
Security Note
When using API keys in publicly visible URLs (like og:image tags), consider using signed URLs instead to prevent key exposure.
See Also
- PDF Options - Full PDF customization
- Output Options - Format and quality
- Presets Reference - Available presets