目次を見る

Getting All Reviews From the Official Google Maps API

公式GoogleプレイスAPI 制限 the number of reviews you can fetch from it to 5 reviews only. Despite many developers 尋ねる 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

と 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

フェッチの基本的な例 20 デフォルトの並べ替えによるレビュー(最も関連性の高いレビュー)。

				
					# 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"
				
			

NS 選別 parameter might be one of the following: “最適な” (default), “最新,” “highest_rating,” and “lower_rating.”

				
					# 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"

				
			

に加えて reviewsLimit parameter, you can specify cutoffRating。パラメータは、 最大 for “lowest_rating” or the 最小 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"


				
			

NS 切り落とす パラメータは、過去の特定の日付までの最新のレビューのみを取得するのに役立ちます。データベースにすべてのレビューがあり、最後の更新以降に追加されたレビューのみを取得する場合に役立つことがあります。

				
					# 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 スキップ APIが結果を返し始める場所を制御するパラメーター。

				
					# 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"
				
			

フェッチ 多くの 1回のリクエストでのレビューには時間がかかる場合があります。 Webサーバーからのタイムアウトエラーを防ぐために、を使用することをお勧めします 非同期 リクエスト。このようにして、リクエストをOutscraperに送信し、後で取得します(通常は 1〜3分, depending on the number of reviews) with the 結果のリクエストエンドポイント.

A good practice is sending async requests and checking the results at 15-sec intervals. Check out this Pythonの実装 必要であれば。

				
					# 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"
				
			

ビデオチュートリアル

よくある質問

最も頻繁な質問と回答

Googleは公式APIで取得できるレビューの量を制限していますが、このAPIを使えば GoogleマップレビューAPI Outscraperが提供する、あらゆる場所のあらゆるレビューを取得することができます。

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.

ブラウザを使ったGoogleのデータ抽出には、長所と短所があります。スクレイパーは自前で開発できるが、スケーリング時にブラウザのエミュレーションを処理するために膨大なCPUを持つサーバーを使用するため、大きな出費につながる可能性がある。また、クローラーのメンテナンスやGoogleのサイト変更に伴うアップデートを行う担当者が必要である。

を使うことで OutscraperプラットフォームAPIまたは SDK Outscraperは、企業や個人がプロキシやブラウザのエミュレーション、開発投資をすることなく、Googleからのレビューのスクレイピングを始めるための最も簡単なソリューションを提供します。

カテゴリー API

0のコメント

コメントを残す

アバタープレースホルダー