Render a URL or HTML to PDF

get/v1/pdf

Request

  • Base URL: https://shotlane.dev
  • URL: https://shotlane.dev/v1/pdf
  • Auth: one of:
    • API key in header X-API-Key
    • API key in query parameter access_key

Query parameters

urlstring

Page to render (https:// assumed).

htmlstring

Raw HTML to render instead of url (prefer POST).

markdownstring

Markdown to render as a styled document instead of url/html (prefer POST).

proxystring

Your own proxy, e.g. http://user:pass@host:port (http, https, socks5).

widthinteger

Viewport width.

heightinteger

Viewport height.

full_pageboolean

Capture the full scrollable page.

scalenumber

Device scale factor.

selectorstring

Capture only the first element matching this CSS selector.

dark_modeboolean

Emulate prefers-color-scheme: dark.

hide_cookie_bannersboolean

Hide cookie consent banners.

block_adsboolean

Block ad and tracker requests.

delayinteger

Extra wait after load (ms).

wait_until'load' | 'domcontentloaded' | 'networkidle'

Navigation wait condition.

qualityinteger

JPEG/WebP quality.

cache_ttlinteger

Cache seconds; cache hits are free.

response_type'file' | 'json'

json: hosted 24 h link + details instead of the file.

storage_bucketstring

Upload the result to this S3-compatible bucket (returns JSON).

storage_keystring

Object key/path in the bucket.

storage_endpointstring

https endpoint for non-AWS storage (R2, B2, MinIO).

storage_regionstring

Bucket region (default us-east-1, or auto with an endpoint).

storage_access_key_idstring

Access key for the bucket.

storage_secret_access_keystring

Secret key for the bucket.

storage_acl'private' | 'public-read'

Object ACL.

device'desktop' | 'desktop_hd' | 'laptop' | 'ipad' | 'iphone' | 'iphone_se' | 'pixel' | 'galaxy'

Viewport preset.

cssstring

CSS to inject.

jsstring

JavaScript to run before capture.

hide_selectorsstring

Comma-separated selectors to hide.

clickstring

Selector to click before capture.

wait_for_selectorstring

Selector to wait for.

headersstring

JSON object of extra headers (target host only).

cookiesstring

Cookies for the target URL, 'a=1; b=2'.

timezonestring

IANA time zone, e.g. Europe/Berlin.

localestring

Browser locale and Accept-Language, e.g. de-DE.

latitudenumber

Geolocation latitude (with longitude).

longitudenumber

Geolocation longitude (with latitude).

reduced_motionboolean

Emulate prefers-reduced-motion.

media_type'screen' | 'print'

CSS media type.

disable_jsboolean

Render without JavaScript.

hide_popupsboolean

Close or hide sign-in/newsletter/app modals.

block_trackersboolean

Block analytics and tracking requests.

block_chatsboolean

Block chat widgets (Intercom, Drift, Crisp...).

block_requestsstring

Comma-separated URL patterns to block (* wildcards).

block_resourcesstring

Comma-separated resource types to block: image, media, font, stylesheet, script, xhr, fetch, websocket, other.

hoverstring

Selector to hover before capture.

scroll_into_viewstring

Selector to scroll into view before capture.

wait_to_leavestring

Selector that must disappear first (e.g. a spinner).

basic_authstring

HTTP basic auth 'user:password' for the target origin.

timeoutinteger

Navigation timeout in seconds.

fail_on_statusboolean

Fail (not charged) if the page answers 4xx/5xx.

fail_if_content_containsstring

Fail (not charged) if the page text contains this.

paper'A3' | 'A4' | 'A5' | 'Letter' | 'Legal' | 'Tabloid'
landscapeboolean
print_backgroundboolean
marginstring

All margins, e.g. 1cm (or margin_top/right/bottom/left).

page_numbersboolean

Add a '1 / N' footer.

header_templatestring

Header HTML (pageNumber, totalPages, date, title, url classes).

footer_templatestring

Footer HTML.

page_rangesstring

Pages to keep, e.g. 1-3, 5.

pdf_scalenumber
pdf_widthstring

Custom page width (with pdf_height), e.g. 100mm.

pdf_heightstring

Custom page height.

watermarkstring

Diagonal watermark text on every page.

watermark_opacitynumber
pdf_passwordstring

Encrypt with this password (AES-256).

pdf_titlestring
pdf_authorstring
pdf_subjectstring
pdf_keywordsstring

Response

PDF

Changes

No recorded changes to this operation across all 1 revision of this API.