langchain.js
    Preparing search index...

    DataForSeoAPISearch

    Represents a wrapper class to work with DataForSEO SERP API.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    apiLogin: string
    apiPassword: string
    defaultParams: Record<string, string | number | boolean> = ...

    These are the default parameters to be used when making an API request.

    description: string = "A robust Google Search API provided by DataForSeo. This tool is handy when you need information about trending topics or current events."
    jsonResultFields: undefined | string[]
    jsonResultTypes: undefined | string[]
    name: string = "dataforseo-api-wrapper"
    params: Record<string, string | number | boolean> = {}
    topCount: undefined | number
    useJsonOutput: boolean = false

    Methods

    • Parameters

      • keyword: string

      Returns Promise<string>

      _call

      Initiates a call to the API and processes the response.

    • Parameters

      • keyword: string

      Returns Promise<ApiResponse>

      getResponseJson

      Executes a POST request to the provided URL and returns a parsed JSON response.

    • Parameters

      • keyword: string

      Returns { data: BodyInit; headers: HeadersInit; url: string }

      prepareRequest

      Prepares the request details for the API call.

    • Parameters

      • res: ApiResponse

      Returns string

      processResponse

      Processes the response to extract meaningful data.

    • Parameters

      • keyword: string

      Returns Promise<any[]>

      results

      Fetches the results from the API for the given keyword.

    • Returns string