Twitter (X) Scraper avatar

Twitter (X) Scraper

Pricing

from $0.15 / 1,000 public data

Go to Apify Store
Twitter (X) Scraper

Twitter (X) Scraper

Collect public X posts, profile matches, network members, and regional trends. Filter posts by source, date, language, media, and engagement, then save structured rows to an Apify dataset without X credentials.

Pricing

from $0.15 / 1,000 public data

Rating

5.0

(1)

Developer

Maxime Dupré

Maxime Dupré

Maintained by Community

Actor stats

1

Bookmarked

267

Total users

79

Monthly active users

2.7 hours

Issues response

11 days ago

Last modified

Share

🔎 Twitter (X) scraper for public data

Twitter Scraper helps researchers, marketers, and developers collect public Twitter/X posts, profile matches, profile network members, and regional trends. Get text, links, authors, media, engagement counts, and source details as structured dataset rows without giving the Actor your Twitter/X login.

Post rows can include text, links, time, language, post kind, author details, engagement counts, media, quotes, replies, and conversation links. Profile rows can include identity, bio, images, public counts, verification, and source context. Trend rows include rank, region, search link, and reported post volume when X gives it.

The Actor saves each eligible public item on its first match. If another query, URL, handle, ID, or source finds it later, that later match is ignored. Source fields describe only the first saved match.

▶️ Run one Twitter/X collection

  1. Choose one target for the run.
  2. Add the matching search, profile, network, or trend input.
  3. Set any filters and maxNbItemsToScrape.
  4. Run the Actor and open its dataset.

Post searches can use plain text, X search syntax, public source URLs, post URLs or IDs, conversation IDs, quoted post IDs, filters, or date and location limits. Profile search finds public accounts. Network mode collects followers or followed accounts. Trends mode returns topics for one supported region. Leave the work limit empty to return all available results until the source is exhausted.

⚙️ Input

Input fields

Only fields for the chosen target affect that run.

FieldTypeWhat it does
targetstringChooses posts, profile search, network members, or trends.
directPostUrlsstring[]Collects the exact public posts at these URLs.
directPostIdsstring[]Collects the exact public posts with these numeric IDs.
conversationIdsstring[]Finds public posts in these conversations.
quotedPostIdsstring[]Finds public posts that quote these post IDs.
postSearchUrlsstring[]Searches from Twitter/X search, profile, list, or post URLs. A post URL here finds quotes.
searchQuerystringUses plain text or advanced Twitter/X search syntax.
hashtagsstring[]Requires hashtags, without #.
fromUsersstring[]Requires authors, without @.
mentionsstring[]Requires mentioned handles, without @.
toUsersstring[]Requires posts addressed to handles, without @.
searchModestringUses latest, top, or both. Each post is saved once.
startDatestringKeeps posts on or after this date. Empty uses the last 30 days.
endDatestringKeeps posts on or before this date.
languagestringRequires a language code such as en.
nearstringSets a place name for location search.
geocodestringSets latitude, longitude, and radius.
placeIdstringRequires a Twitter/X place ID.
linksstringIncludes all posts, only posts with links, or only posts without links.
mediastringIncludes all posts or requires media, images, or videos.
postKindsstring[]Keeps selected original posts, quotes, replies, and reposts.
minLikesintegerSets the least number of likes.
minRepliesintegerSets the least number of replies.
minRetweetsintegerSets the least number of reposts.
sinceIdstringKeeps posts after this post ID.
maxIdstringKeeps posts at or before this post ID.
profileSearchQueriesstring[]Finds public profiles with X or Twitter People search.
networkProfileHandlesstring[]Sets profiles whose followers or following accounts to collect.
networkTypestringChooses followers or following accounts.
trendRegionIdstringChooses one supported region for trends.
maxNbItemsToScrapeintegerStops after this many rows. Leave it empty to return all available results until the source is exhausted.

Example input

This is the public input from a successful current-beta default search run:

{
"target": "searchPosts",
"searchQuery": "OpenAI",
"searchMode": "latest",
"links": "include",
"media": "include",
"postKinds": [
"originalPosts",
"quotePosts",
"replies"
],
"networkType": "followers",
"trendRegionId": "1",
"maxNbItemsToScrape": 10
}

Post searches need at least one positive selector. Profile searches need a query. Network runs need a profile handle. Trends use only the chosen region.

🧾 Output

Each run returns rows for one chosen target shape. Network-member runs use the profile shape. Fields that X does not provide can be null.

Post row

