๐Ÿฏ 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

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