1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "mode": "search",
10 "searchType": "keyword",
11 "query": "bookshop.org",
12 "category": "book_store",
13 "urls": ["https://www.trustpilot.com/review/bookshop.org"],
14 "site": "www.trustpilot.com",
15 "scrapeReviews": True,
16 "maxReviewsPerBusiness": 20,
17 "reviewLanguage": "all",
18 "reviewSort": "recency",
19 "verifiedOnly": False,
20 "reviewsSince": "any",
21 "fetchDetails": True,
22 "maxItems": 50,
23 "maxPages": 0,
24 "incrementalMode": False,
25 "emitUnchanged": False,
26 "emitExpired": False,
27 "maxNotifyListings": 50,
28 "proxyConfiguration": { "useApifyProxy": True },
29}
30
31
32run = client.actor("abotapi/trustpilot-reviews-scraper").call(run_input=run_input)
33
34
35print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
36for item in client.dataset(run.default_dataset_id).iterate_items():
37 print(item)
38
39