Twitter Scraper avatar

Twitter Scraper

Pricing

from $0.15 / 1,000 public data

Go to Apify Store
Twitter Scraper

Twitter Scraper

Collect public X posts, profiles, network members, and regional trends. Filter posts by date, language, media, links, 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

283

Total users

90

Monthly active users

2.7 hours

Issues response

16 hours 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, and a search link.

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 by search phrase or direct target. Network mode collects followers, followed accounts, or public post retweeters. 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 one result type: public posts, public profiles, profile network members, or trends.
postDiscoveryMethodstringChooses one way to find public posts. Other post-finding inputs are ignored.
searchQuerystringUses plain text or advanced X search syntax.
directPostUrlsstring[]Fetches the exact public posts at the submitted X or Twitter URLs or numeric IDs.
conversationIdsstring[]Finds public posts that belong to the submitted conversations.
quotedPostIdsstring[]Finds public posts that quote the submitted post IDs.
postSearchUrlsstring[]Uses public search, profile, list, post, or conversation URLs as post sources. A post URL finds posts that quote it, not that post or its full thread.
hashtagsstring[]Keeps posts that contain the submitted hashtags. Enter each tag without #.
fromUsersstring[]Keeps posts written by the submitted handles. Enter each handle without @.
authorVerificationstringIncludes authors with any status, only verified authors, or authors not marked verified.
mentionsstring[]Keeps posts that mention the submitted handles. Enter each handle without @.
toUsersstring[]Keeps posts addressed to the submitted handles. Enter each handle without @.
searchModestringOrders searches as Latest, Top, or Latest + Top. The combined mode saves each post once.
startDatestringKeeps posts on or after this date. Empty uses the last 30 days.
endDatestringKeeps posts on or before this date.
languagestringKeeps posts with this language code, such as en, es, fr, or ja.
nearstringSets a place name for location search.
geocodestringSets a latitude, longitude, and radius, such as 37.776,-122.417,10km.
placeIdstringSets an X or Twitter 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 one or more original posts, quotes, replies, or reposts.
minLikesintegerKeeps posts with at least this many likes.
minRepliesintegerKeeps posts with at least this many replies.
minRetweetsintegerKeeps posts with at least this many reposts.
sinceIdstringKeeps posts after this X post ID.
maxIdstringKeeps posts at or before this X post ID.
profileDiscoveryMethodstringFinds profiles by search phrases or by direct handles, URLs, or IDs.
profileSearchQueriesstring[]Uses X or Twitter People search phrases to find matching public profiles.
profileLookupTargetsstring[]Looks up public profiles from handles, URLs, or IDs. Enter handles without @.
networkTypestringChooses Followers, Following, or Post retweeters.
networkProfileHandlesstring[]Sets public profile handles, IDs, or URLs whose followers or following accounts to collect.
retweeterPostUrlsOrIdsstring[]Sets public post URLs or IDs whose public retweeter profiles to collect.
trendRegionIdstringChooses one supported region for current trend topics.
maxNbItemsToScrapeintegerStops after this many rows. Leave it empty to collect 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",
"postDiscoveryMethod": "searchQuery",
"searchQuery": "OpenAI",
"authorVerification": "any",
"searchMode": "latest",
"links": "include",
"media": "include",
"postKinds": [
"originalPosts",
"quotePosts",
"replies"
],
"profileDiscoveryMethod": "searchPhrases",
"networkType": "followers",
"trendRegionId": "1",
"maxNbItemsToScrape": 10
}

Post searches need at least one positive selector. Profile searches need a search phrase or direct target. Network runs need profile targets for Followers or Following, or post URLs or IDs for Post retweeters. Trends use only the chosen region.

🧾 Output

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

Post row

