🏯 Tweet Scraper V2 (Pay Per Result) - X / Twitter Scraper avatar
🏯 Tweet Scraper V2 (Pay Per Result) - X / Twitter Scraper
Try for free

Pay $0.30 for 1,000 tweets

View all Actors
🏯 Tweet Scraper V2 (Pay Per Result) - X / Twitter Scraper

🏯 Tweet Scraper V2 (Pay Per Result) - X / Twitter Scraper

apidojo/tweet-scraper
Try for free

Pay $0.30 for 1,000 tweets

⚡️ Lightning-fast search, URL, list, and profile scraping, with customizable filters. At $0.30 per 1000 tweets, and 30-80 tweets per second, it is ideal for researchers, entrepreneurs, and businesses! Get comprehensive insights from Twitter (X) now!

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

Node.js

Python

curl

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/status/1727706472623091883",
12        "https://twitter.com/apify",
13        "https://twitter.com/search?q=apify%20&src=typed_query",
14        "https://twitter.com/i/lists/78783491",
15        "https://twitter.com/elonmusk/likes",
16        "https://twitter.com/elonmusk/with_replies"
17    ],
18    "searchTerms": [
19        "web scraping",
20        "scraping from:apify"
21    ],
22    "twitterHandles": [
23        "elonmusk",
24        "taylorswift13"
25    ],
26    "conversationIds": [
27        "1754067365707563045",
28        "1732037140111102460"
29    ],
30    "maxItems": 1000,
31    "sort": "Latest",
32    "tweetLanguage": "en",
33    "author": "apify",
34    "inReplyTo": "webexpo",
35    "mentioning": "elonmusk",
36    "geotaggedNear": "Los Angeles",
37    "withinRadius": "15km",
38    "geocode": "37.7764685,-122.4172004,10km",
39    "placeObjectId": "96683cc9126741d1",
40    "minimumRetweets": 5,
41    "minimumFavorites": 5,
42    "minimumReplies": 5,
43    "start": "2021-07-01",
44    "end": "2021-07-02",
45    "customMapFunction": (object) => { return {...object} }
46};
47
48(async () => {
49    // Run the Actor and wait for it to finish
50    const run = await client.actor("apidojo/tweet-scraper").call(input);
51
52    // Fetch and print Actor results from the run's dataset (if any)
53    console.log('Results from dataset');
54    console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
55    const { items } = await client.dataset(run.defaultDatasetId).listItems();
56    items.forEach((item) => {
57        console.dir(item);
58    });
59})();
60
61// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs
Developer
Maintained by Community
Actor metrics
  • 1.1k monthly users
  • 94.3% runs succeeded
  • 0.3 days response time
  • Created in Nov 2023
  • Modified about 6 hours ago