X (Twitter) Advanced Search Post Scraper π
by api-ninja
Stop wasting hours manually searching Twitter. This actor gives you surgical precision for finding exactly the posts you need, using the platform's mo...
Opens on Apify.com
About X (Twitter) Advanced Search Post Scraper π
Stop wasting hours manually searching Twitter. This actor gives you surgical precision for finding exactly the posts you need, using the platform's most powerful search operators right from your browser or code. Think of it as having the advanced search page on steroids, but automated. You can pull tweets by keyword, specific user, location, date ranges, and even filter by engagement metrics like reply or like counts. Need to find all tweets from last week that contain images and got over 1,000 retweets? Set the filters and let it run. It handles both simple keyword dives and complex, multi-filter queries without breaking a sweat. I use it for monitoring brand mentions, tracking campaign hashtags, conducting market research, and gathering competitive intelligence. The data comes out clean and structured, ready for analysis in a spreadsheet or your own app. Itβs built on Apifyβs reliable platform, so you can schedule runs or integrate it into larger workflows knowing it wonβt flake out on you. If you need targeted, actionable data from X (Twitter) without the noise, this scraper is the way to go.
What does this actor do?
X (Twitter) Advanced Search Post 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
- Click "Try This Actor" to open it on Apify
- Create a free Apify account if you don't have one
- Configure the input parameters as needed
- Run the actor and download your results
Documentation
π X (Twitter) Advanced Search Actor The most powerful and flexible Twitter search solution for Apify - Unlock the full potential of X (formerly Twitter) data collection with our sophisticated search capabilities and advanced filtering system. ## π What Makes Us Superior? Our X (Twitter) Advanced Search Actor represents the pinnacle of social media data extraction technology. Unlike basic scrapers that offer limited functionality, we provide: ### π― Dual Search Modes for Maximum Flexibility - Simple Query Mode: Use traditional X search syntax for quick, straightforward searches - Advanced Filter Mode: Leverage our revolutionary structured filter system for precise, complex data collection ### π Industry-Leading Filter System Our proprietary filtering technology offers 8 comprehensive filter categories with 50+ individual filter options: - Content Filters: Keywords, exact phrases, hashtags, cashtags, language detection, emoticons, and more - User Filters: Verified users, blue checkmarks, specific accounts, mentions, and user lists - Geographic Filters: Location-based searches with radius controls and place IDs - Time Filters: Date ranges, Unix timestamps, relative time windows, and tweet ID boundaries - Engagement Filters: Like, retweet, and reply thresholds with smart presets - Media Filters: Images, videos, links, news content, and safe content filtering - Tweet Type Filters: Original tweets, retweets, quotes, replies, and conversation threads - App/Source Filters: Platform-specific searches and card content filtering ### β‘ Advanced Features That Set Us Apart - π§ Intelligent Query Optimization: Automatic query refinement for better performance and results - π‘οΈ Robust Input Validation: Comprehensive validation prevents invalid filter combinations - π Smart Engagement Presets: Quick access to viral, trending, and engagement-based filters - π Seamless Pagination: Automatic handling of large datasets with cursor-based navigation - π Flexible Query Types: Choose between "Latest" (real-time) or "Top" (popular) results - π¨ Structured Data Output: Clean, consistent JSON format for easy analysis and integration ## π Why Choose Our X (Twitter) Advanced Search Actor? ### Unmatched Precision Our advanced filter system allows you to target exactly the content you need, reducing noise and improving data quality by up to 90%. ### Enterprise-Grade Reliability Built with scalability and reliability in mind, our actor handles millions of tweets with consistent performance and comprehensive error handling. ### Developer-Friendly Clean APIs, detailed documentation, and extensive examples make integration seamless for developers of all skill levels. ### Future-Proof Technology Our modular architecture adapts to X's evolving platform, ensuring your data collection remains uninterrupted. ## π How to Use X (Twitter) Advanced Search ### Step 1: Set Up Your API Key Configure your API credentials in your Apify account environment variables. ### Step 2: Choose Your Search Method #### Method A: Simple Query (Quick & Easy) json { "query": "artificial intelligence OR AI from:elonmusk since:2024-01-01", "queryType": "Latest", "numberOfTweets": 100 } #### Method B: Advanced Filters (Maximum Precision) json { "advancedFilters": { "content": { "keywords": ["machine learning", "AI"], "hashtags": ["AI", "MachineLearning"], "language": "en", "excludeKeywords": ["spam", "bot"] }, "users": { "verifiedOnly": true, "fromUsers": ["elonmusk", "tim_cook"] }, "engagement": { "minLikes": 100, "minRetweets": 10 }, "time": { "withinTime": "24h" } }, "queryType": "Top", "numberOfTweets": 200 } ### Step 3: Execute and Collect Run the actor and access your structured data in multiple formats (JSON, CSV, Excel). ## π§ X (Twitter) Advanced Search Syntax Reference Our actor supports the complete range of X's advanced search operators. Here's your comprehensive reference: ### Content Operators | Operator | Description | Example | |----------|-------------|---------| | "exact phrase" | Search for exact phrases | "machine learning" | | keyword1 keyword2 | Both keywords (implicit AND) | AI technology | | keyword1 OR keyword2 | Either keyword | AI OR artificial intelligence | | +forced_term | Force inclusion (prevent spelling correction) | +radiooooo | | -excluded_term | Exclude terms | AI -spam | | #hashtag | Hashtag search | #AI | | $cashtag | Stock symbol search | $TSLA | | ? | Questions only | What ? | | :) or :( | Positive/negative emoticons | :) OR :( | | url:domain.com | URL content search | url:github.com | | lang:en | Language filter | lang:en | ### User Operators | Operator | Description | Example | |----------|-------------|---------| | from:username | Tweets from specific user | from:elonmusk | | to:username | Replies to specific user | to:support | | @username | Mentions of specific user | @company_handle | | list:list_id | Tweets from list members | list:715919216927322112 | | filter:verified | Verified users only | filter:verified | | filter:blue_verified | Blue checkmark users | filter:blue_verified | ### Geographic Operators | Operator | Description | Example | |----------|-------------|---------| | near:"city" | Geotagged in location | near:"San Francisco" | | within:radius | Within radius of location | within:10km | | geocode:lat,long,radius | Precise coordinates | geocode:37.7764685,-122.4172004,10km | | place:place_id | Specific place ID | place:96683cc9126741d1 | ### Time Operators | Operator | Description | Example | |----------|-------------|---------| | since:2024-01-01 | From date (inclusive) | since:2024-01-01 | | until:2024-12-31 | Before date (exclusive) | until:2024-12-31 | | since_time:timestamp | Unix timestamp from | since_time:1640995200 | | until_time:timestamp | Unix timestamp until | until_time:1672531199 | | within_time:2d | Relative time window | within_time:24h | ### Engagement Operators | Operator | Description | Example | |----------|-------------|---------| | min_retweets:5 | Minimum retweets | min_retweets:100 | | min_faves:10 | Minimum likes | min_faves:1000 | | min_replies:100 | Minimum replies | min_replies:50 | | filter:has_engagement | Has any engagement | filter:has_engagement | ### Media Operators | Operator | Description | Example | |----------|-------------|---------| | filter:media | All media types | filter:media | | filter:images | Images only | filter:images | | filter:videos | Videos only | filter:videos | | filter:links | Contains links | filter:links | | filter:news | News content | filter:news | ### Tweet Type Operators | Operator | Description | Example | |----------|-------------|---------| | filter:retweets | Retweets and quotes | filter:retweets | | filter:replies | Reply tweets | filter:replies | | filter:quote | Quote tweets | filter:quote | | conversation_id:id | Conversation thread | conversation_id:1140437409710116865 | For the complete reference, visit: Twitter Advanced Search Operators ## π Advanced Filter System Deep Dive ### Content Filters json { "content": { "keywords": ["artificial intelligence", "AI"], "exactPhrases": ["\"machine learning algorithms\""], "excludeKeywords": ["spam", "bot"], "hashtags": ["AI", "MachineLearning"], "excludeHashtags": ["spam"], "cashtags": ["TSLA", "AAPL"], "urls": ["github.com", "stackoverflow.com"], "language": "en", "questionMarks": true, "emoticons": "positive", "emojis": ["π", "π‘"], "wildcardPhrases": ["\"this is the * time this week\""] } } ### User Filters json { "users": { "fromUsers": ["elonmusk", "tim_cook"], "toUsers": ["support"], "mentionUsers": ["company_handle"], "excludeFromUsers": ["spam_account"], "lists": ["715919216927322112"], "verifiedOnly": true, "blueVerifiedOnly": false, "followsOnly": false, "socialNetworkOnly": false, "trustedOnly": false } } ### Geographic Filters json { "geo": { "near": "San Francisco", "withinRadius": "25km", "geocode": "37.7764685,-122.4172004,10km", "placeId": "96683cc9126741d1" } } ### Time Filters json { "time": { "since": "2024-01-01", "until": "2024-12-31", "sinceTime": 1640995200, "untilTime": 1672531199, "sinceId": "1138872932887924737", "maxId": "1144730280353247233", "withinTime": "24h" } } ### Engagement Filters with Smart Presets json { "engagementLevel": "high", // low, medium, high, viral "engagementMinRetweets": 10, "engagementMinLikes": 100, "engagementMaxRetweets": 50, "engagementMaxLikes": 1000, "engagementMinReplies": 5, "engagementMaxReplies": 100, "engagementHasEngagement": true } Quick Presets: - Low: 1-10 likes, 0-2 retweets - Medium: 10-100 likes, 2-10 retweets - High: 100-1000 likes, 10-50 retweets - Viral: 1000+ likes, 50+ retweets ### Media Filters json { "media": { "mediaTypes": ["images", "videos"], "excludeMediaTypes": ["vine"], "hasLinks": true, "hasMentions": false, "hasHashtags": true, "newsOnly": false, "safeContentOnly": true } } ### Tweet Type Filters json { "tweetTypes": { "tweetTypes": ["original", "quotes"], "excludeTweetTypes": ["retweets", "replies"], "conversationId": "1140437409710116865", "quotedTweetId": "1138631847783608321", "quotedUserId": "11348282", "includeNativeRetweets": false } } ### App/Source Filters json { "apps": { "sources": ["twitter_for_iphone", "tweetdeck"], "excludeSources": ["spam_app"], "cardDomains": ["youtube.com", "github.com"], "cardUrls": ["youtube.com/watch"], "cardNames": ["player", "summary"] } } ## π― Pre-Built Filter Presets ### Viral Content json { "advancedFilters": { "engagement": { "minLikes": 1000, "minRetweets": 100 } } } ### News Content json { "advancedFilters": { "media": { "newsOnly": true, "hasLinks": true }, "content": { "language": "en" } } } ### Verified Users Only json { "advancedFilters": { "users": { "verifiedOnly": true } } } ### Recent Tweets (24 hours) json { "advancedFilters": { "time": { "withinTime": "24h" } } } ### Local News json { "advancedFilters": { "geo": { "near": "New York", "withinRadius": "50km" }, "media": { "newsOnly": true } } } ## π Output Data Structure Our actor returns comprehensive, structured data for each tweet: json { "type": "tweet", "id": "1781234567890123456", "url": "https://twitter.com/elonmusk/status/1781234567890123456", "text": "Exciting developments in AI and machine learning!", "source": "Twitter for iPhone", "retweetCount": 1234, "replyCount": 567, "likeCount": 8901, "quoteCount": 234, "viewCount": 45678, "createdAt": "Tue Dec 10 07:00:30 +0000 2024", "lang": "en", "bookmarkCount": 89, "isReply": false, "author": { "type": "user", "userName": "elonmusk", "url": "https://twitter.com/elonmusk", "id": "44196397", "name": "Elon Musk", "isBlueVerified": true, "verifiedType": "Blue", "profilePicture": "https://pbs.twimg.com/profile_images/...", "description": "CEO of Tesla and SpaceX", "location": "Austin, Texas", "followers": 150000000, "following": 500, "createdAt": "Tue Jun 02 20:12:29 +0000 2009" }, "entities": { "hashtags": [ { "indices": [25, 35], "text": "AI" } ], "urls": [], "user_mentions": [] } } ## π‘οΈ Legal and Ethical Considerations Our actor operates within ethical boundaries and legal frameworks: - Public Data Only: We only collect publicly available information that users have chosen to share - No Private Data: We do not access private accounts, direct messages, or personal information - GDPR Compliant: Our data collection respects privacy regulations and user consent - Rate Limiting: Built-in safeguards prevent excessive API usage - Transparent Operations: Clear documentation of what data is collected and how it's used For detailed information about web scraping legality, please refer to our comprehensive guide. ## π‘ Pro Tips for Maximum Results ### π― Optimization Strategies - Start Specific: Begin with targeted filters and expand as needed - Combine Filters: Use multiple filter types for precise results - Test Iteratively: Experiment with different combinations to find optimal settings - Monitor Performance: Track query performance and adjust accordingly ### π§ Advanced Techniques - Use Engagement Presets: Leverage our smart presets for common use cases - Time-Based Filtering: Combine date ranges with engagement filters for trending content - Geographic Targeting: Use location filters for local market research - Content Analysis: Combine language and sentiment filters for brand monitoring ### π Best Practices - Validate Inputs: Our actor validates all filter combinations automatically - Handle Pagination: Use cursor-based pagination for large datasets - Monitor Rate Limits: Be aware of API limitations for high-volume operations - Data Quality: Use exclusion filters to improve result relevance ## π Getting Started 1. Set up your API credentials in your Apify account 2. Choose your search method (Simple Query or Advanced Filters) 3. Configure your parameters using our comprehensive filter system 4. Execute the actor and collect your structured data 5. Analyze and integrate your results using multiple export formats ## π Support and Documentation - Comprehensive Examples: Extensive code samples and use cases - Filter Documentation: Detailed explanations of all filter options - API Reference: Complete technical documentation - Community Support: Active community and expert assistance --- Ready to unlock the full potential of X (Twitter) data? Start with our advanced search capabilities and experience the difference that superior technology makes. Transform your social media intelligence with the most powerful X (Twitter) search solution available.
Categories
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 (Twitter) Advanced Search Post Scraper π now on Apify. Free tier available with no credit card required.
Start Free TrialActor Information
- Developer
- api-ninja
- Pricing
- Paid
- Total Runs
- 164,320
- Active Users
- 250
Related Actors
π― Tweet Scraper V2 - X / Twitter Scraper
by apidojo
Instagram Scraper
by apify
TikTok Scraper
by clockworks
Instagram Profile Scraper
by apify
Apify provides a cloud platform for web scraping, data extraction, and automation. Build and run web scrapers in the cloud.
Learn more about ApifyNeed Professional Help?
Couldn't solve your problem? Hire a verified specialist on Fiverr to get it done quickly and professionally.
Trusted by millions | Money-back guarantee | 24/7 Support