Response Schema
ReaderPage and UnlockResult, field by field: a page as Markdown with its metadata, and a site's own answer to your request.
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
| Field | Type | Notes |
|---|---|---|
url | string | the address asked for |
finalUrl | string | the address that answered, after redirects |
status | integer | the site's HTTP status. A 404 page is still a page, and is returned |
contentType | string | the site's Content-Type, e.g. text/html; charset=UTF-8. Empty when the site sent none |
title | string | the page's title. Empty when it has none |
description | string? | the page's own summary |
author | string? | |
published | string? | the publication date, as the page states it |
site | string? | the site's name, as the page states it |
language | string? | e.g. en, en-US |
image | string? | the page's lead image (og:image and the like), as an absolute address |
favicon | string? | as an absolute address |
markdown | string | the 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 |
wordCount | integer | the words in the main content, all of it, before any maxChars cut |
truncated | true? | present when maxChars cut markdown or text |
jsonLd | array | every 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 |
html | string? | the page as fetched, with include=html |
contentHtml | string? | the main content as HTML, with include=contentHtml |
text | string? | 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 |
links | object[]? | 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 |
images | object[]? | 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
| Field | Type | Notes |
|---|---|---|
status | integer | the site's HTTP status, whatever it was. A 404 or a 500 is the site's answer |
url | string | the address that answered, after any redirects followed. With followRedirects: false, the address asked for |
headers | object | the 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 |
setCookies | string[]? | every Set-Cookie header the site sent, each in full (headers keeps one value a name) |
body | string | the site's body: text, or base64 when bodyEncoding is base64. Empty for a HEAD request or an empty answer |
bodyEncoding | string | text 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 |