X User Post Scraper avatar

X User Post Scraper

Pricing

from $0.40 / 1,000 results

Go to Apify Store
X User Post Scraper

X User Post Scraper

Scrape posts from any X (Twitter) user profile within a date range. Extracts engagement metrics, images, videos, links, hashtags, and mentions.

Pricing

from $0.40 / 1,000 results

Rating

0.0

(0)

Developer

Futurize Rush

Futurize Rush

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

16 hours ago

Last modified

Share

X (Twitter) User Post Scraper

Collect posts from any X (Twitter) account your session has access to — including public accounts and private accounts you follow — within a specific date range. Extract engagement metrics — likes, retweets, replies, quotes, views, bookmarks — along with embedded images, videos, links, hashtags, and mentions.

Use the data for research, competitive analysis, content monitoring, or feed it into AI tools such as ChatGPT, Claude, or Gemini, or any pipeline that accepts structured JSON or CSV.


What you can do

  • Scrape posts from one or more X accounts in a single run
  • Filter by date range (e.g. all posts from January to June 2026)
  • Get engagement metrics: likes, retweets, replies, quotes, views, bookmarks
  • Extract media: images, video URLs, and external links shared in posts
  • Get hashtags and mentions for each post
  • Set a per-user post limit to control run time and data volume

Getting started

Step 1 — Export your X session

This scraper uses your X login session to access post data. The easiest way to export it is with the Cookie-Editor browser extension.

  1. Install Cookie-Editor for your browser (Chrome or Firefox)
  2. Log in to x.com and stay on the x.com tab
  3. Click the Cookie-Editor icon in your browser toolbar
  4. Click ExportJSON
  5. Copy the entire result (it starts with [ and ends with ])

Your session data is used only to access X on your behalf during this run. It is never stored or shared beyond your own Apify account.

Step 2 — Configure the Actor

FieldRequiredDescription
X UsernamesOne or more X handles (with or without @)
Start DateEarliest post date. Specific (2026-01-01) or relative (1 month). Defaults to 1 month ago
End DateLatest post date. Specific (2026-03-31) or relative lookback (7 days = 7 days ago). Defaults to today
Max Posts Per UserDefault: 200. See guidance below
X Session CookiesPaste the full JSON you exported from Cookie-Editor

Date formats accepted: YYYY-MM-DD (e.g. 2026-01-15) or relative lookback periods — 30 days, 2 weeks, 3 months, 1 year. Leave both fields blank to collect the past month up to today.

Relative periods in End Date count backwards from today. For example, 7 days means 7 days ago — useful if you want to exclude the most recent week.

How to set Max Posts Per User

Set this high enough to cover the posts in your date range. The right value depends on how active the account is and how wide your date range is — more prolific accounts and wider ranges require a higher limit.

The maximum allowed value is 5,000 posts per user.

Note for historical date ranges: if you want posts from many months ago, set a higher limit to give the scraper enough room to page back far enough. The scraper always fetches in reverse-chronological order, so a low limit may stop before reaching older dates.

Step 3 — Run and export

Click Start and results appear in the dataset as they are collected. Export to JSON, CSV, or Excel when done.


Output fields

Each row in the dataset represents one post:

FieldTypeDescription
postIdstringPost identifier
urlstringDirect link to the post
textstringFull post text
createdAtdatetimePublication time (UTC)
authorUsernamestringAccount handle
authorDisplayNamestringDisplay name
authorIdstringNumeric X user ID of the author
likeCountnumberTotal likes
retweetCountnumberTotal reposts
replyCountnumberTotal replies
quoteCountnumberTotal quote posts
viewCountnumber / nullTotal views (null if not available for this post)
bookmarkCountnumberTotal bookmarks
imagesarrayImage URLs
videosarrayVideo URLs (highest quality)
linksarrayExternal URLs shared in the post (t.co links resolved; internal X/Twitter links excluded)
hashtagsarrayHashtags used (without the # symbol)
mentionsarrayUsernames mentioned in the post (without @)
isReplybooleanWhether the post is a reply
isRetweetbooleanWhether the post is a repost
isQuotebooleanWhether the post quotes another post

Usage notes

  • Suspended or deactivated accounts are skipped automatically with a notice in the run log
  • Age-restricted accounts whose content your session cannot access are skipped with a notice in the run log
  • Private accounts can only be scraped if your X session follows them — otherwise they will appear as having no posts
  • Non-existent accounts are skipped without stopping the run
  • Rate limits: when X limits requests, the run stops and the log shows how many posts were collected along with the recommended wait time before restarting.
  • Session expiry: if your session expires mid-run, the run will stop with a clear message — simply re-export your cookies and restart

Tips for best results

  • Use a regular X account (not a new or restricted one) for more reliable access
  • For large date ranges, set Max Posts Per User high enough to cover the posts you expect
  • Sessions typically remain valid for weeks; re-export your cookies if you encounter session errors
  • When scraping multiple accounts, consider the total post volume across all accounts

FAQ

Can I scrape posts from a private account? Yes — as long as the X account you exported cookies from follows that private account. If you don't follow the account, X will return no posts and the run will skip it.

What happens if X's rate limit is reached? The run stops and the log shows how many posts were collected along with the recommended wait time before restarting.

Can I collect long-form posts (X Articles / Note Tweets)? Yes. The scraper retrieves the full text of long-form posts regardless of length.

Are retweets included? Yes. Retweets are included and flagged with isRetweet: true. The text field contains the full text of the original post. The only exception is if the original post was deleted — in that case the stored text may be truncated.

Can I use the data with AI tools? Yes. The JSON and CSV output can be imported directly into tools such as ChatGPT, Claude, Gemini, or any workflow that accepts structured data. Use it for sentiment analysis, summarisation, trend detection, or training datasets.

Why do some posts have viewCount: null? X does not expose view counts for all posts. When view data is unavailable for a specific post, the field is null rather than 0.

The run completed but I got no results — why? If the run completed without errors but returned no posts, the most likely causes are: the account had no posts within the specified date range, or the Max Posts Per User limit was reached before the scraper entered the date range. Try widening the date range or increasing the limit.

What date formats are supported? Both date fields accept specific dates in YYYY-MM-DD format (e.g. 2026-01-15) and relative lookback periods such as 30 days, 2 weeks, 3 months, or 1 year. Both fields are optional — leave them blank to collect posts from the past month up to today.

A relative period in End Date counts backwards from today. For example, 7 days means the end date is 7 days ago, which is useful for excluding the most recent week from your results.

How far back can I scrape? X returns posts in reverse-chronological order starting from the most recent. How far back you can go depends on the account's post volume and the Max Posts Per User setting. Very prolific accounts may require a higher limit to reach older dates.

My session expired — what should I do? Re-export your cookies from Cookie-Editor while logged in to x.com, then restart the run with the updated cookies.

Can I run multiple accounts at once? Yes. Add multiple usernames to the list and the Actor will scrape them in sequence within a single run.


Disclaimer

This Actor requires you to provide your own X (Twitter) login session. You are responsible for ensuring your use of this tool complies with X's Terms of Service and any applicable laws in your jurisdiction. The Actor does not bypass any security measures — it accesses only content your own account is permitted to view.

The developer is not responsible for any actions taken by X against accounts used with this tool, including but not limited to rate limiting, temporary restrictions, or suspension. Use responsibly and within the limits of X's platform rules.

Data collected through this tool is the property of the respective content creators and subject to X's terms regarding data use.