/capture keeps working as before. You can also call one endpoint per output type. Each one only accepts the options that apply to it, so a typo or an option that does nothing is rejected with a 400 instead of being ignored.
All three use the same
Authorization: Bearer API key as /capture.
POST /screenshot
Takes the same body as/capture, except format must be png, jpeg or webp, and the pdf options are not accepted.
/capture.
POST /pdf
Takes the shared options (url or html, responseType, responseCache, cdnTtl, async, timeout, waitUntil, imageLoadTimeout, delay, antiBot, block, colorScheme) plus these PDF options. Image options (format, quality, viewport, isFullPage) are not accepted.
Header and footer templates can use elements with the classes
date, title, url, pageNumber and totalPages. Leave room for them with a top or bottom margin.
On
/capture with "format": "pdf", you can pass the same options inside a pdf object.POST /metadata
Reads the page’s HTML without a browser, so it is fast. Tags that the page adds with JavaScript after it loads are not included.openGraphandtwitterhold the tags without theirog:andtwitter:prefix, for exampleopenGraph.image. Image and URL values are made absolute.iconslists every declared icon. If the page declares none, it holds/favicon.icowithdeclared: false.- Failed fetches are not charged. A page that is not HTML returns
422, and a page that cannot be reached returns502.