FieldTypeWhat it does
rowTypestringMarks this row as a post.
postIdstringGives the X post ID.
postUrlstringGives the public link to the X post.
postTextstringGives the full post text.
postDateTimestringGives the publication time as a date-time string.
languagestringGives the post language code.
postKindstringSays 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.
authorFollowersCountinteger or nullGives the author's follower count, when available.
authorFollowingCountinteger or nullGives the author's following count, when available.
authorCreatedAtstring or nullGives the author account creation time, 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.
nbLikesinteger or nullGives the number of likes, when available.
nbRepostsinteger or nullGives the number of reposts, when available.
nbRepliesinteger or nullGives the number of replies, when available.
quoteCountinteger or nullGives the number of quotes, when available.
nbViewsinteger or nullGives the number of views, when available.
nbBookmarksinteger or nullGives the number of bookmarks, when available.
mediaDetailsobject[]Lists 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.typestringGives the media kind.
mediaDetails.urlstringGives the main media file link.
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[]Lists other video file choices, when available.
mediaDetails.variants.urlstringGives a video choice link.
mediaDetails.variants.contentTypestring or nullGives a video choice file type, when available.
mediaDetails.variants.bitrateinteger or nullGives a video choice bitrate, when available.
hashtagsstring[]Lists hashtags without #.
linkEntitiesstring[]Lists usable destination links found in the post.
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.
sourceInputstring or nullGives the submitted query, URL, ID, or similar value that first found the post.
resultPositioninteger or nullGives the post's place in its source results, when available.

Example post row from a successful current-beta run

{
"rowType": "post",
"postKind": "reply",
"postId": "2094857571173818383",
"postUrl": "https://x.com/jonasleupe/status/2094857571173818383",
"postText": "@browsercompany @arcinternet @OpenAI @Anthropic @grok @raycast Settling down for today, building starts tomorrow.\nThanks for following along! It's so nice to meet y'all 🫶🏻\n\nThis is fun! ✨ https://t.co/I9laEpmn2n",
"postDateTime": "2026-09-01T18:39:00.000Z",
"authorHandle": "jonasleupe",
"authorDisplayName": "Jonas",
"authorAvatarUrl": "https://pbs.twimg.com/profile_images/1760769023153786880/Xtnmsj_3_normal.jpg",
"authorProfileUrl": "https://x.com/jonasleupe",
"authorBio": "Designer & Maker. Elevating voices in a crowded world.",
"authorLocation": "Operating globally",
"authorCreatedAt": "2013-03-06T21:05:48.000Z",
"nbLikes": 0,
"nbReposts": 0,
"nbReplies": 0,
"nbViews": null,
"nbBookmarks": 0,
"mediaDetails": [
{
"id": "2094842417434222592",
"altText": null,
"type": "image",
"url": "https://pbs.twimg.com/media/HRJgFGeWYAAa5AS.jpg",
"thumbnailUrl": "https://pbs.twimg.com/media/HRJgFGeWYAAa5AS.jpg",
"width": 2688,
"height": 2150,
"durationMs": null,
"aspectRatio": null,
"contentType": null,
"variants": []
}
],
"hashtags": [],
"linkEntities": [],
"quotedPostId": null,
"quotedPostText": null,
"quotedAuthorHandle": null,
"replyToHandle": "jonasleupe",
"replyToPostId": "2094838599552315403",
"quoteCount": 0,
"language": "en",
"source": "Twitter Web App",
"conversationId": "2094707380084715579",
"inReplyToUserId": "1247151224",
"isPinned": false,
"authorId": "1247151224",
"authorFollowersCount": 1739,
"authorFollowingCount": 791,
"authorIsVerified": true,
"authorIsBlueVerified": true,
"authorVerifiedType": null,
"resultPosition": 6,
"sourceInput": "OpenAI"
}

Profile and network-member row

Profile search and network-member runs use this same shape. Network rows add networkType, while sourceInput gives the first query, handle, URL, ID, or similar source value.

FieldTypeWhat it does
rowTypestringMarks this row as a profile.
profileIdstringGives the profile ID.
profileUrlstringGives the public link to the X profile.
handlestringGives the profile handle without @.
displayNamestringGives the profile display name.
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.
followersCountinteger or nullGives the public follower count, when available.
followingCountinteger or nullGives the public following count, when available.
postsCountinteger or nullGives the public post count, when available.
likesCountinteger 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.
sourceInputstring or nullGives the submitted query, handle, URL, ID, or similar value that first found the profile.
networkTypestring or nullGives followers, following, or retweeters when a network run found the profile.
resultPositioninteger or nullGives the profile's place in the source results, when available.

