๐Ÿฏ Twitter (X) User Scraper (Pay Per Result) avatar
๐Ÿฏ Twitter (X) User Scraper (Pay Per Result)
Try for free

Pay $0.30 for 1,000 users

View all Actors
๐Ÿฏ Twitter (X) User Scraper (Pay Per Result)

๐Ÿฏ Twitter (X) User Scraper (Pay Per Result)

apidojo/twitter-user-scraper
Try for free

Pay $0.30 for 1,000 users

Introducing Twitter (X) User Scraper, the ultimate solution for direct user extraction from Twitter (X). It offers blazing speed and comprehensiveness, delivering lightning-fast user extraction features.

The code examples below show how to run the Actor and get its results. To run the code, you need to have an Apify account. Replace <YOUR_API_TOKEN> in the code with your API token, which you can find under Settings > Integrations in Apify Console. Learn more

1from apify_client import ApifyClient
2
3# Initialize the ApifyClient with your Apify API token
4client = ApifyClient("<YOUR_API_TOKEN>")
5
6# Prepare the Actor input
7run_input = {
8    "startUrls": [
9        "https://twitter.com/apify",
10        "https://twitter.com/BillGates",
11        "https://twitter.com/SpaceX/status/1725852544587727145",
12        "https://twitter.com/search?q=elon&src=typed_query",
13    ],
14    "searchTerms": [
15        "elonmusk",
16        "taylorswift13",
17    ],
18    "maxItems": 1000,
19    "twitterHandles": [
20        "elonmusk",
21        "taylorswift13",
22    ],
23    "twitterUserIds": [
24        "44196397",
25        "17919972",
26    ],
27    "customMapFunction": "(object) => { return {...object} }",
28}
29
30# Run the Actor and wait for it to finish
31run = client.actor("apidojo/twitter-user-scraper").call(run_input=run_input)
32
33# Fetch and print Actor results from the run's dataset (if there are any)
34print("๐Ÿ’พ Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
35for item in client.dataset(run["defaultDatasetId"]).iterate_items():
36    print(item)
37
38# ๐Ÿ“š Want to learn more ๐Ÿ“–? Go to โ†’ https://docs.apify.com/api/client/python/docs/quick-start
Developer
Maintained by Community
Actor metrics
  • 146 monthly users
  • 12 stars
  • 98.4% runs succeeded
  • 4.4 hours response time
  • Created in Nov 2023
  • Modified about 11 hours ago