1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "twid": "u%3D1234567890",
10 "proxy": {
11 "ip": "http://proxy.example.com",
12 "port": "1080",
13 "username": "example_username",
14 "password": "example_password",
15 },
16 "maxCount": 10,
17 "guest_token": "2071493852049846302",
18 "twProfileUrl": "https://x.com/OpenAI",
19 "texAuVariables": {
20 "yourFullName": "Example Person",
21 "yourDescription": "Example role",
22 "yourCompanyDescription": "Example company",
23 "yourUsp": "Example USP",
24 },
25 "connectedAccountId": "example_connected_account_id",
26 "authorization": "Bearer ...",
27 "twExtractionMode": "IOh4aS6UdGWGJUYTqliQ7Q/Followers",
28 "user-agent": "Mozilla/5.0 ...",
29 "User-Agent": "Mozilla/5.0 ...",
30 "sec-ch-ua-platform": "macOS",
31 "txSmSelfProfileUrl": "https://twitter.com/example_self",
32}
33
34
35run = client.actor("automationagents/twitter-followers-following-export").call(run_input=run_input)
36
37
38print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
39for item in client.dataset(run["defaultDatasetId"]).iterate_items():
40 print(item)
41
42