Table of Contents

Getting All Reviews From the Official Google Maps API

جوجل يضع API الرسمية حدود the number of reviews you can fetch from it to 5 reviews only. Despite many developers يسأل بالنسبة لمعلمات ترقيم الصفحات والفرز منذ عام 2015 ، لا يزال القيد موجودًا. لحسن الحظ ، هناك بعض الأدوات التي يمكنك استخدامها من التعليمات البرمجية الخاصة بك للحصول على التقييمات والمراجعات بالطريقة الصحيحة.

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"
				
			

ال نوع parameter might be one of the following: “الأكثر صلة” (default), “أحدث,” “أعلى تقييم,” and “أدنى معدل.”

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

				
			

بالإضافة الى التعليقات 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"


				
			

ال قطع ستساعدك المعلمة في جلب أحدث المراجعات فقط حتى التاريخ المحدد في الماضي. قد يكون مفيدًا عندما يكون لديك جميع المراجعات في قاعدة البيانات الخاصة بك وترغب في جلب المراجعات التي تمت إضافتها منذ آخر تحديث لك فقط.

				
					# 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 يتخطى المعلمة للتحكم في المكان الذي تبدأ فيه واجهة برمجة التطبيقات بإرجاع النتائج.

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

الجلب عديدة المراجعات في طلب واحد قد تستغرق وقتًا. من أجل منع خطأ انتهاء المهلة من خادم الويب ، يوصى باستخدام غير متزامن الطلبات. بهذه الطريقة سترسل طلباتك إلى 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 تطبيق بايثون اذا كان ضروري.

				
					# 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

التعليمات

الأسئلة والأجوبة الأكثر شيوعًا

على الرغم من أن 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.

Extracting data from Google with browsers has its pros and cons. Although you can develop the scraper by yourself, during scaling, it might lead to big expenses for using servers with huge amounts of CPUs in order to handle browser emulations. Additionally, there should be a person who maintains the crawler and updates it during Google site changes.

By using Outscraper PlatformAPI, or SDKs Outscraper provides the easiest solution for businesses and individuals to start Scraping Reviews from Google without handling proxies, browser emulation, and investing in developing.

Categories: API

0 Comments

اترك تعليقاً

عنصر نائب للصورة الرمزية