Member Junction
    Preparing search index...

    One result from a web search provider, normalised across vendors.

    The first three fields are the contract every provider must satisfy, and they are deliberately the same shape the retiring Google Custom Search action returns — which is what makes migrating off it a rename rather than a rewrite.

    interface WebSearchHit {
        DisplayURL?: string;
        ProviderExtras?: Record<string, unknown>;
        PublishedAt?: Date;
        Score?: number;
        Snippet: string;
        Title: string;
        URL: string;
    }
    Index

    Properties

    DisplayURL?: string

    Host as the provider displays it, e.g. irs.gov. Absent when the provider omits it.

    ProviderExtras?: Record<string, unknown>

    Provider-specific extras that do not fit the normalised shape — Brave's extra snippets, Tavily's raw page content, Perplexity's last-updated stamp.

    This exists so normalisation does not become a lowest-common-denominator: a caller that knows which provider answered (via WebSearchResult.ProviderUsed) can reach for what makes that provider worth having.

    PublishedAt?: Date

    Publication or last-modified date, when the provider resolved one.

    Score?: number

    The provider's own relevance score for this hit.

    Provider-relative and not comparable across providers — Brave, Tavily and Perplexity each compute it differently and none is a calibrated probability. Use it to order hits within one response; never threshold on it, and never compare it between providers.

    Snippet: string

    Snippet or extracted content. Length and style vary by provider.

    Title: string

    Page title as the provider reports it.

    URL: string

    Absolute URL of the result.