1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "startDate": "2025-10-01",
10 "endDate": "2025-10-31",
11 "splitMode": "day",
12 "language": "any",
13 "maxItems": 80,
14 "All_of_these_words": "ai",
15 "This_exact_phrase": "",
16 "Any_of_these_words": "",
17 "None_of_these_words": "",
18 "These_hashtags": "",
19 "From_these_accounts": "elonmusk",
20 "To_these_accounts": "",
21 "Mentioning_these_accounts": "",
22 "Minimum_replies": 0,
23 "Minimum_likes": 0,
24 "Minimum_reposts": 0,
25}
26
27
28run = client.actor("delicious_zebu/ultimate-x-twitter-advanced-search-scraper").call(run_input=run_input)
29
30
31print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
32for item in client.dataset(run["defaultDatasetId"]).iterate_items():
33 print(item)
34
35