Apinoa Docs

Response Schema

ReaderPage and UnlockResult, field by field: a page as Markdown with its metadata, and a site's own answer to your request.

View raw .mdx

reader/page returns ReaderPage. unlocker/request returns UnlockResult.

Optional fields are genuinely optional: absent means the page did not say. A page without author named none.

ReaderPage

FieldTypeNotes
urlstringthe address asked for
finalUrlstringthe address that answered, after redirects
statusintegerthe site's HTTP status. A 404 page is still a page, and is returned
contentTypestringthe site's Content-Type, e.g. text/html; charset=UTF-8. Empty when the site sent none
titlestringthe page's title. Empty when it has none
descriptionstring?the page's own summary
authorstring?
publishedstring?the publication date, as the page states it
sitestring?the site's name, as the page states it
languagestring?e.g. en, en-US
imagestring?the page's lead image (og:image and the like), as an absolute address
faviconstring?as an absolute address
markdownstringthe page's main content as Markdown, without its navigation, header, footer and sidebars. Links and images are absolute addresses. A plain-text page is its text
wordCountintegerthe words in the main content, all of it, before any maxChars cut
truncatedtrue?present when maxChars cut markdown or text
jsonLdarrayevery schema.org JSON-LD block on the page (Article, Product, BreadcrumbList, …), parsed, as the page states it. Empty when there is none; a block that is not valid JSON is left out
htmlstring?the page as fetched, with include=html
contentHtmlstring?the main content as HTML, with include=contentHtml
textstring?the main content as plain text, with include=text: a blank line between paragraphs, a line per list item and table row, table cells separated by a tab. A plain-text page is its text
linksobject[]?every link in the main content, with include=links: { url, text }, url absolute, text empty when the link has none. Once per address, in page order
imagesobject[]?every image in the main content, with include=images: { url, alt }, url absolute, alt empty when the image has none. Once per address, in page order. image is the page's lead image

UnlockResult

FieldTypeNotes
statusintegerthe site's HTTP status, whatever it was. A 404 or a 500 is the site's answer
urlstringthe address that answered, after any redirects followed. With followRedirects: false, the address asked for
headersobjectthe site's response headers, one value a name. Look a name up without regard to case. Content-Encoding, Content-Length, Transfer-Encoding, Connection and Keep-Alive are left out: the body is returned decompressed, so they no longer describe it
setCookiesstring[]?every Set-Cookie header the site sent, each in full (headers keeps one value a name)
bodystringthe site's body: text, or base64 when bodyEncoding is base64. Empty for a HEAD request or an empty answer
bodyEncodingstringtext when the content type is textual (text/*, JSON, XML, JavaScript, form data, +json, +xml) and the bytes are valid UTF-8; otherwise base64 of the raw bytes. Either way the bytes are exactly the site's

On this page