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 "texAuVariables": {
11 "yourFullName": "Example Person",
12 "yourDescription": "Example role",
13 "yourCompanyDescription": "Example company",
14 "yourUsp": "Example USP",
15 },
16 "connectedAccountId": "example_connected_account_id",
17 "twid": "1234567890",
18 "user-agent": "Mozilla/5.0 ...",
19 "bearerToken": "Bearer example",
20 "guest_token": "1234567890",
21 "sec-ch-ua-platform": "macOS",
22 "authorization": "Bearer example",
23 "User-Agent": "Mozilla/5.0 ...",
24 "txSmSelfProfileUrl": "https://twitter.com/example_self",
25 "proxy": {
26 "ip": "http://proxy.example.com",
27 "port": "1080",
28 "username": "example_username",
29 "password": "example_password",
30 },
31}
32
33
34run = client.actor("automationagents/twitter-profile-scraper").call(run_input=run_input)
35
36
37print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
38for item in client.dataset(run["defaultDatasetId"]).iterate_items():
39 print(item)
40
41