# Twitter (X) Scraper: Profiles, Posts & Trends (`scrapingmonkey/twitter-x-scraper`) Actor

Scrape public Twitter (X) profiles, posts, timelines, Highlights, trends, communities, videos, Articles, Spaces and broadcasts without login. Batch targets, monitor changes and export consistent 60-field records.

- **URL**: https://apify.com/scrapingmonkey/twitter-x-scraper.md
- **Developed by:** [ScrapingMonkey](https://apify.com/scrapingmonkey) (community)
- **Categories:** Automation, News, Social media
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 profile results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Twitter (X) Scraper - Profiles, Posts, Trends, Communities and Rich Content

Extract public Twitter (X) profiles, posts, timelines, highlights, trends, communities, videos, Articles, Spaces, broadcasts and market cards into one analysis-ready dataset without supplying an X account, cookies or API key.

- Collect profile identity, biography, verification, audience and activity counters
- Extract post text, author, engagement, media variants, links, mentions and hashtags
- Read ranked user timelines, recent posts, Highlights, visible thread previews and reply ancestor chains
- Discover worldwide or local trends using 467 public WOEID locations
- Extract community metadata, rules, members, posts and media
- Collect the public video/live feed, X Articles, Spaces, broadcasts and stock or crypto cards
- Monitor profile posts, community posts or trends and pay only for emitted new or changed records
- Export the complete 60-field result rows to JSON, CSV, Excel, XML or access them through the Apify API

The Actor uses Apify Residential Proxy automatically for every request. There is no proxy field to configure and no direct-to-X release traffic.

### What can you do with this Actor?

| Mode | Input | Output | Best for |
| --- | --- | --- | --- |
| `profile` | Handles or profile URLs | Complete public profiles | Influencer and account research |
| `tweet` | Post IDs or URLs | One complete post per target | Post verification and enrichment |
| `userTimeline` | Handles or profile URLs | Ranked public timeline posts | Content and engagement research |
| `userRecent` | Handles or profile URLs | Recent logged-out profile posts | Fast recent-content checks |
| `highlights` | Handles or profile URLs | Paginated highlighted posts | Best-content discovery |
| `threadPreview` | Post IDs or URLs | Focal post and visible replies | Public conversation context |
| `replyAncestors` | Reply post IDs or URLs | Reply and its parent chain | Reconstructing conversation context |
| `trends` | One or more WOEIDs | Ranked trend names, queries and volume | Regional trend tracking |
| `trendLocations` | No target | Supported places and WOEIDs | Building location selectors |
| `trendingPosts` | No target | Global trending posts | Broad content discovery |
| `trendPosts` | Trend names or hashtags | Posts returned for each current trend | Trend content analysis |
| `community` | Community IDs or URLs | Metadata, rules, creator and embedded feeds | Community research |
| `communityPosts` | Community IDs or URLs | Public community posts | Niche audience research |
| `communityMembers` | Community IDs or URLs | Visible community members | Public member discovery |
| `communityMedia` | Community IDs or URLs | Community posts containing media | Creative research |
| `videoFeed` | No target | Global video and live-feed posts | Video discovery |
| `asset` | Symbols such as `TSLA` or `$BTC` | Public X market cards | Lightweight market context |
| `article` | Article post IDs or URLs | Full X Article structure and plain text | Long-form content archiving |
| `space` | Space IDs or URLs | Public Space metadata and participants | Audio event research |
| `broadcast` | Broadcast IDs or URLs | Public broadcast metadata and audience counters | Live-video research |
| `monitorProfile` | Handles or profile URLs | New or changed timeline posts | Scheduled account monitoring |
| `monitorTrends` | WOEIDs | New or changed ranked trends | Scheduled regional trend monitoring |
| `monitorCommunity` | Community IDs or URLs | New or changed community posts | Scheduled niche monitoring |

One mode runs at a time. Add multiple values to `targets` or `woeids` to batch independent sources; `maxConcurrency` processes them in parallel.

### Quick start

1. Open the Actor and click **Try for free**.
2. Keep the default `profile` mode and `NASA` target.
3. Leave `maxItems` at 50; profile mode emits one row per target.
4. Click **Start**.
5. Open **Results** to preview all 60 fields or download the dataset.

The default input is deliberately small and valid:

```json
{
  "mode": "profile",
  "targets": ["NASA"],
  "maxItems": 50
}
```

### Input examples for every mode

Each line below is a complete valid Actor input. Replace the public examples with your own targets.

| Mode | Valid JSON input |
| --- | --- |
| Profile | `{"mode":"profile","targets":["NASA","https://x.com/SpaceX"]}` |
| Post | `{"mode":"tweet","targets":["2086853708533440600"]}` |
| User timeline | `{"mode":"userTimeline","targets":["NASA"],"maxItems":20}` |
| Recent posts | `{"mode":"userRecent","targets":["NASA"],"maxItems":5}` |
| Highlights | `{"mode":"highlights","targets":["elonmusk"],"maxItems":50}` |
| Thread preview | `{"mode":"threadPreview","targets":["2082849031483470066"],"maxItems":20}` |
| Reply ancestors | `{"mode":"replyAncestors","targets":["2082849031483470066"],"maxItems":20}` |
| Trends | `{"mode":"trends","woeids":["1","23424977"],"maxItems":50}` |
| Trend locations | `{"mode":"trendLocations","maxItems":500}` |
| Trending posts | `{"mode":"trendingPosts","trendWindow":"Day","maxItems":20}` |
| Trend posts | `{"mode":"trendPosts","targets":["NASA"],"trendWindow":"Week","maxItems":20}` |
| Community | `{"mode":"community","targets":["1493446837214187523"]}` |
| Community posts | `{"mode":"communityPosts","targets":["1493446837214187523"],"maxItems":20}` |
| Community members | `{"mode":"communityMembers","targets":["1493446837214187523"],"maxItems":15}` |
| Community media | `{"mode":"communityMedia","targets":["1493446837214187523"],"maxItems":30}` |
| Video feed | `{"mode":"videoFeed","maxItems":20}` |
| Market asset | `{"mode":"asset","targets":["TSLA","BTC"],"assetTimeframe":"1D","assetCandleSize":"1h"}` |
| Article | `{"mode":"article","targets":["2066523671456579828"]}` |
| Space | `{"mode":"space","targets":["1OdKrOOnlQvGX"]}` |
| Broadcast | `{"mode":"broadcast","targets":["1OGwbbXdjjdKB"]}` |
| Monitor profile | `{"mode":"monitorProfile","targets":["NASA"],"monitorKey":"nasa-daily","monitorBehavior":"newAndChanged"}` |
| Monitor trends | `{"mode":"monitorTrends","woeids":["1"],"monitorKey":"worldwide-hourly","monitorBehavior":"newAndChanged"}` |
| Monitor community | `{"mode":"monitorCommunity","targets":["1493446837214187523"],"monitorKey":"community-daily","monitorBehavior":"newOnly"}` |

`maxItems` is applied per target or WOEID. `maxTotalItems` is an optional second cap applied after all sources are combined. A value of `0` removes the Actor-side cap, but X still controls how many public items each surface exposes.

### Complete output examples

Every record has the same complete 60-field top-level envelope. Unused fields remain present as `null` or `[]`, so CSV exports and the single Results view stay predictable. `includeRaw: true` populates `raw` and the raw members of normalized nested objects; raw X payload keys are source-controlled and can change independently of this stable envelope.

#### Complete profile row - 60 top-level fields

```json
{
  "recordType": "profile",
  "resultType": "profile",
  "id": "11348282",
  "url": "https://x.com/NASA",
  "sourceMode": "profile",
  "sourceOperation": "UserByScreenName",
  "sourceTarget": "NASA",
  "sourceSurface": "graphql",
  "position": null,
  "name": "NASA",
  "username": "NASA",
  "text": null,
  "description": "Explore the universe and discover our home planet.",
  "language": null,
  "createdAt": "2007-12-19T20:20:32+00:00",
  "observedAt": "2026-08-11T08:00:00+00:00",
  "verified": true,
  "blueVerified": true,
  "protected": false,
  "followers": 80000000,
  "following": 100,
  "postsCount": 70000,
  "likesGiven": 4000,
  "highlightsCount": 50,
  "location": "Pale Blue Dot",
  "website": "https://www.nasa.gov/",
  "avatarUrl": "https://pbs.twimg.com/profile_images/nasa.jpg",
  "bannerUrl": "https://pbs.twimg.com/profile_banners/nasa.jpg",
  "likes": null,
  "replies": null,
  "retweets": null,
  "quotes": null,
  "bookmarks": null,
  "views": null,
  "conversationId": null,
  "replyToId": null,
  "isReply": null,
  "isQuote": null,
  "isRetweet": null,
  "isNoteTweet": null,
  "possiblySensitive": false,
  "mediaType": null,
  "mediaUrls": [],
  "hashtags": [],
  "mentions": [],
  "links": [],
  "author": null,
  "profile": {
    "id": "11348282",
    "screenName": "NASA",
    "name": "NASA",
    "description": "Explore the universe and discover our home planet.",
    "location": "Pale Blue Dot",
    "createdAt": "2007-12-19T20:20:32+00:00",
    "followersCount": 80000000,
    "followingCount": 100,
    "tweetCount": 70000,
    "avatarUrl": "https://pbs.twimg.com/profile_images/nasa.jpg",
    "bannerUrl": "https://pbs.twimg.com/profile_banners/nasa.jpg",
    "website": {"url":"https://t.co/nasa","expandedUrl":"https://www.nasa.gov/","displayUrl":"nasa.gov"},
    "isVerified": true,
    "isBlueVerified": true,
    "isProtected": false,
    "possiblySensitive": false,
    "profileUrl": "https://x.com/NASA",
    "likesGiven": 4000,
    "pinnedTweetId": "2086853708533440600",
    "professionalType": "Government",
    "highlightsCount": 50
  },
  "post": null,
  "trend": null,
  "place": null,
  "community": null,
  "article": null,
  "space": null,
  "broadcast": null,
  "asset": null,
  "monitorStatus": null,
  "changedFields": [],
  "rateLimit": {"limit": 50, "remaining": 49, "resetAt": 1786436100},
  "raw": null
}
```

#### Complete post row - 60 top-level fields

```json
{
  "recordType": "post",
  "resultType": "tweet",
  "id": "2086853708533440600",
  "url": "https://x.com/NASA/status/2086853708533440600",
  "sourceMode": "tweet",
  "sourceOperation": "TweetResultByRestId",
  "sourceTarget": "2086853708533440600",
  "sourceSurface": "graphql",
  "position": 1,
  "name": "NASA",
  "username": "NASA",
  "text": "A new view of our universe.",
  "description": null,
  "language": "en",
  "createdAt": "2026-08-01T12:00:00+00:00",
  "observedAt": "2026-08-11T08:00:00+00:00",
  "verified": true,
  "blueVerified": true,
  "protected": false,
  "followers": 80000000,
  "following": 100,
  "postsCount": 70000,
  "likesGiven": 4000,
  "highlightsCount": 50,
  "location": "Pale Blue Dot",
  "website": "https://www.nasa.gov/",
  "avatarUrl": "https://pbs.twimg.com/profile_images/nasa.jpg",
  "bannerUrl": "https://pbs.twimg.com/profile_banners/nasa.jpg",
  "likes": 12500,
  "replies": 420,
  "retweets": 2100,
  "quotes": 180,
  "bookmarks": 900,
  "views": 1500000,
  "conversationId": "2086853708533440600",
  "replyToId": null,
  "isReply": false,
  "isQuote": false,
  "isRetweet": false,
  "isNoteTweet": false,
  "possiblySensitive": false,
  "mediaType": "photo",
  "mediaUrls": ["https://pbs.twimg.com/media/space.jpg"],
  "hashtags": ["NASA", "Space"],
  "mentions": ["Space_Station"],
  "links": ["https://www.nasa.gov/mission"],
  "author": {
    "id":"11348282","screenName":"NASA","name":"NASA","description":"Explore the universe.","location":"Pale Blue Dot","createdAt":"2007-12-19T20:20:32+00:00","followersCount":80000000,"followingCount":100,"tweetCount":70000,"avatarUrl":"https://pbs.twimg.com/profile_images/nasa.jpg","bannerUrl":"https://pbs.twimg.com/profile_banners/nasa.jpg","website":{"url":"https://t.co/nasa","expandedUrl":"https://www.nasa.gov/","displayUrl":"nasa.gov"},"isVerified":true,"isBlueVerified":true,"isProtected":false,"possiblySensitive":false,"profileUrl":"https://x.com/NASA","likesGiven":4000,"pinnedTweetId":"2086853708533440600","professionalType":"Government","highlightsCount":50
  },
  "profile": null,
  "post": {
    "id": "2086853708533440600",
    "text": "A new view of our universe.",
    "createdAt": "2026-08-01T12:00:00+00:00",
    "author": {"id":"11348282","screenName":"NASA","name":"NASA","description":"Explore the universe.","location":"Pale Blue Dot","createdAt":"2007-12-19T20:20:32+00:00","followersCount":80000000,"followingCount":100,"tweetCount":70000,"avatarUrl":"https://pbs.twimg.com/profile_images/nasa.jpg","bannerUrl":"https://pbs.twimg.com/profile_banners/nasa.jpg","website":{"url":"https://t.co/nasa","expandedUrl":"https://www.nasa.gov/","displayUrl":"nasa.gov"},"isVerified":true,"isBlueVerified":true,"isProtected":false,"possiblySensitive":false,"profileUrl":"https://x.com/NASA","likesGiven":4000,"pinnedTweetId":"2086853708533440600","professionalType":"Government","highlightsCount":50},
    "metrics": {"likes":12500,"replies":420,"retweets":2100,"quotes":180,"bookmarks":900,"views":1500000},
    "media": [{"id":"media-1","kind":"photo","url":"https://pbs.twimg.com/media/space.jpg","previewUrl":"https://t.co/media","expandedUrl":"https://x.com/NASA/status/2086853708533440600/photo/1","altText":"A galaxy","width":2048,"height":1365,"durationMs":null,"variants":[]}],
    "links": [{"url":"https://t.co/mission","expandedUrl":"https://www.nasa.gov/mission","displayUrl":"nasa.gov/mission"}],
    "mentions": [{"id":"1342760608","screenName":"Space_Station"}],
    "hashtags": ["NASA", "Space"],
    "language": "en",
    "replyToId": null,
    "conversationId": "2086853708533440600",
    "quoted": null,
    "retweeted": null,
    "isNoteTweet": false,
    "possiblySensitive": false,
    "source": "X Web App"
  },
  "trend": null,
  "place": null,
  "community": null,
  "article": null,
  "space": null,
  "broadcast": null,
  "asset": null,
  "monitorStatus": null,
  "changedFields": [],
  "rateLimit": {"limit": 50, "remaining": 48, "resetAt": 1786436100},
  "raw": null
}
```

The same complete post shape is used by timelines, Highlights, thread previews, reply ancestors, trend posts, community posts, community media and the video feed. Their `resultType`, `sourceMode`, `sourceOperation`, `sourceTarget` and `sourceSurface` values identify the exact workflow. Monitor modes additionally set `monitorStatus` to `new` or `changed` and populate `changedFields`.

#### Complete trend row - 60 top-level fields

```json
{
  "recordType":"trend","resultType":"trend","id":"1:1:%23NASA","url":"https://x.com/search?q=%23NASA","sourceMode":"trends","sourceOperation":"TrendsPlace","sourceTarget":"1","sourceSurface":"rest","position":1,
  "name":"#NASA","username":null,"text":"%23NASA","description":null,"language":null,"createdAt":null,"observedAt":"2026-08-11T08:00:00+00:00","verified":null,"blueVerified":null,"protected":null,
  "followers":null,"following":null,"postsCount":null,"likesGiven":null,"highlightsCount":null,"location":null,"website":null,"avatarUrl":null,"bannerUrl":null,
  "likes":null,"replies":null,"retweets":null,"quotes":null,"bookmarks":null,"views":null,"conversationId":null,"replyToId":null,"isReply":null,"isQuote":null,"isRetweet":null,"isNoteTweet":null,"possiblySensitive":null,"mediaType":null,
  "mediaUrls":[],"hashtags":[],"mentions":[],"links":[],"author":null,"profile":null,"post":null,
  "trend":{"name":"#NASA","query":"%23NASA","url":"https://x.com/search?q=%23NASA","volume":125000},
  "place":null,"community":null,"article":null,"space":null,"broadcast":null,"asset":null,"monitorStatus":null,"changedFields":[],"rateLimit":{"limit":75,"remaining":74,"resetAt":1786436100},"raw":null
}
```

#### Complete trend-location row - 60 top-level fields

```json
{
  "recordType":"place","resultType":"trendLocation","id":"23424977","url":null,"sourceMode":"trendLocations","sourceOperation":"TrendsAvailable","sourceTarget":"worldwide","sourceSurface":"rest","position":1,
  "name":"United States","username":null,"text":null,"description":"United States","language":null,"createdAt":null,"observedAt":"2026-08-11T08:00:00+00:00","verified":null,"blueVerified":null,"protected":null,
  "followers":null,"following":null,"postsCount":null,"likesGiven":null,"highlightsCount":null,"location":null,"website":null,"avatarUrl":null,"bannerUrl":null,
  "likes":null,"replies":null,"retweets":null,"quotes":null,"bookmarks":null,"views":null,"conversationId":null,"replyToId":null,"isReply":null,"isQuote":null,"isRetweet":null,"isNoteTweet":null,"possiblySensitive":null,"mediaType":null,
  "mediaUrls":[],"hashtags":[],"mentions":[],"links":[],"author":null,"profile":null,"post":null,"trend":null,
  "place":{"name":"United States","woeid":23424977,"country":"United States","kind":"Country"},
  "community":null,"article":null,"space":null,"broadcast":null,"asset":null,"monitorStatus":null,"changedFields":[],"rateLimit":{"limit":75,"remaining":73,"resetAt":1786436100},"raw":null
}
```

#### Complete community row - 60 top-level fields

```json
{
  "recordType":"community","resultType":"community","id":"1493446837214187523","url":"https://x.com/i/communities/1493446837214187523","sourceMode":"community","sourceOperation":"CommunitySSR","sourceTarget":"1493446837214187523","sourceSurface":"ssr","position":null,
  "name":"Space Community","username":null,"text":null,"description":"Public discussion about spaceflight.","language":null,"createdAt":"2022-02-15T12:00:00+00:00","observedAt":"2026-08-11T08:00:00+00:00","verified":null,"blueVerified":null,"protected":null,
  "followers":null,"following":null,"postsCount":null,"likesGiven":null,"highlightsCount":null,"location":null,"website":null,"avatarUrl":null,"bannerUrl":"https://pbs.twimg.com/community_banner.jpg",
  "likes":null,"replies":null,"retweets":null,"quotes":null,"bookmarks":null,"views":null,"conversationId":null,"replyToId":null,"isReply":null,"isQuote":null,"isRetweet":null,"isNoteTweet":null,"possiblySensitive":false,"mediaType":null,
  "mediaUrls":[],"hashtags":[],"mentions":[],"links":[],"author":null,"profile":null,"post":null,"trend":null,"place":null,
  "community":{
    "id":"1493446837214187523",
    "name":"Space Community",
    "description":"Public discussion about spaceflight.",
    "memberCount":250000,
    "createdAt":"2022-02-15T12:00:00+00:00",
    "topic":"Science",
    "joinPolicy":"Open",
    "isNsfw":false,
    "creator":{"id":"11348282","screenName":"NASA","name":"NASA","description":"Explore the universe.","location":"Pale Blue Dot","createdAt":"2007-12-19T20:20:32+00:00","followersCount":80000000,"followingCount":100,"tweetCount":70000,"avatarUrl":"https://pbs.twimg.com/profile_images/nasa.jpg","bannerUrl":"https://pbs.twimg.com/profile_banners/nasa.jpg","website":{"url":"https://t.co/nasa","expandedUrl":"https://www.nasa.gov/","displayUrl":"nasa.gov"},"isVerified":true,"isBlueVerified":true,"isProtected":false,"possiblySensitive":false,"profileUrl":"https://x.com/NASA","likesGiven":4000,"pinnedTweetId":"2086853708533440600","professionalType":"Government","highlightsCount":50},
    "rules":[{"id":"1","name":"Be respectful","description":"Keep discussions constructive."}],
    "bannerUrl":"https://pbs.twimg.com/community_banner.jpg",
    "members":[{"id":"44196397","screenName":"elonmusk","name":"Elon Musk","description":"","location":"","createdAt":"2009-06-02T20:12:29+00:00","followersCount":200000000,"followingCount":800,"tweetCount":60000,"avatarUrl":"https://pbs.twimg.com/elon.jpg","bannerUrl":"https://pbs.twimg.com/elon-banner.jpg","website":null,"isVerified":true,"isBlueVerified":true,"isProtected":false,"possiblySensitive":false,"profileUrl":"https://x.com/elonmusk","likesGiven":30000,"pinnedTweetId":null,"professionalType":null,"highlightsCount":100}],
    "timeline":{"tweets":[],"users":[],"top":null,"bottom":null,"terminated":true},
    "ranked":{"tweets":[],"users":[],"top":null,"bottom":{"value":"cursor-value","kind":"Bottom"},"terminated":false}
  },
  "article":null,"space":null,"broadcast":null,"asset":null,"monitorStatus":null,"changedFields":[],"rateLimit":null,"raw":null
}
```

#### Complete X Article row - 60 top-level fields

```json
{
  "recordType":"article","resultType":"article","id":"2066523671456579828","url":"https://x.com/i/status/2066523671456579828","sourceMode":"article","sourceOperation":"ArticleByTweetId","sourceTarget":"2066523671456579828","sourceSurface":"graphql","position":null,
  "name":"Working Back from the Future","username":null,"text":"By @author\n\nLong-form article text.","description":"Long-form article text.","language":null,"createdAt":"2026-08-06T02:28:20+00:00","observedAt":"2026-08-11T08:00:00+00:00","verified":null,"blueVerified":null,"protected":null,
  "followers":null,"following":null,"postsCount":null,"likesGiven":null,"highlightsCount":null,"location":null,"website":null,"avatarUrl":null,"bannerUrl":null,
  "likes":null,"replies":null,"retweets":null,"quotes":null,"bookmarks":null,"views":null,"conversationId":null,"replyToId":null,"isReply":null,"isQuote":null,"isRetweet":null,"isNoteTweet":null,"possiblySensitive":null,"mediaType":null,
  "mediaUrls":[],"hashtags":[],"mentions":[],"links":[],"author":null,"profile":null,"post":null,"trend":null,"place":null,"community":null,
  "article":{
    "articleResults":{
      "id":"QXJ0aWNsZUVudGl0eVJlc3VsdHM6MjA2NjUyMzY3MTQ1NjU3OTgyOA==",
      "result":{
        "__typename":"ArticleEntity",
        "contentState":{"blocks":[{"data":{"mentions":[{"fromIndex":3,"text":"author","toIndex":10}]},"entityRanges":[],"inlineStyleRanges":[],"key":"block1","text":"By @author","type":"unstyled"}],"entityMap":{}},
        "coverMediaResults":{"id":"TWVkaWE6Y292ZXI=","result":{"__typename":"ApiMedia"}},
        "id":"QXJ0aWNsZToyMDY2NTIzNjcxNDU2NTc5ODI4",
        "mediaEntities":[],
        "metadata":{"createdAtSecs":1786000000,"firstPublishedAtSecs":1786000100,"modifiedAtSecs":1786000200},
        "plainText":"By @author\n\nLong-form article text.",
        "previewText":"Long-form article text.",
        "title":"Working Back from the Future"
      }
    }
  },
  "space":null,"broadcast":null,"asset":null,"monitorStatus":null,"changedFields":[],"rateLimit":{"limit":50,"remaining":47,"resetAt":1786436100},"raw":null
}
```

#### Complete X Space row - 60 top-level fields

```json
{
  "recordType":"space","resultType":"space","id":"1OdKrOOnlQvGX","url":"https://x.com/i/spaces/1OdKrOOnlQvGX","sourceMode":"space","sourceOperation":"AudioSpaceById","sourceTarget":"1OdKrOOnlQvGX","sourceSurface":"graphql","position":null,
  "name":"Mujeres construyendo CARDANO","username":"LatamCardano","text":null,"description":null,"language":null,"createdAt":"2026-02-21T15:00:09.326000+00:00","observedAt":"2026-08-11T08:00:00+00:00","verified":null,"blueVerified":null,"protected":null,
  "followers":null,"following":null,"postsCount":null,"likesGiven":null,"highlightsCount":null,"location":null,"website":null,"avatarUrl":"https://pbs.twimg.com/profile.jpg","bannerUrl":null,
  "likes":null,"replies":null,"retweets":null,"quotes":null,"bookmarks":null,"views":0,"conversationId":null,"replyToId":null,"isReply":null,"isQuote":null,"isRetweet":null,"isNoteTweet":null,"possiblySensitive":null,"mediaType":null,
  "mediaUrls":[],"hashtags":[],"mentions":[],"links":[],"author":null,"profile":null,"post":null,"trend":null,"place":null,"community":null,"article":null,
  "space":{"id":"QXVkaW9TcGFjZToxT2RLck9PbmxRdkdY","metadata":{"creatorResults":{"id":"VXNlclJlc3VsdHM6MTQ4NDg5MzU4MTg0ODU1MTQyNg==","result":{"__typename":"User","avatar":{"imageUrl":"https://pbs.twimg.com/profile.jpg"},"core":{"name":"LATAM Cardano Community","screenName":"LatamCardano"},"id":"VXNlcjoxNDg0ODkzNTgxODQ4NTUxNDI2","identityProfileLabelsHighlightedLabel":{},"privacy":{"protected":false},"profileImageShape":"Circle","restId":"1484893581848551426","verification":{"isBlueVerified":false}}},"isSpaceAvailableForReplay":true,"narrowCastSpaceType":0,"participants":{"admins":[{"avatarUrl":"https://pbs.twimg.com/profile.jpg","userResults":{"id":"VXNlclJlc3VsdHM6MTQ4NDg5MzU4MTg0ODU1MTQyNg==","result":{"__typename":"User","restId":"1484893581848551426"}}}],"speakers":[],"total":0},"scheduledStart":1771686009326,"state":"Canceled","title":"Mujeres construyendo CARDANO","totalLiveListeners":0},"restId":"1OdKrOOnlQvGX"},
  "broadcast":null,"asset":null,"monitorStatus":null,"changedFields":[],"rateLimit":{"limit":50,"remaining":46,"resetAt":1786436100},"raw":null
}
```

#### Complete X broadcast row - 60 top-level fields

```json
{
  "recordType":"broadcast","resultType":"broadcast","id":"1OGwbbXdjjdKB","url":"https://x.com/i/broadcasts/1OGwbbXdjjdKB","sourceMode":"broadcast","sourceOperation":"BroadcastQuery","sourceTarget":"1OGwbbXdjjdKB","sourceSurface":"graphql","position":null,
  "name":"U.S. Spacewalk 96","username":"NASA","text":null,"description":null,"language":null,"createdAt":"2026-08-06T06:20:36.755000+00:00","observedAt":"2026-08-11T08:00:00+00:00","verified":null,"blueVerified":null,"protected":null,
  "followers":null,"following":null,"postsCount":null,"likesGiven":null,"highlightsCount":null,"location":null,"website":null,"avatarUrl":"https://pbs.twimg.com/nasa.jpg","bannerUrl":null,
  "likes":null,"replies":null,"retweets":null,"quotes":null,"bookmarks":null,"views":282467,"conversationId":null,"replyToId":null,"isReply":null,"isQuote":null,"isRetweet":null,"isNoteTweet":null,"possiblySensitive":null,"mediaType":null,
  "mediaUrls":["https://prod-fastly.video.pscp.tv/thumbnail.jpg"],"hashtags":[],"mentions":[],"links":[],"author":null,"profile":null,"post":null,"trend":null,"place":null,"community":null,"article":null,"space":null,
  "broadcast":{"broadcastId":"1OGwbbXdjjdKB","endTime":1786045331557,"height":2160,"id":"QnJvYWRjYXN0OjFPR3diYlhkampkS0I=","imageUrl":"https://prod-fastly.video.pscp.tv/thumbnail.jpg","mediaKey":"28_2085316525532262400","periscopeUser":{"displayName":"NASA","profileImageUrl":"https://pbs.twimg.com/nasa.jpg","username":"NASA"},"startTime":1786014036755,"state":"Ended","status":"U.S. Spacewalk 96","totalWatched":282467,"totalWatching":215787,"userResults":{"id":"VXNlclJlc3VsdHM6MTEzNDgyODI=","result":{"__typename":"User","avatar":{"imageUrl":"https://pbs.twimg.com/nasa.jpg"},"core":{"name":"NASA","screenName":"NASA"},"id":"VXNlcjoxMTM0ODI4Mg==","identityProfileLabelsHighlightedLabel":{},"privacy":{"protected":false},"profileImageShape":"Square","verification":{"isBlueVerified":true,"verifiedType":"Government"}}},"width":3840},
  "asset":null,"monitorStatus":null,"changedFields":[],"rateLimit":{"limit":50,"remaining":45,"resetAt":1786436100},"raw":null
}
```

#### Complete market-asset row - 60 top-level fields

```json
{
  "recordType":"asset","resultType":"marketAsset","id":"TSLA","url":"https://x.com/search?q=%24TSLA","sourceMode":"asset","sourceOperation":"AssetCard","sourceTarget":"TSLA","sourceSurface":"graphql","position":null,
  "name":"Tesla, Inc.","username":null,"text":null,"description":"NASDAQ","language":null,"createdAt":null,"observedAt":"2026-08-11T08:00:00+00:00","verified":null,"blueVerified":null,"protected":null,
  "followers":null,"following":null,"postsCount":null,"likesGiven":null,"highlightsCount":null,"location":null,"website":null,"avatarUrl":"https://pbs.twimg.com/asset/tsla.png","bannerUrl":null,
  "likes":null,"replies":null,"retweets":null,"quotes":null,"bookmarks":null,"views":null,"conversationId":null,"replyToId":null,"isReply":null,"isQuote":null,"isRetweet":null,"isNoteTweet":null,"possiblySensitive":null,"mediaType":null,
  "mediaUrls":[],"hashtags":[],"mentions":[],"links":[],"author":null,"profile":null,"post":null,"trend":null,"place":null,"community":null,"article":null,"space":null,"broadcast":null,
  "asset":{"symbol":"TSLA","name":"Tesla, Inc.","price":{"amount":320.25,"currency":"USD"},"marketCap":{"amount":1020000000000.0,"currency":"USD"},"change24hPercent":1.75,"exchange":"NASDAQ","logoUrl":"https://pbs.twimg.com/asset/tsla.png"},
  "monitorStatus":null,"changedFields":[],"rateLimit":{"limit":50,"remaining":44,"resetAt":1786436100},"raw":null
}
```

### Complete field inventory

All row types expose exactly these 60 top-level fields:

- Identity and source: `recordType`, `resultType`, `id`, `url`, `sourceMode`, `sourceOperation`, `sourceTarget`, `sourceSurface`, `position`
- Display and time: `name`, `username`, `text`, `description`, `language`, `createdAt`, `observedAt`
- Profile: `verified`, `blueVerified`, `protected`, `followers`, `following`, `postsCount`, `likesGiven`, `highlightsCount`, `location`, `website`, `avatarUrl`, `bannerUrl`
- Engagement and relationships: `likes`, `replies`, `retweets`, `quotes`, `bookmarks`, `views`, `conversationId`, `replyToId`, `isReply`, `isQuote`, `isRetweet`, `isNoteTweet`, `possiblySensitive`
- Discovery and media: `mediaType`, `mediaUrls`, `hashtags`, `mentions`, `links`
- Complete typed records: `author`, `profile`, `post`, `trend`, `place`, `community`, `article`, `space`, `broadcast`, `asset`
- Monitoring and diagnostics: `monitorStatus`, `changedFields`, `rateLimit`, `raw`

Nested normalized objects retain every field parsed from the public source. `raw` is optional because source payloads can be much larger and are not a stable contract.

### Input parameters

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `mode` | string | Yes | `profile` | One of the 23 modes listed above |
| `targets` | string\[] | Target modes | `["NASA"]` | Handles, X URLs, IDs, trend names or asset symbols |
| `woeids` | string\[] | Trends modes | `["1"]` | Numeric public trend-location IDs; `1` is worldwide |
| `maxItems` | integer | No | `50` | Maximum rows per target or WOEID; `0` removes the Actor-side cap |
| `maxTotalItems` | integer | No | `0` | Optional run-wide cap; `0` means no additional cap |
| `trendWindow` | string | No | `Day` | `Day`, `Week` or `Month` for trend-post feeds |
| `assetTimeframe` | string | No | `1D` | Market-card timeframe passed to X |
| `assetCandleSize` | string | No | `1h` | Market-card candle size passed to X |
| `includeRaw` | boolean | No | `false` | Include raw public X objects in addition to normalized fields |
| `monitorKey` | string | Monitor modes | `default` | Separates independent saved monitor states |
| `monitorBehavior` | string | Monitor modes | `newAndChanged` | `newOnly` or `newAndChanged` |
| `maxConcurrency` | integer | No | `8` | Parallel independent targets, from 1 to 32 |
| `maxRequestRetries` | integer | No | `3` | Request and source attempts, from 1 to 8 |
| `requestTimeoutSecs` | integer | No | `30` | Per-request timeout, from 10 to 120 seconds |

### Monitoring behavior

Monitoring state is kept in the run's default key-value store and is isolated by mode, targets, WOEIDs and `monitorKey`.

- The first run emits every currently visible record with `monitorStatus: "new"`.
- Later `newOnly` runs emit only unseen records.
- Later `newAndChanged` runs also emit records whose stable public fields or engagement counters changed.
- Empty, unchanged, duplicate and failed sources do not produce paid dataset events.
- State is committed only after all emitted rows are accepted and the event charge limit has not been reached.

Use an Apify Schedule with the same task and storage for recurring monitoring. Starting unrelated runs with a different `monitorKey` prevents their snapshots from mixing.

### Performance, retries and costs

Independent targets run in parallel up to `maxConcurrency`. Each target gets a sticky Apify Residential Proxy session so its guest token and IP remain coherent. A network, proxy or temporary X failure is retried with a fresh residential session. Guest tokens also rotate automatically for public rate-limit responses.

Results are charged only after they are successfully written. Configure the following pay-per-event names in the Actor pricing settings:

| Event | Charged result |
| --- | --- |
| `profile-result` | One public profile or visible community member |
| `tweet-result` | One direct `tweet` result |
| `timeline-result` | One post from a timeline, thread, trend, community or video feed |
| `trend-result` | One trend or trend-location row |
| `community-result` | One complete community details row |
| `asset-result` | One stock or crypto asset card |
| `content-result` | One Article, Space or broadcast |
| `monitor-change` | One new or changed monitoring row |

Failed, empty, unchanged and duplicate results have no custom event. Keep the small platform-required Actor start event if your monetization setup requires it and remove the default dataset-item event to avoid double billing.

Actual cost depends on your configured event prices, number of targets, the records X exposes and selected limits. Check the Actor's **Pricing** tab before a production run.

### Use cases

- Monitor public brand or creator accounts for new content and engagement changes
- Build regional trend dashboards from worldwide and country/city WOEIDs
- Research community topics, rules, public posts, media and visible members
- Archive public long-form Articles, Space metadata and broadcasts
- Compare public profile audiences and content performance
- Feed public X data into Sheets, BigQuery, webhooks, Make, Zapier or your own API pipeline

### API example

Replace `<YOUR_USERNAME>` after publication:

```bash
curl -X POST "https://api.apify.com/v2/acts/<YOUR_USERNAME>~twitter-x-scraper/runs?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"mode":"profile","targets":["NASA","SpaceX"]}'
```

The run response contains links to the default dataset. All export formats use the same 60-field rows.

### Limits and responsible use

- The Actor extracts only information X exposes publicly without a logged-in account.
- It does not provide global keyword search, full reply trees, followers/following lists, likes, bookmarks, private profiles or protected content. Those surfaces require authenticated access and are intentionally not advertised as available.
- `userTimeline` is a public ranked feed, not a guaranteed complete chronological archive. The public source controls its depth.
- `threadPreview` returns only replies visible in the logged-out server-rendered page. `replyAncestors` walks upward from one visible reply and does not discover every descendant reply.
- Current-trend feeds can validly return zero posts even when a trend exists.
- Deleted, withheld, age-restricted, protected, region-limited or unavailable objects can return no row.
- X can change public endpoints or payload fields. The Actor preserves a stable 60-field envelope and uses live operation discovery/fallbacks, but no scraper can guarantee source availability.
- Use the data lawfully and respect privacy, copyright, contractual restrictions and applicable regulations. Do not use the Actor for harassment, surveillance or prohibited profiling.

Twitter and X are trademarks of X Corp. This Actor is independent and is not affiliated with, endorsed by or sponsored by X Corp.

### FAQ

#### Do I need an X account, cookies or API key?

No. The supported modes use public logged-out X surfaces. Apify Residential Proxy is attached automatically.

#### Why did a valid run return fewer rows than `maxItems`?

`maxItems` is a ceiling, not a promise. Public X surfaces often expose fixed-size or ranked feeds, and some valid current-trend feeds return no posts.

#### What happens when one target fails?

Other targets continue. Failures are summarized in the `RUN_SUMMARY` key-value-store record and logs, not mixed into the buyer's Results table. The run fails only when every requested source fails.

#### Can I schedule change monitoring?

Yes. Save the input as an Apify Task, schedule it and keep the same task storage and `monitorKey`.

#### Is raw X JSON available?

Yes. Enable `includeRaw`. Normalized top-level fields remain unchanged, while raw source-controlled data is added under `raw` and compatible nested objects.

### Support

For a reproducible issue, send the Apify run ID, selected mode, non-sensitive target, expected outcome and whether the object is visible in a logged-out browser. Never send account cookies or login credentials; the Actor does not use them.

### Third-party notice

The no-auth X transport is vendored from an MIT-licensed implementation and substantially wrapped with Actor-specific proxy enforcement, retries, normalization, monitoring, schemas and tests. Its license is preserved in `vendor/X_NOAUTH_API_LICENSE`.

# Actor input Schema

## `mode` (type: `string`):

Choose the public X surface to extract. Monitoring modes remember the previous run in the same task storage.

## `targets` (type: `array`):

Handles, X URLs or IDs required by the selected mode. Handles accept NASA, @NASA or https://x.com/NASA. Post, community, Space and broadcast modes accept either a full X URL or its ID. Asset mode accepts TSLA or $TSLA. Trend-post mode accepts trend names or hashtags.

## `woeids` (type: `array`):

Numeric Yahoo Where On Earth IDs used by trends and monitorTrends. Use mode trendLocations to discover all currently supported IDs. 1 means worldwide.

## `maxItems` (type: `integer`):

Maximum dataset rows kept for each handle, ID, symbol, trend or WOEID. Use 0 for every item the public source makes available in one run.

## `maxTotalItems` (type: `integer`):

Optional hard cap after all targets are combined. 0 means no additional run-wide cap.

## `trendWindow` (type: `string`):

Time window used by trendingPosts and trendPosts.

## `assetTimeframe` (type: `string`):

Timeframe forwarded to X market-data cards, for example 1D.

## `assetCandleSize` (type: `string`):

Candle size forwarded to X market-data cards, for example 1h.

## `includeRaw` (type: `boolean`):

Also store the underlying public X payload under raw and inside normalized nested objects. This can substantially increase dataset size.

## `monitorKey` (type: `string`):

Separates independent monitors that otherwise use the same mode and targets.

## `monitorBehavior` (type: `string`):

newOnly emits newly observed records. newAndChanged also emits known records whose public fields or engagement metrics changed.

## `maxConcurrency` (type: `integer`):

Maximum independent handles, IDs or locations processed at the same time.

## `maxRequestRetries` (type: `integer`):

Attempts for temporary X errors. Guest tokens rotate automatically for rate-limit and access responses.

## `requestTimeoutSecs` (type: `integer`):

Maximum duration of one X request in seconds.

## Actor input object example

```json
{
  "mode": "profile",
  "targets": [
    "NASA"
  ],
  "woeids": [
    "1"
  ],
  "maxItems": 50,
  "maxTotalItems": 0,
  "trendWindow": "Day",
  "assetTimeframe": "1D",
  "assetCandleSize": "1h",
  "includeRaw": false,
  "monitorKey": "default",
  "monitorBehavior": "newAndChanged",
  "maxConcurrency": 8,
  "maxRequestRetries": 3,
  "requestTimeoutSecs": 30
}
```

# Actor output Schema

## `dataset` (type: `string`):

Profiles, posts, timelines, trends, communities, rich X content, market assets and monitored changes in one Results table.

## `runSummary` (type: `string`):

Counts of successful, empty and failed sources plus charged result events.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapingmonkey/twitter-x-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("scrapingmonkey/twitter-x-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 '{}' |
apify call scrapingmonkey/twitter-x-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapingmonkey/twitter-x-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/chP1xpLWmF73cSJbL/builds/bsJr19jVj2vTAi4wf/openapi.json
