1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "keywords": ["how to cook pasta"],
10 "language": "en",
11 "country": "US",
12 "maxSuggestionsPerKeyword": 20,
13 "expandWithLetters": False,
14 "includeSearchEvidence": True,
15 "maxSearchResults": 5,
16 "maxRetries": 2,
17 "enableProxyFallback": True,
18 "requestDelayMs": 250,
19 "requestTimeoutSecs": 60,
20 "proxyConfiguration": { "useApifyProxy": False },
21}
22
23
24run = client.actor("w3crawler/youtube-keywords-discovery-tool").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