I put together a simple script that will allow me to get google reviews. After running, i am only getting the first page. How can i loop through all pages and extract all historical reviews.
Here is the code.
import os
import json
import pandas as pd
from pandas import json_normalize
import serpapi
from dotenv import load_dotenv
load_dotenv()
#api pull
api_key = os.getenv(‘SERPAPI_KEY’)
client = serpapi.Client(api_key=api_key)
results = client.search({
‘engine’: ‘google_maps_reviews’,
‘type’: ‘search’,
‘place_id’: ‘ChIJidRKt32YVogRN6fEPG9Kuho’
})
Jose Nunez is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.