# Twitter scraper: recent tweets from profiles

**Use case:** 

Collect recent tweets from X (Twitter) profiles by username or URL. Returns tweet text and URL, date, retweets, likes, replies, views, retweet and reply flags, media, and the profile's followers and following. Add any usernames to the list.

## Input

```json
{
  "usernames": [
    "nasa",
    "https://x.com/SpaceX"
  ],
  "count": 20,
  "includeReplies": false,
  "includeRetweets": true,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  },
  "batchSize": 10,
  "delayBetweenRequests": 1
}
```

## Output

```json
{
  "username": {
    "label": "Username",
    "format": "text"
  },
  "profile_url": {
    "label": "Profile URL",
    "format": "link"
  },
  "tweet_url": {
    "label": "Tweet URL",
    "format": "link"
  },
  "text": {
    "label": "Tweet",
    "format": "text"
  },
  "created_at": {
    "label": "Date",
    "format": "date"
  },
  "id": {
    "label": "Tweet ID",
    "format": "text"
  },
  "retweet_count": {
    "label": "Retweets",
    "format": "number"
  },
  "favorite_count": {
    "label": "Likes",
    "format": "number"
  },
  "reply_count": {
    "label": "Replies",
    "format": "number"
  },
  "view_count": {
    "label": "Views",
    "format": "number"
  },
  "is_retweet": {
    "label": "Is Retweet",
    "format": "boolean"
  },
  "is_reply": {
    "label": "Is Reply",
    "format": "boolean"
  },
  "user.screen_name": {
    "label": "User Handle",
    "format": "text"
  },
  "user.name": {
    "label": "User Name",
    "format": "text"
  },
  "user.verified": {
    "label": "Verified",
    "format": "boolean"
  },
  "user.followers_count": {
    "label": "Followers",
    "format": "number"
  },
  "user.following_count": {
    "label": "Following",
    "format": "number"
  },
  "media": {
    "label": "Media",
    "format": "array"
  }
}
```

## About this Actor

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


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/logical_scrapers/x-twitter-user-profile-tweets-scraper.md

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).
