Skip to content

Make async: True batch searches work out of the box #53

Backlog

Description

@jvmvik

Moved from the deprecated google-search-results-python package: serpapi/google-search-results-python#51 (originally reported by dimitryzub).

Original request

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):

import serpapi

client = serpapi.Client(api_key="...")

# hypothetical API
results = client.async_search(
    queries=["burly", "creator", "doubtful", "minecraft"],
    engine="youtube",
    device="desktop",
)

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

  1. added 3 commits that reference this issue on Nov 27, 2026
    a919c73
    66c629c
    0a8290f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions