1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9    "search": "grill",
10    "searchLocation": "Los Angeles",
11    "endPageForPhotos": 1,
12    "reviewSort": "relevance_desc",
13    "startUrls": [
14        "https://www.yelp.com/biz/maxs-restaurant-glendale-glendale-3",
15        "https://www.yelp.com/search?find_desc=max&find_loc=Los+Angeles%2C+CA",
16        "https://www.yelp.com/collection/qGqt9YpsLBCH5nruuVCK2A/Food",
17        "https://www.yelp.com/collections/user?userid=a_UbCGv_MTAHFs3P_zxUDA",
18        "https://www.yelp.com/events/la/browse?start_date=20230215",
19        "https://www.yelp.com/events/monterey-park-monterey-park-strong-star-ballroom-shooting-community-resources",
20    ],
21    "maxItems": 20,
22    "endPage": 1,
23    "startPageForReviews": 1,
24    "endPageForReviews": 1,
25    "extendOutputFunction": "($) => { return {} }",
26    "customMapFunction": "(object) => { return {...object} }",
27    "proxy": { "useApifyProxy": True },
28}
29
30
31run = client.actor("epctex/yelp-scraper").call(run_input=run_input)
32
33
34print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
35for item in client.dataset(run["defaultDatasetId"]).iterate_items():
36    print(item)
37
38