FieldTypeWhat it does
rowTypestringIs post.
postIdstring or nullGives the X post ID, when available.
postUrlstring or nullGives the link to the X post, when available.
postTextstring or nullGives the full post text, when available.
postDateTimestring or nullGives the time the post was published, when available.
languagestring or nullGives the post language code, when available.
postKindstring or nullSays whether the post is original, a reply, a quote, or a repost.
authorIdstring or nullGives the author profile ID, when available.
authorHandlestring or nullGives the author handle without @, when available.
authorDisplayNamestring or nullGives the author's display name, when available.
authorProfileUrlstring or nullGives the link to the author's X profile, when available.
authorBiostring or nullGives the author's public profile bio, when available.
authorLocationstring or nullGives the author's public profile location, when available.
authorAvatarUrlstring or nullGives the author's avatar image link, when available.
authorFollowersCountnumber or nullGives the author's follower count, when available.
authorFollowingCountnumber or nullGives the author's following count, when available.
authorCreatedAtstring or nullGives the time the author account was created, when available.
authorIsVerifiedboolean or nullSays whether the author is verified, when available.
authorIsBlueVerifiedboolean or nullSays whether the author has X Premium verification, when available.
authorVerifiedTypestring or nullGives the author's verification type, when available.
nbLikesnumber or nullGives the number of likes, when available.
nbRepostsnumber or nullGives the number of reposts, when available.
nbRepliesnumber or nullGives the number of replies, when available.
quoteCountnumber or nullGives the number of quotes, when available.
nbViewsnumber or nullGives the number of views, when available.
nbBookmarksnumber or nullGives the number of bookmarks, when available.
mediaDetailsobject[]Gives each media file and its available details.
mediaDetails.idstring or nullGives the media ID, when available.
mediaDetails.altTextstring or nullGives the media alt text, when available.
mediaDetails.typestring or nullGives the media kind, when available.
mediaDetails.urlstring or nullGives the main media file link, when available.
mediaDetails.thumbnailUrlstring or nullGives a preview image link, when available.
mediaDetails.widthinteger or nullGives the media width in pixels, when available.
mediaDetails.heightinteger or nullGives the media height in pixels, when available.
mediaDetails.durationMsinteger or nullGives the media length in milliseconds, when available.
mediaDetails.aspectRatiostring or nullGives the media shape, when available.
mediaDetails.contentTypestring or nullGives the media file type, when available.
mediaDetails.variantsobject[]Gives other video file choices, when available.
mediaDetails.variants.urlstring or nullGives a video choice link, when available.
mediaDetails.variants.contentTypestring or nullGives a video choice file type, when available.
mediaDetails.variants.bitrateinteger or nullGives a video choice bitrate, when available.
hashtagsstring[]Gives hashtags without #.
quotedPostIdstring or nullGives the quoted post ID, when available.
quotedPostTextstring or nullGives the quoted post text, when available.
quotedAuthorHandlestring or nullGives the quoted post author's handle, when available.
replyToHandlestring or nullGives the handle this post replies to, when available.
replyToPostIdstring or nullGives the post ID this post replies to, when available.
conversationIdstring or nullGives the conversation ID, when available.
inReplyToUserIdstring or nullGives the replied-to user ID, when available.
isPinnedboolean or nullSays whether X marks the post as pinned, when available.
sourcestring or nullGives the posting client label, when available.
searchQuerystring or nullGives the search query that first found the post, when available.
sourceUrlstring or nullGives the submitted URL that first found the post, when available.
sourceTypestring or nullGives the kind of input that first found the post, when available.
resultPositionnumber or nullGives the post's 1-based place in its source, when available.
{
"rowType": "post",
"postKind": "quote",
"postId": "2088561319947493797",
"postUrl": "https://x.com/antisadh/status/2088561319947493797",
"postText": "OPENAI CHARGES $200/MO FOR GPT-5.6 ANTHROPIC CHARGES $200/MO FOR OPUS 5 GOOGLE CHARGES $200/MO GEMINI HE WIRED 5 FREE GITHUB REPOS INTO KIMI K3 AND HIS ENTIRE 5-AGENT WORKFLOW COSTS $40/MO IN API CALLS\n\nwhy pay openai $200 to talk to one gpt-5 -> kimi k3 is #3 on the ai index, openai-compatible, $3 in / $15 out per 1M tokens -> wire it into kimi code, agents sdk (5 specialists in parallel), openhands (autonomous jobs), graphrag (memory) -> your \"ai team\" is 5 free repos + one $40/mo api key.\n\nthat loop is why every serious solo dev is quietly cancelling $200 subscriptions and the article below is the exact stack that replaces all 3.\n\nkimi code + agent sdk + agents sdk + openhands + graphrag = 5 hires, one api key, same output as your $600/mo subscription stack - that's the swap from the article below.\n\nread the article below. that's how you stop paying $200/mo for one seat and start paying $40 for a whole team.",
"postDateTime": "2026-08-15T09:39:56.000Z",
"authorHandle": "antisadh",
"authorDisplayName": "Antid",
"authorAvatarUrl": "https://pbs.twimg.com/profile_images/2050597482061578240/zWQ8MKWq_normal.jpg",
"authorProfileUrl": "https://x.com/antisadh",
"authorBio": "studying AI daily | helping you save & make money with it",
"authorLocation": "Miami",
"authorCreatedAt": "2023-02-08T19:56:38.000Z",
"nbLikes": 0,
"nbReposts": 0,
"nbReplies": 0,
"nbViews": 10,
"nbBookmarks": 0,
"mediaDetails": [
{
"id": "2088553927557988352",
"altText": null,
"type": "video",
"url": "https://video.twimg.com/amplify_video/2088553927557988352/vid/avc1/1596x2160/ebtGn2R3GGPbBgtY.mp4?tag=29",
"thumbnailUrl": "https://pbs.twimg.com/amplify_video_thumb/2088553927557988352/img/DUVTFwq1dY69ezk1.jpg",
"width": 1596,
"height": 2160,
"durationMs": 24633,
"aspectRatio": "133:180",
"contentType": "video/mp4",
"variants": [
{
"url": "https://video.twimg.com/amplify_video/2088553927557988352/vid/avc1/1596x2160/ebtGn2R3GGPbBgtY.mp4?tag=29",
"bitrate": 25128000,
"contentType": "video/mp4"
},
{
"url": "https://video.twimg.com/amplify_video/2088553927557988352/vid/avc1/1080x1460/GdS3vo2ryMd3rHM8.mp4?tag=29",
"bitrate": 10368000,
"contentType": "video/mp4"
},
{
"url": "https://video.twimg.com/amplify_video/2088553927557988352/vid/avc1/720x974/QoIEEp7q7A0MIFS5.mp4?tag=29",
"bitrate": 2176000,
"contentType": "video/mp4"
},
{
"url": "https://video.twimg.com/amplify_video/2088553927557988352/vid/avc1/480x648/6o3W6N_u81xU1yQL.mp4?tag=29",
"bitrate": 950000,
"contentType": "video/mp4"
},
{
"url": "https://video.twimg.com/amplify_video/2088553927557988352/vid/avc1/320x432/mPED0tFwvxSYB7ZQ.mp4?tag=29",
"bitrate": 632000,
"contentType": "video/mp4"
}
]
}
],
"hashtags": [],
"quotedPostId": "2087485542359245274",
"quotedPostText": "https://t.co/f4AhI3wNpy",
"quotedAuthorHandle": "noisyb0y1",
"replyToHandle": null,
"replyToPostId": null,
"quoteCount": 0,
"language": "en",
"source": null,
"conversationId": "2088561319947493797",
"inReplyToUserId": null,
"isPinned": null,
"authorId": "1623410404150898691",
"authorFollowersCount": 2038,
"authorFollowingCount": 86,
"authorIsVerified": true,
"authorIsBlueVerified": true,
"authorVerifiedType": null,
"searchQuery": "OpenAI",
"sourceUrl": null,
"sourceType": "searchQuery",
"resultPosition": 1
}

Profile or network-member row

Profile search and network-member runs use this same shape. Network fields are filled for network runs, while searchQuery describes a profile search when used.

FieldTypeWhat it does
rowTypestringIs profile.
profileIdstring or nullGives the profile ID, when available.
profileUrlstring or nullGives the link to the X profile, when available.
handlestring or nullGives the profile handle without @, when available.
displayNamestring or nullGives the profile display name, when available.
biostring or nullGives the public profile bio, when available.
createdAtstring or nullGives the account creation time, when available.
locationstring or nullGives the public profile location, when available.
avatarUrlstring or nullGives the profile avatar image link, when available.
bannerUrlstring or nullGives the profile banner image link, when available.
followersCountnumber or nullGives the public follower count, when available.
followingCountnumber or nullGives the public following count, when available.
postsCountnumber or nullGives the public post count, when available.
likesCountnumber or nullGives the public like count, when available.
isVerifiedboolean or nullSays whether X marks the profile as verified.
pinnedPostIdsstring[]Gives the shown pinned post IDs.
searchQuerystring or nullGives the query or network source that first found the profile.
networkOwnerHandlestring or nullGives the submitted profile whose network contained this account, when used.
networkTypestring or nullGives whether the network source was followers or following, when used.
resultPositionnumber or nullGives the profile's 1-based place in the source, when available.
{
"rowType": "profile",
"profileId": "891077171673931776",
"profileUrl": "https://x.com/berkeley_ai",
"handle": "berkeley_ai",
"displayName": "Berkeley AI Research",
"bio": "We're graduate students, postdocs, faculty and scientists at the cutting edge of artificial intelligence research.",
"createdAt": null,
"location": "Berkeley, CA",
"avatarUrl": "https://pbs.twimg.com/profile_images/891079469594587138/c_bnAh4o_normal.jpg",
"bannerUrl": "https://pbs.twimg.com/profile_banners/891077171673931776/1501285360",
"followersCount": 286026,
"followingCount": 468,
"postsCount": 1578,
"likesCount": 652,
"isVerified": true,
"pinnedPostIds": [],
"searchQuery": "AI researcher",
"resultPosition": 1
}

Example network-member row

{
"rowType": "profile",
"profileId": "33836629",
"profileUrl": "https://x.com/karpathy",
"handle": "karpathy",
"displayName": "Andrej Karpathy",
"bio": "deep learning",
"createdAt": null,
"location": "Earth",
"avatarUrl": "https://pbs.twimg.com/profile_images/1296667294148382721/9Pr6XrPB_normal.jpg",
"bannerUrl": "https://pbs.twimg.com/profile_banners/33836629/1407117611",
"followersCount": 3799461,
"followingCount": 1124,
"postsCount": 10141,
"likesCount": 24385,
"isVerified": true,
"pinnedPostIds": [],
"searchQuery": "@openai followers",
"resultPosition": 1,
"networkOwnerHandle": "openai",
"networkType": "followers"
}

Trend row

FieldTypeWhat it does
rowTypestringIs trend.
trendNamestring or nullGives the topic name.
trendRanknumber or nullGives its rank in the region.
trendQuerystring or nullGives the search query, when available.
trendSearchUrlstring or nullGives an X search link for the trend, when available.
tweetVolumenumber or nullGives the post volume reported by X.
regionIdstring or nullGives the selected trend region ID.
regionNamestring or nullGives the selected trend region name.
regionCountrystring or nullGives the country or global label for the region.
regionCountryCodestring or nullGives the ISO country code, or null for Worldwide.
{
"rowType": "trend",
"trendName": "Rogue",
"trendRank": 1,
"trendQuery": "Rogue",
"trendSearchUrl": "https://x.com/search?q=Rogue",
"tweetVolume": null,
"regionId": "23424977",
"regionName": "United States",
"regionCountry": "United States",
"regionCountryCode": "US"
}

💳 Pricing

This Actor uses pay-per-event pricing. The public data event covers one saved post, profile, network member, or trend. Use a small work limit for a first test, then raise it when the output fits your work.

🔌 Integrations

Use the Apify API, schedules, webhooks, and dataset exports such as JSON, CSV, Excel, XML, or RSS.

❓ FAQ

What happens when the same post or profile matches twice?

The Actor saves the first eligible match. It ignores later matches and keeps the original source fields.

How do I fetch one post without fetching its thread?

Use directPostUrls or directPostIds for an exact public post. A post URL in postSearchUrls instead finds posts that quote it. Use conversationIds when you want posts from a conversation.

How do I search profiles or collect a network?

Choose searchProfiles with profileSearchQueries to find public accounts. Choose networkMembers, add networkProfileHandles, and set networkType to followers or following to collect public network members.

Why is a field null?

The source may not provide that value for the post, profile, network member, or trend. Private, protected, deleted, suspended, and otherwise unavailable data is outside the product boundary.

Does leaving the work limit empty return everything?

It returns all available results until the source is exhausted. It does not promise every historical post or every profile that X does not expose.

Do I need a Twitter/X login or API key?

No. You do not provide Twitter/X cookies, sessions, credentials, or an API key.

Is this the official Twitter/X API?

No. This is an Apify Actor for public X data and structured dataset rows. Use the official API when you need its own contract.

📝 Changelog

1.0: Refined public X collection inputs and results

  • Made each run explicitly choose posts, profiles, network members, or trending topics.
  • Added author locations and structured media details to post rows, with clearer profile and trend result views.
  • Improved recovery when public X posts or responses are unavailable.

v0.4

  • Added direct post collection by URL or ID.
  • Added conversation and quote discovery.
  • Added follower and following network collection.
  • Improved handling when Twitter/X returns incomplete responses.

v0.3

  • Added post search URLs and advanced search syntax.
  • Added Latest + Top search and link, media, and location filters.
  • Added richer flat post fields.
  • Added clearer handling for unsupported X URLs.

v0.2

  • Added Search Profiles for query-based Twitter/X profile discovery with flat profile rows and search provenance.

v0.1

  • Added Trending Topics and supported trend regions.
  • Added grouped target inputs and pay-per-event pricing.

🆘 Support

For issues, questions, or feature requests, file a ticket and I'll fix or implement it in less than 24h 🫡

Made with ❤️ by Maxime Dupré