1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "currentItems": [
10 {
11 "placeId": "a1",
12 "name": "Cafe One",
13 "searchQuery": "coffee Austin",
14 "rating": 4.7,
15 "reviews": 920,
16 "rank": 1,
17 "category": "coffee",
18 },
19 {
20 "placeId": "a2",
21 "name": "Cafe Two",
22 "searchQuery": "coffee Austin",
23 "rating": 4.2,
24 "reviews": 310,
25 "rank": 2,
26 "category": "coffee",
27 },
28 {
29 "placeId": "a3",
30 "name": "Cafe Three",
31 "searchQuery": "coffee Austin",
32 "rating": 3.9,
33 "reviews": 80,
34 "rank": 3,
35 "category": "coffee",
36 },
37 ],
38 "previousItems": [
39 {
40 "placeId": "a1",
41 "name": "Cafe One",
42 "searchQuery": "coffee Austin",
43 "rating": 4.6,
44 "reviews": 850,
45 "rank": 1,
46 "category": "coffee",
47 },
48 {
49 "placeId": "a2",
50 "name": "Cafe Two",
51 "searchQuery": "coffee Austin",
52 "rating": 4.1,
53 "reviews": 270,
54 "rank": 4,
55 "category": "coffee",
56 },
57 ],
58}
59
60
61run = client.actor("quanmatrix/google-maps-market-whitespace-expansion-intelligence").call(run_input=run_input)
62
63
64print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
65for item in client.dataset(run.default_dataset_id).iterate_items():
66 print(item)
67
68