Skip to content

[Readme] Error in Batch Asynchronous Searches Example #71

Open
@schaferyan

Description

@schaferyan

Currently, the example provided in the README for Batch Asynchronous Searches fails with KeyError: 'search_metadata'.

The reason for this is that the search object used to perform the initial searches is used again to call the Search Archive API without removing the previous parameters. This causes the Search Archive API to return a {'error': 'You are using query q parameter on our Search Archive API. To make a new search, use: https://serpapi.com/search.json?q=coffee'} response.

This is fixed by replacing search_archived = search.get_search_archive(search_id) with search_archived = GoogleSearch({}).get_search_archive(search_id).

We can correct this in the README to help prevent confusion for users attempting to follow the example.

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