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

uristring · required
The page
delayinteger, 0 to 10 · default 0
Seconds to wait once it's loaded
stealthboolean · default false
True: Camoufox, for pages that fight automation; slower
adblockboolean · default true
False: ads and trackers load too
consoleboolean · default false
True: the page's console messages too

Answer

multipart/mixed, no envelope: browser.Metadata as JSON, then the image/png.

browser.Metadata

addressstring · optional
The server the page came from, ip:port
titlestring · optional
requestsbrowser.Resource[] · optional
Every request the page made, redirect hops included
certificatebrowser.Certificate · optional
The page's TLS connection, if it had one
consolebrowser.Console[] · optional
When asked for

browser.Resource

urlstring
methodstring

browser.Certificate

issuerstring
protocolstring
subjectstring
valid_fromnumber
Unix seconds
valid_tonumber
Unix seconds

browser.Console

typestring
As the browser names it: log, error, …
messagestring

/markdown

A page's content as markdown, every link made absolute. A PDF's text too.

Parameters

uristring · required
The page
modeauto, fetch, browser, stealth · default auto
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
fullboolean · default false
True: the whole page, its navigation, asides, header and footer included
forceboolean · default false
True: convert a page served as markdown too, and ask the site for HTML alone
delayinteger, 0 to 10 · default 0
Seconds to hold the settled page, for content that comes late; browser modes
adblockboolean · default true
False: ads and trackers load too; browser modes

Answer

result is markdown.Page.

markdown.Page

urlstring
Where the page ended up, past redirects: what its links resolve against
titlestring · optional
markdownstring
truncatedboolean · optional
The page was past its size cap: its end was not read

/unshorten

Where a link's redirects lead, each hop in order.

Parameters

uristring · required
The link
depthinteger, 2 to 15 · default 10
Redirects to follow
timeoutinteger, 5 to 35 · default 15
Seconds

Answer

result is unshorten.Redirect[].

unshorten.Redirect

destinationstring
tookinteger
Milliseconds since the hop before

/ocr

The text in an image.

Parameters

uristring · required
The image: JPEG, PNG, GIF or WebP, up to 16 MiB

Answer

result is ocr.Text.

ocr.Text

textstring
Top to bottom, a blank line between blocks