Skip to contents

Search for more than 100 keywords in DataForSEO's Google Organic Search. This function constructs a list of requests. When submitting these requests, the calling function has to ensure that the rate limit from less than 2,000 requests with 100 keywords each is met.

Usage

dfs_search_reqs(
  keywords,
  task_size = 100,
  postback_url = Sys.getenv("POSTBACK_URL"),
  language_code = "en",
  location_code = 2840,
  username = Sys.getenv("DFS_USERNAME"),
  password = Sys.getenv("DFS_PASSWORD")
)

Arguments

keywords

Character vector of keywords.

task_size

Number of keywords that should be put into a single request. Maximum 100.

postback_url

Postback URL to which DataForSEO sends the search results.

language_code

Language code.

location_code

Location code, see https://api.dataforseo.com/v3/serp/google/locations.

Details

This function assumes that keywords are already URL encoded, e.g., using urltools::url_encode.