Skip to content

Commit

Permalink
[Documentation] Fix an array of searches in the Bulk Search API exa…
Browse files Browse the repository at this point in the history
…mple
  • Loading branch information
ilyazub committed Apr 25, 2023
1 parent 87e50b6 commit e9457bd
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 e9457bd

Please sign in to comment.