Skip to main content

Interface: WebPage

Defined in: packages/tools/src/web/web-fetch.ts:101

A read page, in full. html and bytes are for the host, never the model.

Properties​

bytes?​

optional bytes?: Uint8Array<ArrayBufferLike>

Defined in: packages/tools/src/web/web-fetch.ts:122

The original bytes, for a PDF.


content?​

optional content?: "main" | "full"

Defined in: packages/tools/src/web/web-fetch.ts:132

What text holds for an HTML page read with content: 'main': main (the article body) or full (the main-content cut left too little, so the whole page's text). Absent for a full read.


contentType​

contentType: string

Defined in: packages/tools/src/web/web-fetch.ts:107


description?​

optional description?: string

Defined in: packages/tools/src/web/web-fetch.ts:110


finalUrl​

finalUrl: string

Defined in: packages/tools/src/web/web-fetch.ts:105

Where the read ended after redirects (or where the fallback read).


html?​

optional html?: string

Defined in: packages/tools/src/web/web-fetch.ts:120

The raw HTML, for an HTML page.


iconUrls​

iconUrls: string[]

Defined in: packages/tools/src/web/web-fetch.ts:114

Declared icon candidates (guard them before loading).


image?​

optional image?: string

Defined in: packages/tools/src/web/web-fetch.ts:112

og:image, resolved.


pdf?​

optional pdf?: object

Defined in: packages/tools/src/web/web-fetch.ts:124

For a PDF: a filename from the URL, the page count, and whether there was a text layer to read.

filename​

filename: string

pages?​

optional pages?: number

reader​

reader: boolean

textAvailable​

textAvailable: boolean


readVia​

readVia: "direct" | "fallback"

Defined in: packages/tools/src/web/web-fetch.ts:126

fallback when the text came from the fallback.


siteName?​

optional siteName?: string

Defined in: packages/tools/src/web/web-fetch.ts:109


status​

status: number

Defined in: packages/tools/src/web/web-fetch.ts:106


structuredData​

structuredData: unknown[]

Defined in: packages/tools/src/web/web-fetch.ts:116

Parsed JSON-LD blocks, in page order. Page data is evidence, not instructions.


text​

text: string

Defined in: packages/tools/src/web/web-fetch.ts:118

Readable text: HTML turned into text, a PDF's text layer, or the plain text.


title?​

optional title?: string

Defined in: packages/tools/src/web/web-fetch.ts:108


url​

url: string

Defined in: packages/tools/src/web/web-fetch.ts:103

The address that was asked for.