Yelp Scraper
This Actor is unavailable because the developer has decided to deprecate it. Would you like to try a similar Actor instead?
See alternative ActorsYelp Scraper
Effortlessly extract business names, addresses, phone numbers, ratings, and reviews from Yelp. No Yelp API is required! Analyze customer sentiment, track competitors, or gather market research data. Scrape by location or keywords. Export data (CSV, JSON, HTML) and automate scraping.
Yelp scraper is an Apify actor able to extract reviews and ratings from Yelp business pages. The scraper is capable of performing Yelp searches, either by querying Yelp with an optional location or by scraping direct URLs pointing to searches. Also, the scraper recognizes Yelp business pages and scrapes reviews from direct business URLs.
The scraper uses Apify SDK and can be run locally or using Apify cloud platform.
Input
When using the scraper on the Apify platform or locally, there are multiple configurable input variables available:
Field | Type | Required | Default | Description |
---|---|---|---|---|
searchTerm | string | see below | Used for searching particular item, service, or business. | |
location | string | No | Location to search. | |
searchLimit | number | No | 10 | Number of search results to crawl from each search results page specified. |
directUrls | array | see below | [] | Predefined collection of string URLs to scrape review. Can be search URLs or business pages, other URLs will be ignored. |
reviewLimit | number | No | 20 | Minimum number of reviews to scrape. |
proxy | proxy configuration | Yes | { useApifyProxy: true } | Proxy groups and other proxy related configuration. |
maxRequestRetries | number | No | 10 | How many times a failed request is retried before thrown away. Requests usually failed when blocked by the target site. |
One of searchTerm
or directUrls
is required. If none are specified, nothing will be scrapped.
Output
You'll get your review in the following schema:
1{ 2 "directUrl": "<business url>", 3 "bizId": "<business id>", 4 "name": "<business id>", 5 "description": "<business description>", 6 "categories": ["<business categories>"], 7 "type": "<business type>", 8 "phone": "<business phone>", 9 "reviewCount": "<business reviewCount>", 10 "aggregatedRating": "<business rating>", 11 "priceRange": "<business price range>", 12 "cuisine": "<business cuisine>", 13 "website": "<business website>", 14 "images" : ["<business image URL>"], 15 "address": { 16 "addressLocality": "<business locality>", 17 "addressRegion": "<business city>", 18 "streetAddress": "<business address>", 19 "postalCode": "<business postal>", 20 "addressCountry": "<business country>" 21 }, 22 "reviews": [ 23 { 24 "date": "<review date>", 25 "rating": "<rating>", 26 "text": "<review text>", 27 "photos": [ 28 "https://<photoURL>", 29 ], 30 "isFunnyCount": 0, 31 "isUsefulCount": 1, 32 "isCoolCount": 1, 33 "reviewerName": "John Doe", 34 "reviewerUrl": "https://www.yelp.com//user_details?userid=12311231231231", 35 "reviewerReviewCount": 43, 36 "reviewerLocation": "Rowland Heights, CA" 37 }, 38 ] 39}
Usage
If you want to run the actor on the Apify platform, you need to open the
actor's page in the Store and then click on Try for free
. That will
create a task (actor configuration) on your account. When using public actors, you don't need to build them since
the author already did everything. You only need to provide input, and then you can run them. But keep in mind that
resource usage will always be charged towards the account which runs the actor. You can also use webhooks
to let it run automatically after any actor or task.
If you want to run the actor locally, you need to open the actor's github page and clone it to your computer.
Advanced data access
You might want to access the scraped reviews in a flat format. Apify API provides a simple way to do just that.
When accessing your dataset through the API, you can tell the API server to provide one review per dataset entry using
the unwind
GET parameter:
https://api.apify.com/v2/datasets/<DatasetId>/items?unwind=reviews
This functionality is documented in the Apify API documentation under Datasets -> Item collection -> Get items.
Personal data
Reviews can contain personal data like person name or profile link that can be used to track down the reviewer. Personal data is protected by GDPR in the European Union and by other regulations around the world. You should not scrape personal data unless you have a legitimate reason to do so. If you're unsure whether your reason is legitimate, consult your lawyers. This scraper allows you to granularly select which personal data fields you want to extract from reviews and which not. By default the scraper does not extract those fields.
Your feedback
We are always working on improving the performance of our Actors. So if you’ve got any technical feedback for the Yelp Scraper Actor or simply found a bug, please create an issue on the Actor’s Issues tab in Apify Console.