langchain.js
    Preparing search index...

    Wrapper around SerpAPI.

    To use, you should have the serpapi package installed and the SERPAPI_API_KEY environment variable set.

    Hierarchy (View Summary)

    Index

    Constructors

    • Parameters

      • apiKey: undefined | string = ...
      • params: Partial<SerpAPIParameters> = {}
      • baseUrl: string = "https://serpapi.com"

      Returns SerpAPI

    Properties

    baseUrl: string
    description: string = "a search engine. useful for when you need to answer questions about current events. input should be a search query."
    key: string
    name: string = "search"
    params: Partial<SerpAPIParameters>

    Methods

    • Builds a URL for the SerpAPI request.

      Type Parameters

      • P extends UrlParameters

      Parameters

      • path: string

        The path for the request.

      • parameters: P

        The parameters for the request.

      • baseUrl: string

        The base URL for the request.

      Returns string

      A string representing the built URL.

    • Returns any

    • Returns string