Essentials options
Reference for the essentials options of the shotkit screenshot API, with an example request for each.
The source to render (exactly one of url, html or markdown), the output format, and what to capture.
url
URL of the site to screenshot. Must be http:// or https://. Redirects are followed.
Type: string
curl -X POST "https://shotkit.net/api/take" \
-H "X-Access-Key: YOUR_ACCESS_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://github.com"}' \
--fail-with-body -o shot.jpghtml
HTML to render instead of a URL. Rendered as a page with no origin. Relative URLs don't resolve, so use absolute URLs for images, stylesheets and fonts. Cookies need an explicit Domain.
Type: string
curl -X POST "https://shotkit.net/api/take" \
-H "X-Access-Key: YOUR_ACCESS_KEY" \
-H "Content-Type: application/json" \
-d '{"html":"<div style=\"display:grid;place-items:center;width:1200px;height:630px;background:#0f172a;color:#fff;font:600 72px system-ui\">Hello, world</div>","viewport_width":1200,"viewport_height":630,"format":"png"}' \
--fail-with-body -o shot.pngmarkdown
Markdown to render instead of a URL. Converted to HTML and rendered with a clean, readable stylesheet. Useful for social cards, changelogs and reports.
Type: string
curl -X POST "https://shotkit.net/api/take" \
-H "X-Access-Key: YOUR_ACCESS_KEY" \
-H "Content-Type: application/json" \
-d '{"markdown":"# Release notes\n\n- Faster renders\n- Video output\n- Cookie banner blocking","format":"png"}' \
--fail-with-body -o shot.pngformat
Response format. jpeg is an alias for jpg. gif, mp4 and webm are recorded over time (see Animation); webp is a still image unless an animation option is set. html and markdown return the rendered page's content as text instead of an image.
Type: enum · Default: jpg
Values: jpg, jpeg, png, webp, avif, gif, tiff, pdf, html, markdown, mp4, webm
curl -X POST "https://shotkit.net/api/take" \
-H "X-Access-Key: YOUR_ACCESS_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com","format":"webp"}' \
--fail-with-body -o shot.webpresponse_type
Return the file, JSON metadata, or nothing. by_format returns the file itself. json uploads the file and returns its URL with any metadata. empty returns 200 with no body, which is useful with async or to warm the cache.
Type: enum · Default: by_format
Values: by_format, json, empty
curl -X POST "https://shotkit.net/api/take" \
-H "X-Access-Key: YOUR_ACCESS_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com","response_type":"json"}' \
--fail-with-body -o shot.jsonselector
CSS selector of the element to capture. Captures only the first matching element. With html/markdown output, returns that element's markup. If nothing matches, the full viewport is captured unless error_on_selector_not_found=true.
Type: string
curl -X POST "https://shotkit.net/api/take" \
-H "X-Access-Key: YOUR_ACCESS_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com","selector":"main"}' \
--fail-with-body -o shot.jpgselector_scroll_into_view
Scroll to the element to trigger lazy content.
Type: boolean · Default: true
curl -X POST "https://shotkit.net/api/take" \
-H "X-Access-Key: YOUR_ACCESS_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com","selector":"footer","selector_scroll_into_view":false}' \
--fail-with-body -o shot.jpgcurl -X POST "https://shotkit.net/api/take" \
-H "X-Access-Key: YOUR_ACCESS_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com","selector":"#pricing","capture_beyond_viewport":true}' \
--fail-with-body -o shot.jpgcurl -X POST "https://shotkit.net/api/take" \
-H "X-Access-Key: YOUR_ACCESS_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com","scroll_into_view":"#pricing"}' \
--fail-with-body -o shot.jpgcurl -X POST "https://shotkit.net/api/take" \
-H "X-Access-Key: YOUR_ACCESS_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com","scroll_into_view":"#pricing","scroll_into_view_adjust_top":-80}' \
--fail-with-body -o shot.jpgattachment_name
Download filename (extension added). Sets Content-Disposition: attachment, so browsers download the file instead of displaying it.
Type: string
curl -X POST "https://shotkit.net/api/take" \
-H "X-Access-Key: YOUR_ACCESS_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com","attachment_name":"homepage"}' \
--fail-with-body -o shot.jpgexternal_identifier
Your ID, echoed in webhook headers. Sent back as the X-External-Identifier header on webhook deliveries, so you can match results to your records.
Type: string
curl -X POST "https://shotkit.net/api/take" \
-H "X-Access-Key: YOUR_ACCESS_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com","async":true,"webhook_url":"https://your.app/hooks/shot","external_identifier":"order-1234"}' \
--fail-with-body -o shot.jpgcurl -X POST "https://shotkit.net/api/take" \
-H "X-Access-Key: YOUR_ACCESS_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com","format":"html","include_shadow_dom":true}' \
--fail-with-body -o shot.html