Ultimate Yelp Scraper
Try for free
3 days trial then $30.00/month - No credit card required now
View all Actors
Ultimate Yelp Scraper
epctex/yelp-scraper
Try for free
3 days trial then $30.00/month - No credit card required now
Gather info on millions of businesses, events, and reviews. Scrape businesses and extract descriptions, images, menus, addresses, and all other properties.. Customize with search terms, filters, and mappings for limitless insights. Ultimate Yelp scraper you need. No limits! No limits!
The code examples below show how to run the Actor and get its results. To run the code, you need to have an Apify account. Replace <YOUR_API_TOKEN> in the code with your API token, which you can find under Settings > Integrations in Apify Console. Learn more
Node.js
Python
curl
1import { ApifyClient } from 'apify-client';
2
3// Initialize the ApifyClient with your Apify API token
4const client = new ApifyClient({
5 token: '<YOUR_API_TOKEN>',
6});
7
8// Prepare Actor input
9const input = {
10 "search": "grill",
11 "searchLocation": "Los Angeles",
12 "reviewSort": "relevance_desc",
13 "startUrls": [
14 "https://www.yelp.com/biz/maxs-restaurant-glendale-glendale-3",
15 "https://www.yelp.com/user_details?userid=a_UbCGv_MTAHFs3P_zxUDA",
16 "https://www.yelp.com/search?find_desc=max&find_loc=Los+Angeles%2C+CA",
17 "https://www.yelp.com/collection/qGqt9YpsLBCH5nruuVCK2A/Food",
18 "https://www.yelp.com/collections/user?userid=a_UbCGv_MTAHFs3P_zxUDA",
19 "https://www.yelp.com/events/la/browse?start_date=20230215",
20 "https://www.yelp.com/events/monterey-park-monterey-park-strong-star-ballroom-shooting-community-resources"
21 ],
22 "maxItems": 20,
23 "endPage": 1,
24 "endPageForReviews": 1,
25 "extendOutputFunction": ($) => { return {} },
26 "customMapFunction": (object) => { return {...object} },
27 "proxy": {
28 "useApifyProxy": true
29 }
30};
31
32(async () => {
33 // Run the Actor and wait for it to finish
34 const run = await client.actor("epctex/yelp-scraper").call(input);
35
36 // Fetch and print Actor results from the run's dataset (if any)
37 console.log('Results from dataset');
38 console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
39 const { items } = await client.dataset(run.defaultDatasetId).listItems();
40 items.forEach((item) => {
41 console.dir(item);
42 });
43})();
44
45// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs