🏯 Tweet Scraper V2 (Pay Per Result) - X / Twitter Scraper
Pay $0.40 for 1,000 tweets
🏯 Tweet Scraper V2 (Pay Per Result) - X / Twitter Scraper
Pay $0.40 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!
You can access the 🏯 Tweet Scraper V2 (Pay Per Result) - X / Twitter Scraper programmatically from your own JavaScript applications by using the Apify API. You can also choose the language preference from below. To use the Apify API, you’ll need an Apify account and your API token, found in Integrations settings in Apify Console.
1import { ApifyClient } from 'apify-client';
2
3// Initialize the ApifyClient with your Apify API token
4// Replace the '<YOUR_API_TOKEN>' with your token
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9// Prepare Actor input
10const input = {
11 "startUrls": [
12 "https://twitter.com/apify/status/1727706472623091883",
13 "https://twitter.com/apify",
14 "https://twitter.com/search?q=apify%20&src=typed_query",
15 "https://twitter.com/i/lists/78783491",
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// Run the Actor and wait for it to finish
49const run = await client.actor("apidojo/tweet-scraper").call(input);
50
51// Fetch and print Actor results from the run's dataset (if any)
52console.log('Results from dataset');
53console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
54const { items } = await client.dataset(run.defaultDatasetId).listItems();
55items.forEach((item) => {
56 console.dir(item);
57});
58
59// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs
🏯 Tweet Scraper V2 (Pay Per Result) - X / Twitter Scraper API in JavaScript
The Apify API client for JavaScript is the official library that allows you to use 🏯 Tweet Scraper V2 (Pay Per Result) - X / Twitter Scraper API in JavaScript or TypeScript, providing convenience functions and automatic retries on errors.
Install the apify-client
npm install apify-client
Other API clients include:
Actor Metrics
1.9k monthly users
-
357 stars
91% runs succeeded
3 hours response time
Created in Nov 2023
Modified 2 hours ago