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