v1

latestOpenAPI 3.1.02026-08-045217107.2 KB
PDF

Generate PDF

Generate a PDF from any URL or HTML. Supports page sizes, margins, headers/footers, and scaling.

post/v1/pdf

Request body

urlstring uri
htmlstring

Raw HTML to render

markdownstring

Markdown to render

format'png' | 'jpeg' | 'webp' | 'avif' | 'pdf'
qualityinteger
device'desktop-1080p' | 'desktop-1440p' | 'desktop-4k' | 'macbook-pro-13' | 'macbook-pro-16' | 'imac-24' | 'iphone-12' | 'iphone-13' | 'iphone-14' | 'iphone-14-pro' | 'iphone-15' | 'iphone-15-pro' | 'iphone-15-pro-max' | 'iphone-se' | 'ipad' | 'ipad-mini' | 'ipad-air' | 'ipad-pro-11' | 'ipad-pro-12.9' | 'pixel-7' | 'pixel-8' | 'pixel-8-pro' | 'samsung-galaxy-s23' | 'samsung-galaxy-s24' | 'samsung-galaxy-tab-s9'
widthinteger
heightinteger
deviceScaleFactornumber
isMobileboolean
hasTouchboolean
isLandscapeboolean
fullPageboolean
fullPageScrollDelayinteger
fullPageMaxHeightinteger
selectorstring

CSS selector to capture specific element

clipXinteger
clipYinteger
clipWidthinteger
clipHeightinteger
delayinteger
timeoutinteger
waitUntil'load' | 'domcontentloaded' | 'networkidle'
waitForSelectorstring
darkModeboolean
reducedMotionboolean
cssstring

Custom CSS (Starter+)

javascriptstring

Custom JS (Pro+)

hideSelectorsstring[]
clickSelectorstring
clickDelayinteger
blockAdsboolean

Block ads (Starter+)

blockTrackersboolean

Block trackers (Pro+)

blockCookieBannersboolean
blockChatWidgetsboolean
blockResourcesstring[]
userAgentstring
extraHeadersobject
timezonestring
localestring
failOnHttpErrorboolean
failIfContentMissingstring[]
failIfContentContainsstring[]
cacheboolean

Enable caching (Pro+)

cacheTtlinteger
responseType'binary' | 'base64' | 'json'
includeMetadataboolean
asyncboolean
webhookUrlstring uri
webhookHeadersobject

Example request

{
  "url": "https://example.com",
  "timezone": "America/New_York",
  "locale": "en-US"
}

Response

PDF generated