1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "twProfileUrl": "https://x.com/example_profile",
10 "maxProfileTweetCount": 10,
11 "auth_token": "example_auth_token",
12 "ct0": "example_ct0",
13 "kdt": "example_kdt",
14 "twid": "u%3D1234567890",
15 "user-agent": "Mozilla/5.0 ...",
16 "bearerToken": "Bearer example",
17 "guest_token": "1234567890",
18 "sec-ch-ua-platform": "macOS",
19 "authorization": "Bearer example",
20 "User-Agent": "Mozilla/5.0 ...",
21 "x-csrf-token": "example_x-csrf-token",
22 "txSmSelfProfileUrl": "https://twitter.com/example_self",
23 "proxy": {
24 "ip": "http://proxy.example.com",
25 "port": "1080",
26 "username": "example_username",
27 "password": "example_password",
28 },
29}
30
31
32run = client.actor("automationagents/twitter-profile-tweets-export").call(run_input=run_input)
33
34
35print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
36for item in client.dataset(run["defaultDatasetId"]).iterate_items():
37 print(item)
38
39