1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "inputJson": """{
10 \"business\": {
11 \"name\": \"Northwind Dental\",
12 \"category\": \"Dentist\",
13 \"location\": \"Chicago, IL\"
14 },
15 \"dateRanges\": {
16 \"current\": { \"start\": \"2026-03-15\", \"end\": \"2026-04-13\" },
17 \"previous\": { \"start\": \"2026-02-14\", \"end\": \"2026-03-14\" }
18 },
19 \"timeline\": [
20 {
21 \"date\": \"2026-04-13\",
22 \"profileViews\": 342,
23 \"searchViews\": 188,
24 \"mapsViews\": 154,
25 \"websiteClicks\": 20,
26 \"calls\": 15,
27 \"directionRequests\": 18,
28 \"bookings\": 5,
29 \"messages\": 7,
30 \"menuClicks\": 8,
31 \"productViews\": 21,
32 \"photoViews\": 96,
33 \"postEngagement\": 14,
34 \"impressions\": 371,
35 \"brandedViews\": 118,
36 \"discoveryViews\": 224
37 }
38 ],
39 \"searchQueries\": [
40 {
41 \"query\": \"family dentist chicago\",
42 \"impressions\": 380,
43 \"clicks\": 41,
44 \"branded\": false,
45 \"avgRank\": 3.4,
46 \"category\": \"Dentist\",
47 \"location\": \"Chicago\"
48 }
49 ],
50 \"reviews\": [
51 { \"date\": \"2026-04-12\", \"rating\": 4, \"responded\": false }
52 ],
53 \"rankings\": [
54 { \"date\": \"2026-04-10\", \"keyword\": \"family dentist chicago\", \"location\": \"Chicago\", \"rank\": 3 }
55 ]
56}""",
57 "useSampleData": False,
58}
59
60
61run = client.actor("shahabuddin38/google-business-profile-kpi-analyzer").call(run_input=run_input)
62
63
64print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
65for item in client.dataset(run["defaultDatasetId"]).iterate_items():
66 print(item)
67
68