1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "advertisers": [
10 {
11 "name": "HubSpot",
12 "domain": "hubspot.com",
13 "googleAdvertiserId": "AR10072600183532683265",
14 "linkedinUrl": "https://www.linkedin.com/company/hubspot",
15 },
16 {
17 "name": "monday.com",
18 "domain": "monday.com",
19 "googleAdvertiserId": "AR15972262369074085889",
20 "linkedinUrl": "https://www.linkedin.com/company/mondaydotcom",
21 },
22 ],
23 "platforms": ["google"],
24 "googleRegion": "anywhere",
25 "linkedinCountries": [],
26 "tiktokQueries": [
27 {
28 "keyword": "fitness app",
29 "region": "SA",
30 "period": 30,
31 },
32 {
33 "keyword": "fitness app",
34 "region": "US",
35 "period": 30,
36 },
37 ],
38 "maxAdsPerAdvertiser": 20,
39 "trackingId": "competitor-ads",
40 "proxyConfiguration": { "useApifyProxy": True },
41}
42
43
44run = client.actor("almoutasem_nabil/ad-library-intelligence").call(run_input=run_input)
45
46
47print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
48for item in client.dataset(run.default_dataset_id).iterate_items():
49 print(item)
50
51