Web
Pages and links, read by a real browser where it matters.
/screenshot
A page as a PNG, after its metadata as JSON: two parts of multipart/mixed, not the JSON envelope.
Parameters
uri- The page
delay- Seconds to wait once it's loaded
stealth- True: Camoufox, for pages that fight automation; slower
adblock- False: ads and trackers load too
console- True: the page's console messages too
Answer
multipart/mixed, no envelope: browser.Metadata as JSON, then the image/png.
browser.Metadata
address- The server the page came from, ip:port
titlerequests- Every request the page made, redirect hops included
certificate- The page's TLS connection, if it had one
console- When asked for
browser.Resource
urlmethod
browser.Certificate
issuerprotocolsubjectvalid_from- Unix seconds
valid_to- Unix seconds
browser.Console
type- As the browser names it: log, error, …
message
/markdown
A page's content as markdown, every link made absolute. A PDF's text too.
Parameters
uri- The page
mode- How to read it: fetch runs no script, browser loads it in Chromium, stealth in Camoufox for pages that fight automation; auto tries them in that order, moving on only while one is refused or reads nothing
full- True: the whole page, its navigation, asides, header and footer included
force- True: convert a page served as markdown too, and ask the site for HTML alone
delay- Seconds to hold the settled page, for content that comes late; browser modes
adblock- False: ads and trackers load too; browser modes
Answer
result is markdown.Page.
markdown.Page
url- Where the page ended up, past redirects: what its links resolve against
titlemarkdowntruncated- The page was past its size cap: its end was not read
/unshorten
Where a link's redirects lead, each hop in order.
Parameters
uri- The link
depth- Redirects to follow
timeout- Seconds
Answer
result is unshorten.Redirect[].
unshorten.Redirect
destinationtook- Milliseconds since the hop before
/ocr
The text in an image.
Parameters
uri- The image: JPEG, PNG, GIF or WebP, up to 16 MiB
Answer
result is ocr.Text.
ocr.Text
text- Top to bottom, a blank line between blocks