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
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.
The text was updated successfully, but these errors were encountered:
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
qparameter 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)
withsearch_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.
The text was updated successfully, but these errors were encountered: