# X (Twitter) Profile Tweets Scraper (`automly/x-twitter-profile-tweets-scraper`) Actor

Scrape tweets from any public X (Twitter) profile: text, views, likes, reposts, replies, quotes, media, links and dates, plus the profile's followers and bio. Date filters and a real-time API. No login.

- **URL**: https://apify.com/automly/x-twitter-profile-tweets-scraper.md
- **Developed by:** [Automly](https://apify.com/automly) (community)
- **Categories:** Social media
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.25 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

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 examples already wired to this Actor's own input schema, see the [API](#api) section below.

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`).

# README

## X (Twitter) Profile Tweets Scraper

### What is X (Twitter) Profile Tweets Scraper?

**X (Twitter) Profile Tweets Scraper** is a tool that lets you **scrape tweets from any public X (Twitter) profile**: tweet text, views, likes, reposts, replies, quotes, bookmarks, photos and videos, links, hashtags and publish date, plus the account's followers, bio and checkmark. Paste usernames, click **Start**, and download the tweets as Excel, CSV or JSON.

- ⚡ **Speed:** about 4,700 tweets per minute (2,800 rows from 6 accounts in 36 seconds in our test)
- 📅 **Date filters:** get only tweets from the dates you choose
- 👤 **Profile info included:** followers, following, tweet count, bio, website and checkmark type in the same run
- 🔓 **No login:** no X account, cookies or API key needed

### What can X (Twitter) Profile Tweets Scraper do?

- Scrape the **latest tweets** of any public X account, newest first
- Get **views, likes, reposts, replies, quotes and bookmarks** for every tweet
- Download **photo and video links** (best-quality MP4) from tweets
- Get the **original tweet** behind every repost and every quoted tweet
- Keep only tweets **posted between two dates**
- Leave out **reposts** or the **pinned tweet** when you only want original tweets
- Scrape **many profiles in one run**, each with its **profile info**
- Get results in seconds over the **real-time API**, without starting a run
- Export to Excel, CSV, JSON, HTML or XML, or send them to Google Sheets, Make, Zapier and more

### What data can you extract from X (Twitter) profiles?

| | | |
|---|---|---|
| 📝 Tweet text (full, links expanded) | 👁️ Views | ❤️ Likes |
| 🔁 Reposts | 💬 Replies | 🗨️ Quotes |
| 🔖 Bookmarks | 📅 Publish date and time | 📌 Pinned tweet |
| 🖼️ Photos and videos | #️⃣ Hashtags and mentions | 🔗 Links |
| ↪️ Original tweet of a repost | 💭 Quoted tweet | 📣 Community Note |
| 👤 Username and display name | 👥 Followers and following | ✅ Checkmark type |

### How to scrape tweets from an X (Twitter) profile

1. [Create a free Apify account](https://console.apify.com/sign-up) (no credit card needed).
2. Open **X (Twitter) Profile Tweets Scraper**.
3. Add one or more **usernames or profile links**, like `NASA` or `https://x.com/NASA`.
4. Choose how many **tweets per profile** you want and, if you like, a date range. Click **Start**.
5. When the run finishes, download your tweets as Excel, CSV, JSON, HTML or XML.

### ⬇️ Input

Profiles can be a username (`NASA`), `@NASA`, or a link (`https://x.com/NASA` or `https://twitter.com/NASA`).

| Setting | What it does |
|---|---|
| Profiles | The X accounts to scrape |
| Tweets per profile | How many of each account's latest tweets to get (default 50, up to 1,000). Set 0 for profile info only |
| Tweets posted after / before | Only tweets from this date range |
| Include reposts | Also get the posts the account reposted (on by default) |
| Include pinned tweet | Include the tweet pinned to the top of the profile (on by default) |
| Include profile info | Add one row per account with its profile (on by default) |

Example: the latest 200 tweets from two accounts.

```json
{
  "profiles": ["NASA", "https://x.com/SpaceX"],
  "tweetsPerProfile": 200
}
```

Example: original tweets from August 2026 only, without reposts.

```json
{
  "profiles": ["BBCBreaking"],
  "tweetsPerProfile": 1000,
  "postedAfter": "2026-08-01",
  "postedBefore": "2026-09-01",
  "includeRetweets": false
}
```

### ⬆️ Output

You get one row per tweet (`type` is `tweet`) and one row per account (`type` is `profile`). The **Tweets** and **Profiles** tabs in Apify Console show each kind as its own table. A real tweet row:

```json
{
  "type": "tweet",
  "id": "2100334792646549729",
  "url": "https://x.com/SpaceX/status/2100334792646549729",
  "text": "A fully and rapidly reusable rocket will fundamentally change how humanity accesses outer space. “The Holy Grail of Rocketry” continues the ongoing Starship series ...",
  "createdAt": "2026-09-16T21:23:31Z",
  "lang": "en",
  "authorUsername": "SpaceX",
  "authorName": "SpaceX",
  "authorFollowers": 41903864,
  "views": 8092048,
  "likes": 23423,
  "retweets": 4207,
  "replies": 1112,
  "quotes": 914,
  "bookmarks": 7350,
  "isRetweet": false,
  "isPinned": true,
  "media": [
    {
      "type": "video",
      "url": "https://pbs.twimg.com/amplify_video_thumb/2100330249003089920/img/vlDpAQ6CWxoppsYb.jpg",
      "videoUrl": "https://video.twimg.com/amplify_video/2100330249003089920/vid/avc1/3840x2160/pNR-omLIRUcUr71-.mp4?tag=29",
      "durationMs": 1709290
    }
  ],
  "feed": "latest",
  "fetchedAt": "2026-09-25T00:49:09Z"
}
```

A profile row has `username`, `name`, `description`, `location`, `website`, `createdAt` (when the account was made), `followers`, `following`, `tweets`, `mediaCount`, `isBlueVerified`, `verifiedType`, `profileImageUrl` and `bannerUrl`. Each run also saves a short report listing any account it could not scrape and why (for example, a suspended or mistyped username).

### How can I use X (Twitter) profile data?

- **Competitor monitoring:** see what competitors post and which tweets get the most views and likes
- **Influencer research:** check an account's real engagement before you work with it
- **Brand and news tracking:** collect every tweet from official accounts, newsrooms or public figures
- **Content analysis and AI:** build tweet datasets for sentiment, topic or trend analysis
- **Archiving:** keep a copy of an account's tweets with their media links

### How to track new tweets from an account

1. Set **Tweets posted after** to the date of your last run (or leave **Tweets per profile** small, like 20).
2. [Schedule the actor](https://docs.apify.com/platform/schedules) to run every hour or every day.
3. Send the new tweets to Slack, email or a spreadsheet with an [integration](https://apify.com/integrations).

### Real-time X (Twitter) profile API

Need tweets right away inside your app? Call the actor's API and get the rows back in the response, without starting a run:

```
GET https://<your-actor-standby-url>/profile?username=NASA&tweets=20
Authorization: Bearer <YOUR_APIFY_TOKEN>
```

You can also run the actor from your own code with the [Apify API](https://docs.apify.com/api/v2) or the Python and JavaScript clients:

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("automly/x-twitter-profile-tweets-scraper").call(run_input={
    "profiles": ["NASA"],
    "tweetsPerProfile": 100,
})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    if row["type"] == "tweet":
        print(row["createdAt"], row["views"], row["text"][:80])
```

### ❓FAQ

#### How much does it cost to scrape X (Twitter) profiles?

You pay only for the results you get, per 1,000 rows. See the **Pricing** tab for the current price. Every Apify account gets $5 of free usage each month, so you can try it at no cost.

#### How many tweets can I get from one account?

Up to about the latest 800 tweets of an account, which is what X shows to visitors who are not logged in. Most accounts reach back several months to a year. The profile row's `tweets` field shows the account's full tweet count.

#### Why do some accounts return older tweets marked "mostLiked"?

For some very popular accounts (for example elonmusk, nytimes or Reuters), X shows logged-out visitors only their 5 newest tweets plus their most-liked tweets of all time. For those accounts you get the newest tweets first (`feed` is `latest`), then up to 100 most-liked tweets (`feed` is `mostLiked`).

#### Does it include replies?

It includes tweets, reposts and quote tweets, as shown on the profile. Replies the account wrote to other people's tweets are not included.

#### Do I need an X account?

No. You don't need an X account, cookies or an API key.

#### Can I scrape protected (private) accounts?

No. Only public tweets can be scraped; a protected account's tweets are skipped. Suspended or mistyped usernames are listed in the run report.

#### Is it legal to scrape X (Twitter)?

This scraper only collects tweets and profile information that people chose to make public. It does not collect private data such as email addresses or phone numbers. Tweets can still contain personal data, which may be protected by laws such as GDPR, so only scrape it for a legitimate reason and ask a lawyer if you are unsure. You can read more in [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/)

X (Twitter) Profile Tweets Scraper is an independent tool. It is not affiliated with, endorsed by or sponsored by X Corp.

#### Something isn't working. What should I do?

Open the **Issues** tab and tell us the username and what you expected. We usually reply within a day.

### Scrape more X (Twitter) data

| Actor | What it does |
|---|---|
| [X (Twitter) Tweet Scraper](https://apify.com/automly/x-twitter-tweet-scraper) | Full details of any tweets by URL or ID |
| [X (Twitter) User Profile Scraper](https://apify.com/automly/x-twitter-user-profile-scraper) | Profile info for thousands of accounts at once |

# Actor input Schema

## `profiles` (type: `array`):

X usernames or profile URLs, e.g. NASA, @NASA or https://x.com/NASA.

## `tweetsPerProfile` (type: `integer`):

How many of each account's latest tweets to scrape (after the filters below). Set 0 to get the profile info only.

## `postedAfter` (type: `string`):

Only tweets posted on or after this date, e.g. 2026-08-01 (UTC if no offset).

## `postedBefore` (type: `string`):

Only tweets posted before this date, e.g. 2026-09-01 (UTC if no offset).

## `includeRetweets` (type: `boolean`):

Include posts the account reposted (retweets). Each has the original post attached.

## `includePinned` (type: `boolean`):

Include the tweet pinned to the top of the profile.

## `includeProfileInfo` (type: `boolean`):

Add one row per account with its profile: bio, followers, following, tweet count, checkmark and more.

## `proxyConfiguration` (type: `object`):

Proxy settings. The default works for most runs.

## Actor input object example

```json
{
  "profiles": [
    "NASA"
  ],
  "tweetsPerProfile": 50,
  "includeRetweets": true,
  "includePinned": true,
  "includeProfileInfo": true,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `tweets` (type: `string`):

No description

## `profiles` (type: `string`):

No description

## `results` (type: `string`):

No description

## `report` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "profiles": [
        "NASA"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("automly/x-twitter-profile-tweets-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "profiles": ["NASA"],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("automly/x-twitter-profile-tweets-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "profiles": [
    "NASA"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call automly/x-twitter-profile-tweets-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,automly/x-twitter-profile-tweets-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/n2suoNNbuoEZiagd7/builds/8oyCvtTqqdcHabP2n/openapi.json
