Twitter / X Tweet & Profile Scraper avatar

Twitter / X Tweet & Profile Scraper

Pricing

from $4.00 / 1,000 tweet-fetcheds

Go to Apify Store
Twitter / X Tweet & Profile Scraper

Twitter / X Tweet & Profile Scraper

Scrape **X (Twitter) posts by ID** and **public profile metrics** without the official Twitter API. No login cookies required.

Pricing

from $4.00 / 1,000 tweet-fetcheds

Rating

0.0

(0)

Developer

Olek Coder

Olek Coder

Maintained by Community

Actor stats

0

Bookmarked

3

Total users

1

Monthly active users

2 days ago

Last modified

Share

Actor ID: morph_coder/twitter-search-scraper

Scrape X (Twitter) posts by ID and public profile metrics without the official Twitter API. No login cookies required.

This Actor is not affiliated with X Corp. You are responsible for complying with X Terms of Service and applicable laws.

What you get

ModeInputOutput
Tweet by IDNumeric ID or full status URL (x.com/…/status/…)Text, likes, retweets, reply count, views, author, URL
ProfileUsername (without @)Followers, following, bio, avatar, verification

Not supported: keyword search, login-based features, full reply/comment thread text (only replyCount on tweets).

Input

FieldDefaultDescription
tweetIDsone example URLTweet IDs or status URLs (mix allowed)
profileUsernameselonmuskList of usernames without @
useResidentialProxytrueResidential proxy (recommended on Apify)

At least one of tweetIDs or profileUsernames is required.

Example

{
"tweetIDs": [
"https://x.com/elonmusk/status/2059299542277697565",
"2059405563612524869"
],
"profileUsernames": ["elonmusk"],
"useResidentialProxy": true
}

Output

Each dataset row has a type field:

Tweet (type: "tweet")

{
"type": "tweet",
"id": "2059299542277697565",
"url": "https://x.com/user/status/2059299542277697565",
"text": "...",
"likeCount": 1200,
"retweetCount": 45,
"replyCount": 89,
"viewCount": 50000,
"fetchedVia": "graphql",
"author": {
"screenName": "user",
"name": "Display Name",
"profilePicture": "https://pbs.twimg.com/..."
}
}

fetchedVia is graphql or syndication (fallback if GraphQL fails).

Profile (type: "profile")

{
"type": "profile",
"screenName": "elonmusk",
"followersCount": 100000000,
"followingCount": 500,
"description": "...",
"isVerified": true
}

Error (type: "error")

Failed IDs/usernames are recorded without stopping the whole run.

Pricing (pay per event)

EventWhen charged
apify-actor-startEach run start (synthetic, set in Console)
tweet-fetchedEach successful tweet row
profile-fetchedEach successful profile row

Set apify-default-dataset-item to $0 (dataset rows are billed via the events above).

Example (default prefill: 1 tweet + 1 profile):

  • apify-actor-start + 1× tweet-fetched + 1× profile-fetched
  • Plus Apify platform usage (compute + proxy) unless you enable “pay per event + usage”

Suggested event prices and Console setup: see MONETIZATION.md.

Requirements

  • Apify account with access to residential proxies when useResidentialProxy is true (default).
  • Tweet IDs must be public posts.

Run on Apify

  1. Open the Actor in Apify Console.
  2. Use the pre-filled input or paste your IDs/usernames.
  3. Click Start — expect 2–4 dataset rows on success (tweets + profile + any errors).

Run locally

npm install
npm run build
cp scripts/test-input.example.json storage/key_value_stores/default/INPUT.json
npx apify run

API

POST https://api.apify.com/v2/acts/morph_coder~twitter-search-scraper/runs?token=YOUR_TOKEN
Content-Type: application/json
{
"tweetIDs": ["2059299542277697565"],
"profileUsernames": ["elonmusk"]
}

FAQ

Can I paste the full tweet URL (Make / Zapier)?
Yes. Pass the whole link in tweetIDs, e.g. https://x.com/user/status/1234567890. Numeric IDs still work. Invalid entries are skipped with a warning; the run continues for valid items.

Where do I find a tweet ID?
From the post URL: https://x.com/user/status/1234567890 — you can paste either the full URL or just 1234567890.

Why residential proxy?
X often blocks datacenter IPs. Residential proxy improves reliability on Apify.

Can I scrape replies?
Only the reply count on the tweet object, not individual comment texts.

Maintainer

Internal setup: MONETIZATION.md, DEVELOPMENT.md, CHECKLIST.md.