Skip to content

Commit

Permalink
Merge pull request #2 from serpapi/docs/fix-searches-array-bulk-searc…
Browse files Browse the repository at this point in the history
…h-api-example

[Documentation] Fix an array of `searches` in the Bulk Search API
  • Loading branch information
ilyazub committed May 2, 2023
2 parents 87e50b6 + e9457bd commit 6281569
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,13 @@ If you have high volume of searches (e.g., >= 1 million) and they don't need to
client = SerpApi::Client.new api_key: 'secret_api_key', async: true

searches = [
engine: "google", q: "coffee",
engine: "google", q: "tea",
engine: "google", q: "hot chocolate milk",
...
{ engine: "google", q: "coffee" },
{ engine: "google", q: "tea" },
{ engine: "google", q: "hot chocolate milk" },
# ...
]

# Submit async searches
async_searches = searches.map do |search|
async_search = client.search search
async_search
Expand Down

0 comments on commit 6281569

Please sign in to comment.