1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "currentItems": [
10 {
11 "companyId": "CMP1",
12 "company": "Acme Cloud",
13 "department": "Engineering",
14 "headcount": 115,
15 "category": "growth",
16 "date": "2026-10-12",
17 },
18 {
19 "companyId": "CMP2",
20 "company": "Beta Systems",
21 "department": "Sales",
22 "headcount": 78,
23 "category": "growth",
24 "date": "2026-10-12",
25 },
26 {
27 "companyId": "CMP3",
28 "company": "Gamma Labs",
29 "department": "R&D",
30 "headcount": 41,
31 "category": "stable",
32 "date": "2026-10-12",
33 },
34 ],
35 "previousItems": [
36 {
37 "companyId": "CMP1",
38 "company": "Acme Cloud",
39 "department": "Engineering",
40 "headcount": 105,
41 "category": "growth",
42 "date": "2026-10-05",
43 },
44 {
45 "companyId": "CMP2",
46 "company": "Beta Systems",
47 "department": "Sales",
48 "headcount": 85,
49 "category": "decline",
50 "date": "2026-10-05",
51 },
52 ],
53}
54
55
56run = client.actor("quanmatrix/linkedin-company-workforce-snapshot-analyzer").call(run_input=run_input)
57
58
59print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
60for item in client.dataset(run.default_dataset_id).iterate_items():
61 print(item)
62
63