# X Twitter Advanced Search Tweet Extractor

**Use case:** 

Extract detailed engagement data from Twitter in seconds. Get tweets, media URLs, profiles, and engagement stats using advanced filters.

## Input

```json
{
  "query": "ice",
  "queryType": "Latest",
  "numberOfTweets": 100,
  "maxPages": 50,
  "searchType": "tweets",
  "includeUserStats": true,
  "engagementLevel": "none",
  "engagementMinRetweets": 10,
  "engagementMaxRetweets": 1000,
  "engagementMinLikes": 50,
  "engagementMaxLikes": 5000,
  "engagementMinReplies": 5,
  "engagementMaxReplies": 500,
  "engagementHasEngagement": false,
  "mediaTypes": [
    "image",
    "video"
  ],
  "mediaHasLinks": false,
  "mediaHasMentions": false,
  "mediaHasHashtags": false,
  "mediaNewsOnly": false,
  "mediaSafeContentOnly": false,
  "usersBlueVerifiedOnly": false,
  "usersVerifiedOnly": false,
  "usersFromUsers": [
    "elonmusk",
    "OpenAI"
  ],
  "usersToUsers": [
    "support",
    "customerservice"
  ],
  "usersMentionUsers": [
    "nasa",
    "spacex"
  ],
  "usersExcludeFromUsers": [
    "spambot",
    "promotional_account"
  ],
  "usersListMembers": [
    "Twitter/verified-accounts",
    "123456789"
  ],
  "contentKeywords": [
    "climate change",
    "sustainability",
    "renewable energy"
  ],
  "contentExactPhrases": [
    "breaking news",
    "just announced"
  ],
  "contentExcludeKeywords": [
    "spam",
    "ad",
    "promotion"
  ],
  "contentHashtags": [
    "AI",
    "MachineLearning",
    "TechNews"
  ],
  "contentExcludeHashtags": [
    "ad",
    "sponsored",
    "giveaway"
  ],
  "contentCashtags": [
    "AAPL",
    "TSLA",
    "GOOGL"
  ],
  "contentQuestionMarks": false,
  "tweetTypes": [
    "quote",
    "reply"
  ],
  "tweetTypesExclude": [
    "retweet"
  ],
  "tweetConversationId": "1234567890123456789",
  "tweetQuotedTweetId": "1234567890123456789",
  "tweetQuotedUserId": "44196397",
  "tweetPollTypes": [
    "poll",
    "poll4choice_text_only"
  ],
  "timeSinceUnix": 1704067200,
  "timeUntilUnix": 1735689599,
  "timeSinceId": "1234567890123456789",
  "timeMaxId": "9876543210987654321",
  "geoNear": "New York City",
  "geoWithinRadius": "25km",
  "geoGeocode": "40.7128,-74.0060,15mi",
  "geoPlaceId": "96683cc9126741d1",
  "apps": {
    "sources": [
      "Twitter for iPhone",
      "TweetDeck"
    ],
    "excludeSources": [
      "IFTTT",
      "Buffer"
    ],
    "cardDomains": [
      "youtube.com",
      "github.com"
    ],
    "cardUrls": [
      "youtube.com/watch",
      "github.com/repos"
    ],
    "cardNames": [
      "player",
      "summary"
    ]
  },
  "appsSources": [
    "Twitter for iPhone",
    "TweetDeck"
  ],
  "appsExcludeSources": [
    "IFTTT",
    "Buffer"
  ],
  "cardDomain": "youtube.com",
  "cardUrl": "https://www.youtube.com/watch?v=example",
  "maxRetry": 5,
  "useResidentialProxy": true,
  "proxyConfiguration": {
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "countryCode": "US"
  },
  "proxyCountryCode": "US",
  "proxyUrl": "http://user:pass@proxy.example.com:8080"
}
```

## Output

```json
{
  "searchType": {
    "label": "Search Type",
    "format": "string"
  },
  "type": {
    "label": "Result Type",
    "format": "string"
  },
  "query": {
    "label": "Query",
    "format": "string"
  },
  "username": {
    "label": "Username",
    "format": "string"
  },
  "data": {
    "label": "Data",
    "format": "object"
  }
}
```

## About this Actor

This example demonstrates how to use [X (Twitter) Advanced Search Tweet Scraper 𝕏](https://apify.com/mikolabs/x-twitter-advanced-search-tweet-scraper) with a specific input configuration. Visit the [Actor detail page](https://apify.com/mikolabs/x-twitter-advanced-search-tweet-scraper) to learn more, explore other use cases, and run it yourself.