API: extraction/structured

better-web-search-mcp


better-web-search-mcp / extraction/structured

extraction/structured#

Interfaces#

StructuredData#

Defined in: src/extraction/structured.ts:13

The result of a structured-data extraction.

Properties#

PropertyTypeDescriptionDefined in
apollounknownParsed window.__APOLLO_STATE__ payload, when present.src/extraction/structured.ts:23
initialStateunknownParsed window.__INITIAL_STATE__ payload, when present.src/extraction/structured.ts:25
jsonLdunknown[]Parsed JSON-LD objects (with @graph unwrapped into its members).src/extraction/structured.ts:15
nextDataunknownParsed #__NEXT_DATA__ payload, when present.src/extraction/structured.ts:17
nextFlightstringConcatenated self.__next_f.push flight chunks, when present.src/extraction/structured.ts:19
nuxtunknownParsed window.__NUXT__ payload, when present.src/extraction/structured.ts:21

Variables#

EMPTY_STRUCTURED#

const EMPTY_STRUCTURED: StructuredData

Defined in: src/extraction/structured.ts:29

An empty structured-data result, used when nothing is found.

Functions#

extractStructuredData()#

extractStructuredData(html): StructuredData

Defined in: src/extraction/structured.ts:185

Extract all structured / hydration data from an HTML page.

Every extractor is defensive: malformed JSON-LD, broken __NEXT_DATA__, or truncated window globals are skipped silently rather than thrown.

Parameters#

ParameterType
htmlstring

Returns#

StructuredData