Indice

Getting All Reviews From the Official Google Maps API

L'API ufficiale di Google Places limiti the number of reviews you can fetch from it to 5 reviews only. Despite many developers chiedendo for pagination and sorting parameters since 2015, the limitation still exists. Fortunately, there are some tools you can use from your code to get ratings & reviews in the right way.

The Ultimate Way of Fetching Reviews

Con Outscraper’s API, you can fetch any amount of reviews from any business. You can sort the reviews and paginate over the pages. It’s possible to ignore empty reviews by using the “ignoreEmpty” parameter, and there are many advanced parameters like cutoff, cutoffRating, etc.

Reviews API Examples

L'esempio di base del recupero 20 recensioni in base all'ordinamento predefinito (recensioni più rilevanti).

				
					# fetch 20 most relevant reviews
curl -X GET "https://api.app.outscraper.com/maps/reviews-v2?query=PLACE_ID&reviewsLimit=20&async=false" -H  "X-API-KEY: API_KEY"
				
			

Le ordinare parameter might be one of the following: “più rilevanti” (default), “più nuovo,” “punteggio_più alto,” and “punteggio_più basso.”

				
					# fetch reviews with highest rating first
curl -X GET "https://api.app.outscraper.com/maps/reviews-v2?query=PLACE_ID&reviewsLimit=20&sort=highest_rating&async=false" -H  "X-API-KEY: API_KEY"

# fetch reviews with lowest rating first
curl -X GET "https://api.app.outscraper.com/maps/reviews-v2?query=PLACE_ID&reviewsLimit=20&sort=lowest_rating&async=false" -H  "X-API-KEY: API_KEY"

				
			

In aggiunta a limiteRecensioni parameter, you can specify cutoffRating. Il parametro specifica il massimo for “lowest_rating” or the minimo for “highest_rating” ratings for reviews.

				
					# fetch reviews with 5 and 4 stars ratings only
curl -X GET "https://api.app.outscraper.com/maps/reviews-v2?query=PLACE_ID&reviewsLimit=1000&sort=highest_rating&cutoffRating=4&async=false" -H  "X-API-KEY: API_KEY"


				
			

Le tagliare parametro ti aiuterà a recuperare solo le recensioni più recenti fino alla data specifica nel passato. Potrebbe essere utile quando hai tutte le recensioni nel tuo database e vuoi recuperare solo le recensioni che sono state aggiunte dall'ultimo aggiornamento.

				
					# fetch reviews till the specific date (cutoff)
curl -X GET "https://api.app.outscraper.com/maps/reviews-v2?query=PLACE_ID&reviewsLimit=250&sort=newest&cutoff=1629269269&async=false" -H  "X-API-KEY: API_KEY"
				
			

You can use built-in pagination to fetch many pages of reviews. Use the Salta parametro per controllare dove l'API inizia a restituire i risultati.

				
					# page 1, sorted by newest
curl -X GET "https://api.app.outscraper.com/maps/reviews-v2?query=PLACE_ID&reviewsLimit=20&sort=newest&async=false" -H  "X-API-KEY: API_KEY"

# page 2, sorted by newest
curl -X GET "https://api.app.outscraper.com/maps/reviews-v2?query=PLACE_ID&reviewsLimit=20&sort=newest&skip=20async=false" -H  "X-API-KEY: API_KEY"
				
			

Recupero molti le revisioni in una richiesta potrebbero richiedere tempo. Per evitare un errore di timeout dal server web, si consiglia di utilizzare asincrono richieste. In questo modo invierai le tue richieste a Outscraper e le recupererai in seguito (di solito entro 1-3 minuti, depending on the number of reviews) with the Endpoint dei risultati della richiesta.

A good practice is sending async requests and checking the results at 15-sec intervals. Check out this Implementazione Python se necessario.

				
					# step 1: submit the task and get request id
curl -X GET "https://api.app.outscraper.com/maps/reviews-v2?query=PLACE_ID_1&reviewsLimit=2000&sort=newest&async=true" -H  "X-API-KEY: API_KEY"

# step 2: retrieve the task results later (usually within 1-3 minutes, depends on the amount of reviews)
curl -X GET "https://api.app.outscraper.com/requests/REQUEST_ID"
				
			

Video tutorial

Domande frequenti

Domande e risposte più frequenti

Sebbene Google limiti la quantità di recensioni che puoi recuperare con la sua API ufficiale, puoi usare API delle recensioni di Google Maps fornito da Outscraper per ottenere tutte le recensioni da qualsiasi luogo.

Google Places API can be used for Google reviews. But there is only 5 review limit. If you want to download reviews without any limits, you can use an alternative service. Outscraper Google Maps Reviews API is one of these alternative services.

If the reviews you want to get don’t belong to your own Google Maps profile, you won’t be able to get all the reviews. You can get up to 5 reviews from other businesses. But with Outscraper Google Maps Reviews API, you can collect unlimited reviews without this limit.

L'estrazione di dati da Google con i browser ha i suoi pro e i suoi contro. Sebbene sia possibile sviluppare lo scraper da soli, in fase di scalata potrebbe comportare grandi spese per l'utilizzo di server con enormi quantità di CPU per gestire le emulazioni dei browser. Inoltre, è necessario che ci sia una persona che mantenga il crawler e lo aggiorni durante le modifiche al sito di Google.

Usando Piattaforma OutscraperAPI, o SDKs Outscraper offre la soluzione più semplice per le aziende e i privati per iniziare lo scraping delle recensioni da Google senza dover gestire proxy, emulazione del browser e investire nello sviluppo.

Categorie: API

0 Comments

Lascia un commento

Segnaposto avatar