1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = { "snapshots": [
9 {
10 "date": "2026-01-01",
11 "label": "January export",
12 "items": [
13 {
14 "placeId": "a1",
15 "categoryName": "Coffee shop",
16 "city": "Springfield",
17 },
18 {
19 "placeId": "a2",
20 "categoryName": "Coffee shop",
21 "city": "Springfield",
22 },
23 {
24 "placeId": "a3",
25 "categoryName": "Bakery",
26 "city": "Springfield",
27 },
28 {
29 "placeId": "a4",
30 "categoryName": "Gym",
31 "city": "Rivertown",
32 },
33 {
34 "placeId": "a5",
35 "categoryName": "Coffee shop",
36 "city": "Rivertown",
37 },
38 ],
39 },
40 {
41 "date": "2026-04-01",
42 "label": "April export",
43 "items": [
44 {
45 "placeId": "a1",
46 "categoryName": "Coffee shop",
47 "city": "Springfield",
48 },
49 {
50 "placeId": "a3",
51 "categoryName": "Bakery",
52 "city": "Springfield",
53 },
54 {
55 "placeId": "b1",
56 "categoryName": "Bakery",
57 "city": "Springfield",
58 },
59 {
60 "placeId": "a4",
61 "categoryName": "Gym",
62 "city": "Rivertown",
63 },
64 {
65 "placeId": "b2",
66 "categoryName": "Gym",
67 "city": "Rivertown",
68 },
69 {
70 "placeId": "b3",
71 "categoryName": "Yoga studio",
72 "city": "Rivertown",
73 },
74 ],
75 },
76 ] }
77
78
79run = client.actor("practical_ai_lab_jp/pal-maps-local-category-trends").call(run_input=run_input)
80
81
82print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
83for item in client.dataset(run.default_dataset_id).iterate_items():
84 print(item)
85
86