You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Make async: True batch searches work out of the box #53
From a user perspective, the less setup required the better. [...] The user has to just add an async: True and don't bother tinkering/figuring out stuff for another ~hour about how Queue or something else works.
Today, running async searches in bulk means submitting each search with async: True, keeping the search IDs in a queue, polling the Search Archive API, and re-queueing searches that aren't finished (status other than Cached or Success).
Applies to serpapi-python:Client.search and Client.search_archive expose the building blocks, but the queue and polling logic is left to the user and the README has no helper or example for it.
Proposal: a helper that does this under the hood. The original issue suggested an API along these lines (adapted to the new client):
Alternatively, a documented README example of the submit, poll and re-queue loop would already help.
One thing to keep in mind from the original thread: when polling the archive, don't reuse the params from the initial search, because passing q to the Search Archive API returns an error.
Activity
Add Client.async_search() batch helper for async searches (closes ser…
Add Client.async_search() batch helper for async searches (closes ser…
Add Client.async_search() batch helper for async searches (closes ser…