1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = { "csvText": """query,page,clicks,impressions,position
9best running shoes,https://example.com/best-running-shoes,120,4000,6.2
10best running shoes,https://example.com/blog/running-shoes-guide,15,2100,14.8
11best running shoes,https://example.com/shop/running,3,600,31.0
12running shoes for flat feet,https://example.com/flat-feet-shoes,80,1500,4.1
13running shoes for flat feet,https://example.com/flat-feet-shoes/?srsltid=AfmBOoq1,12,700,5.0
14how to clean running shoes,https://example.com/blog/clean-shoes,40,900,3.5
15how to clean running shoes,https://example.com/blog/shoe-care,22,850,7.9
16trail running shoes,https://example.com/trail-shoes,60,1800,5.0
17trail running shoes,https://example.com/collections/trail,25,1200,9.4
18trail running shoes,https://example.com/blog/trail-vs-road,4,500,18.2
19marathon training plan,https://example.com/blog/marathon-plan,90,3000,3.1
20marathon training plan,https://example.com/blog/marathon-plan-16-weeks,30,1900,8.7
21running socks,https://example.com/shop/socks,35,1100,4.4""" }
22
23
24run = client.actor("cygnix_labs/keyword-cannibalization-finder").call(run_input=run_input)
25
26
27print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
28for item in client.dataset(run.default_dataset_id).iterate_items():
29 print(item)
30
31