langchain.js
    Preparing search index...

    Interface WebSearch20250305Options

    Options for the web search tool.

    interface WebSearch20250305Options {
        allowedDomains?: string[];
        blockedDomains?: string[];
        cacheControl?: BetaCacheControlEphemeral;
        deferLoading?: boolean;
        maxUses?: number;
        strict?: boolean;
        userLocation?: UserLocation;
    }
    Index

    Properties

    allowedDomains?: string[]

    If provided, only these domains will be included in results. Cannot be used alongside blocked_domains.

    blockedDomains?: string[]

    If provided, these domains will never appear in results. Cannot be used alongside allowed_domains.

    cacheControl?: BetaCacheControlEphemeral

    Create a cache control breakpoint at this content block.

    deferLoading?: boolean

    If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.

    maxUses?: number

    Maximum number of times the tool can be used in the API request.

    strict?: boolean

    If true, tool will only return results from the allowed domains.

    userLocation?: UserLocation

    Parameters for the user's location. Used to provide more relevant search results.