Sets up the class, throws an error if the API login/password isn't provided.
Properties
description
description:string = "A robust Google Search API provided by DataForSeo. This tool is handy when you need information about trending topics or current events."
name
name:string = "dataforseo-api-wrapper"
ProtectedapiLogin
apiLogin:string
ProtectedapiPassword
apiPassword:string
ProtecteddefaultParams
defaultParams:Record<string, string | number | boolean> = ...
Description
These are the default parameters to be used when making an API request.
ProtectedjsonResultFields
jsonResultFields:undefined | string[]
ProtectedjsonResultTypes
jsonResultTypes:undefined | string[]
Protectedparams
params:Record<string, string | number | boolean> = {}
ProtectedtopCount
topCount:undefined | number
ProtecteduseJsonOutput
useJsonOutput:boolean = false
Methods
results
results(keyword): Promise<any[]>
Parameters
keyword: string
Returns Promise<any[]>
Method
results
Description
Fetches the results from the API for the given keyword.
ProtectedgetResponseJson
getResponseJson(keyword): Promise<ApiResponse>
Parameters
keyword: string
Returns Promise<ApiResponse>
Method
getResponseJson
Description
Executes a POST request to the provided URL and returns a parsed JSON response.
DataForSeoAPISearch
Description
Represents a wrapper class to work with DataForSEO SERP API.