Skip to content

Function: runWebFetch()

runWebFetch(request, config, signal?): Promise<{ content: string; contentType?: string; status: number; title?: string; truncated: boolean; url: string; }>

Fetch a single URL and return its content in the requested format.

Throws when the URL is not permitted by the allow-list (the visible, correctable failure the design calls for on the fetch path). The request’s maxLength narrows (never widens) the plugin’s fetchMaxLength cap. signal cancels the in-flight fetch.

"text" | "html" = ...

number = ...

string = ...

ResolvedWebSearchConfig

AbortSignal

Promise<{ content: string; contentType?: string; status: number; title?: string; truncated: boolean; url: string; }>