# X (Twitter) Scraper

**Use case:** 

Collects tweets about the any query, including retweets and profile info. Returns structured data for analysis and insights on any-related discussions.

## Input

```json
{
  "searchType": "tweets",
  "twitterHandles": [],
  "searchTerms": [
    "ocean"
  ],
  "tweetUrls": [],
  "listUrls": [],
  "includeReplies": false,
  "includeRetweets": true,
  "mediaOnly": false,
  "maxItems": 20,
  "maxPages": 2,
  "startDate": "",
  "endDate": "",
  "location": "",
  "onlyImages": false,
  "onlyVideos": false,
  "onlyVerified": false,
  "onlyQuotes": false,
  "includeNativeRetweets": true,
  "includeLinks": false,
  "latestTweets": false,
  "safeSearch": false,
  "tweetLanguage": "",
  "scrapeProfileInfo": true,
  "useResidentialProxy": true,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  },
  "maxRetries": 5
}
```

## Output

```json
{
  "type": {
    "label": "Type",
    "format": "text"
  },
  "username": {
    "label": "Username",
    "format": "text"
  },
  "profile_username": {
    "label": "Profile Username",
    "format": "text"
  },
  "fullname": {
    "label": "Full Name",
    "format": "text"
  },
  "tweet_url": {
    "label": "Tweet URL",
    "format": "link"
  },
  "text": {
    "label": "Content",
    "format": "text"
  },
  "author": {
    "label": "Author",
    "format": "object"
  },
  "date": {
    "label": "Date",
    "format": "text"
  },
  "stats": {
    "label": "Stats",
    "format": "object"
  },
  "media": {
    "label": "Media",
    "format": "array"
  },
  "search_query": {
    "label": "Search Query",
    "format": "text"
  },
  "list_url": {
    "label": "List URL",
    "format": "link"
  },
  "scrape_date": {
    "label": "Scraped At",
    "format": "date"
  }
}
```

## About this Actor

This example demonstrates how to use [🌸 Tweets / X - Scraper](https://apify.com/mikolabs/x-scraper) with a specific input configuration. Visit the [Actor detail page](https://apify.com/mikolabs/x-scraper) to learn more, explore other use cases, and run it yourself.