1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = { "adsFile": {
9 "format": "json",
10 "content": """[
11 {
12 \"advertiserName\": \"North Pier Demo\",
13 \"adId\": \"DEMO-106\",
14 \"adText\": \"Compare the sample dashboard.\",
15 \"creativeType\": \"image\",
16 \"creativeReferenceUrl\": \"https://example.org/demo/a.png\",
17 \"landingPageUrl\": \"https://example.org/demo\",
18 \"sourceUrl\": \"https://example.org/demo/export\",
19 \"sourceReportedStartDate\": \"2026-01-12\"
20 },
21 {
22 \"advertiserName\": \"North Pier Demo\",
23 \"adId\": \"DEMO-106\",
24 \"adText\": \"Compare the sample dashboard.\",
25 \"creativeType\": \"image\",
26 \"creativeReferenceUrl\": \"https://example.org/demo/a.png\",
27 \"landingPageUrl\": \"https://example.org/demo\",
28 \"sourceUrl\": \"https://example.org/demo/export\",
29 \"sourceReportedStartDate\": \"2026-01-12\"
30 },
31 {
32 \"advertiserName\": \"North Pier Demo\",
33 \"adId\": \"DEMO-106\",
34 \"adText\": \"Compare the sample dashboard.\",
35 \"creativeType\": \"image\",
36 \"creativeReferenceUrl\": \"https://example.org/demo/b.png\",
37 \"landingPageUrl\": \"https://example.org/demo\",
38 \"sourceUrl\": \"https://example.org/demo/export\",
39 \"sourceReportedStartDate\": null
40 }
41]""",
42 } }
43
44
45run = client.actor("afkdigital/linkedin-b2b-ad-intelligence").call(run_input=run_input)
46
47
48print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
49for item in client.dataset(run.default_dataset_id).iterate_items():
50 print(item)
51
52