X (Twitter) Advanced Search Post Scraper 𝕏 avatar
X (Twitter) Advanced Search Post Scraper 𝕏

Pricing

from $0.35 / 1,000 results

Go to Apify Store
X (Twitter) Advanced Search Post Scraper 𝕏

X (Twitter) Advanced Search Post Scraper 𝕏

Developed by

API ninja

API ninja

Maintained by Community

Advanced X (Twitter) post search with 50+ filters: content, users, geo, time, engagement, media. Dual modes: simple queries or structured filters. Enterprise-grade reliability for precise data extraction

5.0 (3)

Pricing

from $0.35 / 1,000 results

16

59

59

Last modified

7 days ago

🚀 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.

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)

{
"query": "artificial intelligence OR AI from:elonmusk since:2024-01-01",
"queryType": "Latest",
"numberOfTweets": 100
}

Method B: Advanced Filters (Maximum Precision)

{
"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

OperatorDescriptionExample
"exact phrase"Search for exact phrases"machine learning"
keyword1 keyword2Both keywords (implicit AND)AI technology
keyword1 OR keyword2Either keywordAI OR artificial intelligence
+forced_termForce inclusion (prevent spelling correction)+radiooooo
-excluded_termExclude termsAI -spam
#hashtagHashtag search#AI
$cashtagStock symbol search$TSLA
?Questions onlyWhat ?
:) or :(Positive/negative emoticons:) OR :(
url:domain.comURL content searchurl:github.com
lang:enLanguage filterlang:en

User Operators

OperatorDescriptionExample
from:usernameTweets from specific userfrom:elonmusk
to:usernameReplies to specific userto:support
@usernameMentions of specific user@company_handle
list:list_idTweets from list memberslist:715919216927322112
filter:verifiedVerified users onlyfilter:verified
filter:blue_verifiedBlue checkmark usersfilter:blue_verified

Geographic Operators

OperatorDescriptionExample
near:"city"Geotagged in locationnear:"San Francisco"
within:radiusWithin radius of locationwithin:10km
geocode:lat,long,radiusPrecise coordinatesgeocode:37.7764685,-122.4172004,10km
place:place_idSpecific place IDplace:96683cc9126741d1

Time Operators

OperatorDescriptionExample
since:2024-01-01From date (inclusive)since:2024-01-01
until:2024-12-31Before date (exclusive)until:2024-12-31
since_time:timestampUnix timestamp fromsince_time:1640995200
until_time:timestampUnix timestamp untiluntil_time:1672531199
within_time:2dRelative time windowwithin_time:24h

Engagement Operators

OperatorDescriptionExample
min_retweets:5Minimum retweetsmin_retweets:100
min_faves:10Minimum likesmin_faves:1000
min_replies:100Minimum repliesmin_replies:50
filter:has_engagementHas any engagementfilter:has_engagement

Media Operators

OperatorDescriptionExample
filter:mediaAll media typesfilter:media
filter:imagesImages onlyfilter:images
filter:videosVideos onlyfilter:videos
filter:linksContains linksfilter:links
filter:newsNews contentfilter:news

Tweet Type Operators

OperatorDescriptionExample
filter:retweetsRetweets and quotesfilter:retweets
filter:repliesReply tweetsfilter:replies
filter:quoteQuote tweetsfilter:quote
conversation_id:idConversation threadconversation_id:1140437409710116865

For the complete reference, visit: Twitter Advanced Search Operators

📊 Advanced Filter System Deep Dive

Content Filters

{
"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

{
"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

{
"geo": {
"near": "San Francisco",
"withinRadius": "25km",
"geocode": "37.7764685,-122.4172004,10km",
"placeId": "96683cc9126741d1"
}
}

Time Filters

{
"time": {
"since": "2024-01-01",
"until": "2024-12-31",
"sinceTime": 1640995200,
"untilTime": 1672531199,
"sinceId": "1138872932887924737",
"maxId": "1144730280353247233",
"withinTime": "24h"
}
}

Engagement Filters with Smart Presets

{
"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

{
"media": {
"mediaTypes": ["images", "videos"],
"excludeMediaTypes": ["vine"],
"hasLinks": true,
"hasMentions": false,
"hasHashtags": true,
"newsOnly": false,
"safeContentOnly": true
}
}

Tweet Type Filters

{
"tweetTypes": {
"tweetTypes": ["original", "quotes"],
"excludeTweetTypes": ["retweets", "replies"],
"conversationId": "1140437409710116865",
"quotedTweetId": "1138631847783608321",
"quotedUserId": "11348282",
"includeNativeRetweets": false
}
}

App/Source Filters

{
"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

{
"advancedFilters": {
"engagement": {
"minLikes": 1000,
"minRetweets": 100
}
}
}

News Content

{
"advancedFilters": {
"media": {
"newsOnly": true,
"hasLinks": true
},
"content": {
"language": "en"
}
}
}

Verified Users Only

{
"advancedFilters": {
"users": {
"verifiedOnly": true
}
}
}

Recent Tweets (24 hours)

{
"advancedFilters": {
"time": {
"withinTime": "24h"
}
}
}

Local News

{
"advancedFilters": {
"geo": {
"near": "New York",
"withinRadius": "50km"
},
"media": {
"newsOnly": true
}
}
}

📈 Output Data Structure

Our actor returns comprehensive, structured data for each tweet:

{
"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": []
}
}

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.