Skip to content
Skillpedia
Social media6.3k Β· #14319

x-tweet-by-handle

What it does

This skill reads the tweets on an X user's profile timeline and returns each one with its details. It is for marketers and researchers who want to follow an account's posts.

When to use it

  • βœ“When you want to collect the recent tweets of a specific X account.
  • βœ“When you need to see only the media posts from an account.
  • βœ“When you want the replies an account has written along with its tweets.

Skill link

https://github.com/browser-act/skills/blob/main/solutions/social-listening/x-tweet-by-handle/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/browser-act/skills/blob/main/solutions/social-listening/x-tweet-by-handle/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute β†’

Example of what to ask your AI

β€œGet the last 50 tweets from the X account @examplebrand, with the engagement counts and media.”

5 new skills a week. 1 minute to read.

How it works

The skill opens the profile timeline in your logged-in browser and reads the tweets in the mode you pick. It returns the text, author profile, engagement counts, media, hashtags, mentions and a cursor for loading more.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

X β€” Tweets by Handle

X handle + timeline mode β†’ normalized list of that user's tweets (or replies / media-only) with author, engagement, media, cursor.

Language

All process output to user (progress updates, process notifications) follows the user's language.

Objective

Collect tweets from one or more X user profile timelines, selectable between the default tweets tab, the tweets-and-replies tab, and the media-only tab, returning structured per-tweet data and pagination cursors.

Prerequisites

  • Active X session in the browser (left sidebar shows logged-in avatar / @handle).
  • Network capture is enabled in the browser-act session.

Pre-execution Checks

1. Tool Readiness

If browser-act has been confirmed available in the current session β†’ skip this step.

Invoke browser-act via Skill tool to load usage. If installation or configuration issues arise, follow its guidance to resolve then retry.

2. Login Verification

If login status for X has been confirmed in the current session β†’ skip this step.

Otherwise: open https://x.com and observe the left sidebar:

  • User avatar or @handle visible β†’ logged in, continue
  • "Sign in" / "Log in" prompt visible β†’ not logged in, inform the user and assist the login flow

User refuses or cannot log in β†’ terminate execution.

Capability Components

This Skill's operational boundary = what the user can manually do in their browser. It only reads tweet data already shown to the user, never bypassing authentication. The browser's own JS signs the GraphQL request; the Skill triggers it via URL navigation and reads the response from network traffic. Python scripts under scripts/ only build URLs and parse responses β€” they do not call X directly. Run them through the bash tool.

Network Capture: profile timeline (tweets / replies / media)

Step 1 β€” build the profile URL for the desired mode:

URL=$(python scripts/build-profile-url.py '{handle}' --mode {mode})

Parameters:

  • handle (positional): X handle without @, case-insensitive.
  • --mode: one of tweets (default β€” triggers UserTweets), replies (triggers UserTweetsAndReplies), media (triggers UserMedia).

Step 2 β€” navigate and capture the first page:

  1. network requests --clear
  2. navigate "$URL"
  3. wait stable --timeout 25000 (timeout is normal on X; proceed even if it fires)
  4. Determine the endpoint name to filter by β€” UserTweets, UserTweetsAndReplies, or UserMedia matching the chosen mode:
    • network requests --type xhr,fetch --filter UserTweets (when --mode tweets)
    • network requests --type xhr,fetch --filter UserTweetsAndReplies (when --mode replies)
    • network requests --type xhr,fetch --filter UserMedia (when --mode media)
  5. Take the latest matching entry's request_id.
  6. network request <request_id> β†’ save full output to a file (e.g. tmp/x-profile-page-1.txt).
  7. Parse with the matching --source flag:
    • python scripts/parse-tweets.py --json-file tmp/x-profile-page-1.txt --source user_tweets (for tweets)
    • python scripts/parse-tweets.py --json-file tmp/x-profile-page-1.txt --source user_replies (for replies)
    • python scripts/parse-tweets.py --json-file tmp/x-profile-page-1.txt --source user_media (for media)

Endpoint characteristic: URL contains /i/api/graphql/<hash>/UserTweets (or UserTweetsAndReplies / UserMedia). The query hash rotates; always filter by name.

Step 3 β€” paginate via scroll:

  1. network requests --clear
  2. scroll down --amount 5000
  3. wait stable --timeout 10000
  4. network requests --type xhr,fetch --filter <EndpointName> β†’ take the newest entry's request_id
  5. network request <request_id> β†’ save to tmp/x-profile-page-N.txt
  6. python scripts/parse-tweets.py --json-file tmp/x-profile-page-N.txt --source <source>

Repeat Step 3 until any termination condition is met:

  • Accumulated unique tweet count reaches the user's target.
  • count == 0 on the current page.
  • cursor_bottom is unchanged across two consecutive pages.

Error handling: if no matching request appears after a scroll, wait 3 s and retry once. If the page redirects to a "This account doesn't exist" or "Account suspended" view (visible in state output), terminate with an explanatory result. Pinned tweets appear at the top of the first page β€” they are normal tweets and are included in the output; de-duplicate by id when merging if a pinned tweet would also appear later in chronological order.

Output exa

FAQ

Which modes can I choose?

You can choose tweets only, tweets and replies, or media only.

Do I need to be logged in?

Yes, the skill needs an active X session in your browser.

Can it load more tweets?

Yes, it returns a cursor so you can continue from where it stopped.

Details

Original description by the author

Scrapes tweets from an X (Twitter) user profile timeline given a handle, with selectable mode: tweets, tweets+replies, or media-only. Returns normalized per-tweet data including text, author profile, engagement counts, media, hashtags, mentions, and cursor for pagination. Use when user mentions X user tweets, Twitter user tweets, profile timeline, user feed, @handle tweets, scrape Twitter user, scrape X account, get all tweets from a user, scrape user timeline, download user posts, export tweets from user, with_replies tab, replies tab Twitter, media tab Twitter, photos of user Twitter, videos

repo: browser-act/skills

Popularity

GitHub stars
6.3k
Ranking position
#14319
License
MIT
Updated
8/24/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills