X.com Twitter API Scraper

X.com Twitter API Scraper

by xtdata

Scrape Twitter (X) data efficiently with this powerful Apify Actor. Real-time, authentic data. No pre-built databases. Extract tweets, user profiles, ...

91,553 runs
877 users
Try This Actor

Opens on Apify.com

About X.com Twitter API Scraper

Scrape Twitter (X) data efficiently with this powerful Apify Actor. Real-time, authentic data. No pre-built databases. Extract tweets, user profiles, and more using keywords, hashtags, URLs, and advanced search filters. Fast, reliable, and cost-effective. #TwitterScraper

What does this actor do?

X.com Twitter API Scraper is a web scraping and automation tool available on the Apify platform. It's designed to help you extract data and automate tasks efficiently in the cloud.

Key Features

  • Cloud-based execution - no local setup required
  • Scalable infrastructure for large-scale operations
  • API access for integration with your applications
  • Built-in proxy rotation and anti-blocking measures
  • Scheduled runs and webhooks for automation

How to Use

  1. Click "Try This Actor" to open it on Apify
  2. Create a free Apify account if you don't have one
  3. Configure the input parameters as needed
  4. Run the actor and download your results

Documentation

X.com Twitter API Scraper - Fast and Efficient Tweet Extraction This Actor provides a powerful and efficient way to scrape data from Twitter (now X). It allows you to extract tweets based on various criteria, making it ideal for researchers, entrepreneurs, data analysts, and anyone needing to gather Twitter data for analysis. It's designed for fetching historical data, not real-time monitoring. ## Key Features * Multiple Input Methods: Get the data you need, how you need it: * Start URLs: Provide direct URLs for tweets, user profiles, search results, or lists. * Search Terms: Use keywords and advanced search operators ( see Advanced Search Guide). * Twitter Handles: Extract tweets from specific users. * Powerful Filtering: Refine your results with precise filtering: * Maximum Items: Control the number of tweets you retrieve. * Sorting: Get results sorted by "Top" or "Latest". * Language: Filter by language using ISO 639-1 codes (a full list of supported languages is available in the Actor's input settings). * User Verification: Target tweets from verified users or Twitter Blue subscribers. * Media Type: Extract only tweets containing images, videos, or quotes. * Date Range: Specify a start and end date to retrieve tweets within a specific timeframe. * Advanced Options: * Include Search Terms: Add a field to each tweet showing the search term that matched it. * Custom Map Function: Transform the output data using a custom JavaScript function (for data shaping, not filtering). * Query Wizard: Easily create complex queries. (Available Tweet X.com Scraper) * Lightning-Fast Performance: * Scrape tweets with incredible speed. (Tweet X.com Scraper: advertised as 30-80 tweets per second) * Cost-Effective: * Competitive pricing. Tweet X.com Scraper: $0.50 per 1,000 tweets. Tutorial from development team: Tutorial: Scrape Twitter Data with Apify's Tweet X.com Scraper ** ## Use Cases * Market Research: Analyze trends, sentiment, and brand perception. * Academic Research: Gather data for social media studies, political science research, and more. * Competitive Analysis: Track competitors' activities and public engagement. * Data Journalism: Uncover insights and patterns within Twitter data. * Historical Data Analysis: Explore past tweets for specific events or periods. ## Quick Start Examples Here are some example input configurations to get you started quickly: 1. Fetching Tweets from a Specific Profile (e.g., NASA) over Several Time Periods: This example fetches English tweets from the NASA profile (@NASA) in multiple date ranges, sorted by latest. json { "includeSearchTerms": false, "onlyImage": false, "onlyQuote": false, "onlyTwitterBlue": false, "onlyVerifiedUsers": false, "onlyVideo": false, "searchTerms": [ "from:elonmusk AI since:2023-01-01 until:2023-03-01", "from:elonmusk AI since:2023-03-01 until:2023-05-01", "from:elonmusk AI since:2023-05-01 until:2023-07-01", "from:elonmusk AI since:2023-07-01 until:2023-09-01", "from:elonmusk AI since:2023-09-01 until:2023-12-01" ], "sort": "Latest", "tweetLanguage": "en" } 2. Fetching Replies to a Specific Tweet with a Hashtag: This example retrieves replies (in English, sorted by latest) to a specific tweet (replace tweet_id_here with the actual tweet ID) that include a specific hashtag (replace hashtag_here). JSON { "includeSearchTerms": false, "onlyImage": false, "onlyQuote": false, "onlyTwitterBlue": false, "onlyVerifiedUsers": false, "onlyVideo": false, "searchTerms": [ "conversation_id:tweet_id_here #hashtag_here" ], "sort": "Latest", "tweetLanguage": "en" } Explanation of Key Input Fields: * searchTerms: This is the core of your query. You can use advanced search operators (as shown in the NASA example) or a conversation ID combined with a hashtag. Refer to the Advanced Search Guide for all the possibilities. * sort: Choose "Latest" for chronological order or "Top" for the most relevant tweets. * tweetLanguage: Specify the language code (e.g., "en" for English). * only... (e.g., onlyImage, onlyVerifiedUsers): Boolean flags (true/false) to filter for specific tweet characteristics. * includeSearchTerms: Set to true if you want an extra field in the output showing which search term matched each tweet. ## Usage Guidelines (Important!) * Historical Data Focus: This Actor is designed for retrieving historical data. Avoid using it for very frequent, real-time monitoring. * Concurrency Limits: There are limits on concurrent runs (maximum 1, with up to 5 batched queries). * Minimum Tweets Per Query: Aim to fetch at least 50 tweets per query (handle, keyword, etc.). This minimum increases proportionally when batching queries. * Single Tweet Fetching Restrictions: Fetching a single tweet by URL is generally prohibited without explicit permission. Allow a few minutes interval time minimum between runs. * Respect Twitter's Terms of Service**: Always use this tool ethically and responsibly. ## Ethical Use and Data Practices Our 'actor' operates without logging in to X.com. This means it does not implicitly accept any Terms of Service (ToS) that require a login, as we only process data that is publicly displayed and accessible to everyone without authentication. We are fully committed to the principle of privacy by design and by default. All data collected explicitly excludes sensitive personal information or non-public data. Furthermore, our actor runs on Apify, an EU-based company, which means our operations are designed to be compliant with relevant EU data protection regulations, including GDPR, where applicable. You can find more information about the legality of web scraping on Apify's blog: https://blog.apify.com/is-web-scraping-legal/ We have implemented robust technical measures to ensure the actor operates gently and does not impose an undue burden on X.com's servers. Our sole purpose is to facilitate responsible research and public data analysis, and we strictly prohibit any use that could cause harm to any party or the platform itself. ### Output Example json [ { "id": "1630332507265589248", "url": "https://x.com/NASA/status/1630332507265589248", "twitterUrl": "https://twitter.com/NASA/status/1630332507265589248", "full_text": "@yalhunzai We have internships open to international students from countries with whom we have agreements: https://t.co/Kl2Lz4qjpw", "favorite_count": 14, "retweet_count": 9, "reply_count": 0, "quote_count": 0, "bookmark_count": 1, "author": { "id_str": "11348282", "screen_name": "NASA", "name": "NASA", "advertiser_account_service_levels": [ "dso", "media_studio" ], "advertiser_account_type": "promotable_user", "analytics_type": "enabled", "can_dm": false, "can_media_tag": true, "created_at": "Wed Dec 19 20:20:32 +0000 2007", "description": "There's space for everybody. ✨\n\nVerification: https://t.co/8nok3NP4PW", "entities": { "description": { "hashtags": [], "symbols": [], "urls": [ { "display_url": "nasa.gov/socialmedia", "expanded_url": "http://nasa.gov/socialmedia", "indices": [ 46, 69 ], "url": "https://t.co/8nok3NP4PW" } ], "user_mentions": [] }, "url": { "urls": [ { "display_url": "nasa.gov", "expanded_url": "http://www.nasa.gov/", "indices": [ 0, 23 ], "url": "https://t.co/9NkQJKAnuU" } ] } }, "fast_followers_count": 0, "favourites_count": 16401, "followers_count": 85752559, "friends_count": 170, "geo_enabled": false, "has_custom_timelines": true, "has_extended_profile": true, "is_translator": false, "location": "Pale Blue Dot", "media_count": 27374, "normal_followers_count": 85752559, "pinned_tweet_ids_str": [], "profile_background_color": "000000", "profile_banner_url": "https://pbs.twimg.com/profile_banners/11348282/1718393721", "profile_image_url_https": "https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB_normal.jpg", "profile_interstitial_type": "", "profile_link_color": "205BA7", "protected": false, "statuses_count": 72761, "translator_type_enum": "Regular", "url": "https://t.co/9NkQJKAnuU", "verified": false, "verified_type": "Government", "withheld_in_countries": [] }, "bookmarked": false, "conversation_id_str": "1630332507265589248", "created_at": "Tue Feb 28 20:28:53 +0000 2023", "display_text_range": [ 11, 130 ], "entities": { "hashtags": [], "symbols": [], "timestamps": [], "urls": [ { "display_url": "go.nasa.gov/3EKfKkN", "expanded_url": "https://go.nasa.gov/3EKfKkN", "indices": [ 107, 130 ], "url": "https://t.co/Kl2Lz4qjpw" } ], "user_mentions": [ { "id_str": "1583456964453040129", "indices": [ 0, 10 ], "name": "Baki bùlen", "screen_name": "yalhunzai" } ] }, "favorited": false, "in_reply_to_screen_name": "yalhunzai", "in_reply_to_status_id_str": "1630616311226048513", "in_reply_to_user_id_str": "1583456964453040129", "is_quote_status": false, "lang": "en", "possibly_sensitive": false, "possibly_sensitive_editable": true, "retweeted": false, "user_id_str": "11348282" } ] ## Troubleshooting If you encounter issues like too few results, no results, or incomplete tweet collection, refer to the detailed troubleshooting section in the Actor's input schema or documentation. Common causes include overly restrictive filters or exceeding rate limits. ## Get Started Start scraping Twitter data today! This Actor provides a powerful, flexible, and cost-effective solution for all your Twitter data extraction needs. | 🎹️ Fast TikTok API | 📹️ TikTok Trend API | 🔍️ TikTok Search API | |:---------------------------------------------------------------------------------------------|:------------------------------------------------------------------------|:------------------------------------------------------------------------------| | 🧛️ TikTok User API | 🧛️ TikTok User Info API | #️ TikTok Hashtag API | | 🛍️ TikTok Shop API | 👤️ TikTok Followers API | ⚡️ TikTok Scraper (pay-per-result) | | 💬 TikTok Comment API | 🎶 TikTok Music API | 🎶 TikTok Music Trend API | | 🎶 Tiktok Scraper Ultimate (pay-per-event) | | |

Common Use Cases

Market Research

Gather competitive intelligence and market data

Lead Generation

Extract contact information for sales outreach

Price Monitoring

Track competitor pricing and product changes

Content Aggregation

Collect and organize content from multiple sources

Ready to Get Started?

Try X.com Twitter API Scraper now on Apify. Free tier available with no credit card required.

Start Free Trial

Actor Information

Developer
xtdata
Pricing
Paid
Total Runs
91,553
Active Users
877
Apify Platform

Apify provides a cloud platform for web scraping, data extraction, and automation. Build and run web scrapers in the cloud.

Learn more about Apify

Need Professional Help?

Couldn't solve your problem? Hire a verified specialist on Fiverr to get it done quickly and professionally.

Find a Specialist

Trusted by millions | Money-back guarantee | 24/7 Support