Example profile row from a successful current-beta run

{
"rowType": "profile",
"profileId": "4398626122",
"profileUrl": "https://x.com/OpenAI",
"handle": "OpenAI",
"displayName": "OpenAI",
"bio": "OpenAI’s mission is to ensure that artificial general intelligence benefits all of humanity. We’re hiring: https://t.co/dJGr6LgzPA",
"createdAt": "2015-12-06T22:51:08.000Z",
"location": null,
"avatarUrl": "https://pbs.twimg.com/profile_images/1885410181409820672/ztsaR0JW_normal.jpg",
"bannerUrl": "https://pbs.twimg.com/profile_banners/4398626122/1777662919",
"followersCount": 5142713,
"followingCount": 4,
"postsCount": 2091,
"likesCount": 2458,
"isVerified": true,
"pinnedPostIds": [
"2092300846675505602"
],
"resultPosition": 1,
"sourceInput": "OpenAI"
}

Example network-member row from a successful current-beta run

{
"rowType": "profile",
"profileId": "33836629",
"profileUrl": "https://x.com/karpathy",
"handle": "karpathy",
"displayName": "Andrej Karpathy",
"bio": "deep learning",
"createdAt": "2009-04-21T06:49:15.000Z",
"location": "Earth",
"avatarUrl": "https://pbs.twimg.com/profile_images/1296667294148382721/9Pr6XrPB_normal.jpg",
"bannerUrl": "https://pbs.twimg.com/profile_banners/33836629/1407117611",
"followersCount": 4065882,
"followingCount": 1133,
"postsCount": 10143,
"likesCount": 24542,
"isVerified": true,
"pinnedPostIds": [],
"resultPosition": 1,
"networkType": "followers",
"sourceInput": "@openai followers"
}

Trend row

FieldTypeWhat it does
rowTypestringMarks this row as a trend.
trendNamestringGives the topic name.
trendRankintegerGives 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.
regionIdstringGives the selected trend region ID.
regionNamestringGives 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.

Example trend row from a successful current-beta run

{
"rowType": "trend",
"trendName": "#الهلال_الاهلي",
"trendRank": 1,
"trendQuery": "%23%D8%A7%D9%84%D9%87%D9%84%D8%A7%D9%84_%D8%A7%D9%84%D8%A7%D9%87%D9%84%D9%8A",
"trendSearchUrl": "https://x.com/search?q=%23%D8%A7%D9%84%D9%87%D9%84%D8%A7%D9%84_%D8%A7%D9%84%D8%A7%D9%87%D9%84%D9%8A",
"regionId": "1",
"regionName": "Worldwide",
"regionCountry": "Worldwide",
"regionCountryCode": null
}

💳 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 first sourceInput value for that row.

Can one run use more than one result type?

No. Choose posts, profiles, network members, or trends for each run. Inputs for other result types are ignored.

What happens if X stops returning pages during a run?

The run can finish with rows already saved and a degraded-result reason. Invalid input remains a separate error.

How do I fetch one post without fetching its thread?

Use directPostUrls for an exact public post URL or numeric ID. 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 or profileLookupTargets to find public accounts. Choose networkMembers with networkProfileHandles for Followers or Following, or retweeterPostUrlsOrIds for Post retweeters.

Can I collect a full historical archive?

No. The Actor returns public data that X exposes for the selected source. It does not promise complete historical coverage.

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

v2.0 (01-09-2026)

  • Added direct public profile lookup by handle, profile URL, or ID.
  • Added public post retweeter collection as a profile network option.
  • Added author-verification filters for post searches.
  • Standardized result provenance as sourceInput and simplified the public result fields.
  • Recoverable X source failures now finish successfully with preserved rows and a truthful degraded-result warning.

v1.0

  • 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é