Twitter (X) Scraper
Pricing
$1.40 / 1,000 public data
Twitter (X) Scraper
Collect public X posts, profiles, network members, and trends by region or city. Filter posts by date, language, media, links, and engagement. Save the data to an Apify dataset without X credentials.
Pricing
$1.40 / 1,000 public data
Rating
5.0
(1)
Developer
Maxime Dupré
Maintained by CommunityActor stats
2
Bookmarked
387
Total users
35
Monthly active users
9 days ago
Last modified
Categories
Features
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 trends by region or city. Get text, links, authors, media, engagement counts, and source details as structured dataset rows without giving the Actor your Twitter/X login.
- Find public posts with the Twitter API task.
- Collect public posts for a topic with the Apify Twitter scraper task.
- Build a small public-data workflow with the Twitter scraper Python task.
- Collect image posts with the Twitter image scraper task.
- Read saved public rows in code with the Twitter scraper API task.
- Find public accounts by name or topic with Twitter profile search.
- Track popular topics with the Twitter trends scraper task.
📦 Public posts, profiles, networks, and trends
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
- Choose one
targetfor the run. - Add the matching search, profile, network, or trend input.
- Set any filters and
maxNbItemsToScrape. - 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, filters, or date and place limits. Profile search finds public accounts by search phrase or direct target. Profile options also collect followers, followed accounts, or public post retweeters. Trends mode returns topics for one region or for supported cities. For a region, you can get the newest list or recent lists. Leave the work limit empty to collect available results until the source runs out or you reach the charge limit.
⚙️ Input
Input fields
Only fields for the chosen target affect that run.
| Field | Type | What it does |
|---|---|---|
target | string | Required. Choose searchPosts, searchProfiles, or trendingTopics. The form prefills searchPosts; there is no schema default. Network members are Profiles options. |
postDiscoveryMethod | string | Choose searchQuery (default), directPosts, conversationIds, or sourceUrls. Other post-finding inputs are ignored. |
searchQuery | string[] | Uses plain text or X search syntax. Each entry is one full query. X allows 512 characters including filters. You can omit searchQuery if you set placeId or give at least one value in fromUsers, toUsers, mentions, or hashtags. The form prefills OpenAI; there is no schema default. |
directPostUrls | string[] | Fetches the exact public posts at the submitted X or Twitter URLs or numeric IDs. |
conversationIds | string[] | Finds public posts that belong to the submitted conversations. |
postSearchUrls | string[] or object[] | Uses public search, profile, list, or conversation URLs as post sources. Each entry is a URL string or an object with url. Search URLs need q with the search text. You can leave f blank or use live or top. Set the run order with searchMode. Leave pf and lf blank. Search text and added filters share the 512-character limit. |
hashtags | string[] | Keeps posts that contain the submitted hashtags. Enter each tag without #. Each tag uses its length plus up to 5 characters of the shared 512-character search limit. |
fromUsers | string[] | Keeps posts written by the submitted handles. Enter each handle without @. |
authorVerification | string | Choose any (default), verified, or notVerified. Verification includes X Premium status. |
mentions | string[] | Keeps posts that mention the submitted handles. Enter each handle without @. Each handle uses its length plus up to 5 characters of the shared 512-character search limit. |
toUsers | string[] | Keeps posts addressed to the submitted handles. Enter each handle without @. Each handle uses its length plus up to 7 characters of the shared 512-character search limit. |
searchMode | string | Choose latest (schema default), top, or latestAndTop. The form prefills latestAndTop. The combined mode saves each post once. |
startDate | string | Keeps posts on or after this date. The date applies along with any date bounds in the query. If omitted, search starts 30 days ago unless a since: date applies to the whole query. An until: date alone still uses that 30-day start. Use a date or a UTC date-time. Direct post lookup ignores search filters. |
endDate | string | Keeps posts on or before this date or UTC date-time. A date includes its full day. This field applies along with any date bounds in the query. If omitted, this field adds no end bound. |
language | string | Keeps posts with this language code, such as en, es, fr, or ja. |
placeId | string | Sets an X or Twitter place ID. |
links | string | Choose include (default), onlyLinks, or onlyWithoutLinks. |
media | string | Choose include (default), onlyMedia, onlyImages, or onlyVideos. Videos include GIFs. |
postKinds | string[] | Choose one or more of originalPosts, quotePosts, replies, and reposts. The first three are the default. |
minLikes | integer | Keeps posts with at least this many likes. Minimum 0; omit for no likes filter. |
minReplies | integer | Keeps posts with at least this many replies. Minimum 0; omit for no reply filter. |
minRetweets | integer | Keeps posts with at least this many reposts. Minimum 0; omit for no repost filter. |
sinceId | string | Keeps posts after this X post ID. Use digits only. |
maxId | string | Keeps posts at or before this X post ID. Use digits only. |
profileDiscoveryMethod | string | Choose searchPhrases (default), directTargets, followers, following, or retweeters. |
profileSearchQueries | string[] | Finds public profiles by phrase, such as a name or topic. A lone @handle or a single-profile URL is searched as the handle. Each phrase can use up to 500 bytes. For exact lookup by handle, profile URL, or user ID, use profileLookupTargets with directTargets. |
profileLookupTargets | string[] | Sets handles, URLs, or numeric user IDs for directTargets, followers, or following. Enter handles without @. |
retweeterPostUrlsOrIds | string[] | Sets public post URLs or IDs whose public retweeter profiles to collect. |
includeArchivedVerificationHistory | boolean | Adds available past verification details for Profiles. Default false. Under the local pricing configuration, you pay per profile that gets past entries. This can make the run take much longer. Current verification details and dates remain available when off. |
maxPastVerificationEntriesPerProfile | integer | With past verification details on, saves up to this many past entries per profile, where available. Default 10; minimum 0. Use 0 for all available entries, which can take hours for well-known accounts. Off means no past entries, whatever the limit. |
includeUsernameHistory | boolean | Adds available past handles, handle change times, or first and last seen dates. Default false. Under the local pricing configuration, a profile with any history gets an extra charge. |
maxUsernameHistoryEntriesPerProfile | integer | With username history on, saves up to this many past handles per profile. Default 10; minimum 0. Use 0 for all available handles. Off means no past handles, whatever the limit. |
includeUsernameChangeCount | boolean | Adds the number of handle changes for each profile when available. Default false. Under the local pricing configuration, you pay for each profile that gets a count. |
includeAccountRegion | boolean | Adds the country X shows for the profile or any available accuracy details. Default false. Under the local pricing configuration, only a profile that gets a country gets an extra charge. |
includeConnectionSource | boolean | Adds the app or web source X shows for the profile when available. Default false. Under the local pricing configuration, you pay for each profile that gets this detail. |
transformFunction | string | Optional JavaScript function that takes one row as item and returns one object, such as (item) => ({ ...item, label: "X" }). It applies to every result type. The returned row must keep the required fields, their types, and the same rowType, or the run stops with an input error. Leave it empty to keep rows as they are. |
trendDiscoveryMethod | string | Choose region (default) or city. The other method’s fields are ignored. |
trendRegionId | string | Chooses one of the region IDs in the input form. Default 1 means Worldwide. |
trendListScope | string | For region, choose newest (default) or recent. Recent gets up to 24 lists, including the newest, from less than a full day. Times vary and topics can repeat. |
trendCities | object[] | For city, enter one or more objects with city and country names. Use the exact names for a supported pair. Enter the country name, such as Japan, instead of a code such as JP. City mode gets current trends. |
maxNbItemsToScrape | integer | Stops after this many saved rows across the run. Minimum 0. Omit or use 0 for all available results until the source is exhausted or the charge limit is reached. The form prefills 10; there is no schema default. |
Example input
Use this public input from a beta run that saved 10 rows with the default post search.
{"maxNbItemsToScrape": 10,"postDiscoveryMethod": "searchQuery","searchMode": "latestAndTop","searchQuery": ["OpenAI"],"target": "searchPosts","authorVerification": "any","links": "include","media": "include","postKinds": ["originalPosts","quotePosts","replies"],"profileDiscoveryMethod": "searchPhrases","includeArchivedVerificationHistory": false,"maxPastVerificationEntriesPerProfile": 10,"includeUsernameHistory": false,"maxUsernameHistoryEntriesPerProfile": 10,"includeAccountRegion": false,"trendRegionId": "1","includeUsernameChangeCount": false,"includeConnectionSource": false,"trendDiscoveryMethod": "region","trendListScope": "newest"}
Use a query or one of the filters listed in the searchQuery row. The other methods need values in their own fields: directPostUrls, conversationIds, or postSearchUrls. Each supplied list needs at least one value. Profile searches need a search phrase or direct target. Followers and Following need profile targets; Post retweeters needs post URLs or IDs. Region trends use the chosen region and list scope. City trends use the city list. Omit unused filters to leave them off. Direct post lookup fetches the submitted posts without the search filters.
🧾 Output
Output fields
| Field | Type | What it does |
|---|---|---|
rowType | string | Marks this row as a post. |
postId | string | Gives the X post ID. |
postUrl | string | Gives the public link to the X post. |
postText | string | Gives the full post text. |
postDateTime | string | Gives the publication time as a date-time string. |
language | string | Gives the post language code. |
authorId | string or null | Gives the author profile ID, when available. |
authorHandle | string or null | Gives the author handle without @, when available. |
authorDisplayName | string or null | Gives the author's display name, when available. |
authorBio | string or null | Gives the author's public profile bio, when available. |
authorLocation | string or null | Gives the author's public profile location, when available. |
authorAvatarUrl | string or null | Gives the author's avatar image link, when available. |
authorFollowersCount | integer or null | Gives the author's follower count, when available. |
authorFollowingCount | integer or null | Gives the author's following count, when available. |
authorCreatedAt | string or null | Gives the author account creation time, when available. |
authorIsVerified | boolean or null | Says whether the author is verified, when available. |
authorIsBlueVerified | boolean or null | Says whether the author has X Premium verification, when available. |
authorVerifiedType | string or null | Gives the author's verification type, when available. |
nbLikes | integer or null | Gives the number of likes, when available. |
nbReposts | integer or null | Gives the number of reposts, when available. |
nbReplies | integer or null | Gives the number of replies, when available. |
quoteCount | integer or null | Gives the number of quotes, when available. |
nbViews | integer or null | Gives the number of views, when available. |
nbBookmarks | integer or null | Gives the number of bookmarks, when available. |
mediaDetails | object[] | Lists each media file and its available details. |
mediaDetails.id | string or null | Gives the media ID, when available. |
mediaDetails.altText | string or null | Gives the media alt text, when available. |
mediaDetails.type | string | Gives the media kind. |
mediaDetails.url | string | Gives the main media file link. |
mediaDetails.thumbnailUrl | string or null | Gives a preview image link, when available. |
mediaDetails.width | integer or null | Gives the media width in pixels, when available. |
mediaDetails.height | integer or null | Gives the media height in pixels, when available. |
mediaDetails.durationMs | integer or null | Gives the media length in milliseconds, when available. |
mediaDetails.aspectRatio | string or null | Gives the media shape, when available. |
mediaDetails.contentType | string or null | Gives the media file type, when available. |
mediaDetails.variants | object[] | Lists other video file choices, when available. |
mediaDetails.variants.url | string | Gives a video choice link. |
mediaDetails.variants.contentType | string or null | Gives a video choice file type, when available. |
mediaDetails.variants.bitrate | integer or null | Gives a video choice bitrate, when available. |
hashtags | string[] | Lists hashtags without #. |
linkEntities | string[] | Lists usable destination links found in the post. |
quotedPostId | string or null | Gives the quoted post ID, when available. |
quotedPostText | string or null | Gives the quoted post text, when available. |
quotedAuthorHandle | string or null | Gives the quoted post author's handle, when available. |
replyToHandle | string or null | Gives the handle this post replies to, when available. |
replyToPostId | string or null | Gives the post ID this post replies to, when available. |
conversationId | string or null | Gives the conversation ID, when available. |
isPinned | boolean or null | Says whether X marks the post as pinned, when available. |
source | string or null | Gives the app label used to publish the post, when available. |
sourceInput | string or null | Gives the submitted query, URL, ID, or similar value that first found the post. |
poll | object or null | Gives available poll choices and vote details. |
poll.choices | object[] | Lists poll choices in their shown order. |
poll.choices.label | string | Gives the choice text. |
poll.choices.voteCount | integer or null | Gives X's vote count for the choice. |
poll.countsAreFinal | boolean or null | Says whether X marks the counts as final. |
poll.closesAt | string or null | Gives the poll closing time. |
article | object or null | Gives available X article content linked to the post. |
article.imageUrls | string[] | Lists image links from the X article, when available. |
article.title | string or null | Gives the article title. |
article.text | string or null | Gives the article text. |
article.url | string or null | Gives the public article link. |
article.publishedAt | string or null | Gives the article publication time. |
article.updatedAt | string or null | Gives the last change time. |
repostedPost | object or null | Gives the original post shared by a repost. |
repostedPost.postId | string or null | Gives the original post ID. |
repostedPost.postUrl | string or null | Gives the original post link. |
repostedPost.postText | string or null | Gives the original post text. |
repostedPost.postDateTime | string or null | Gives the original publication time. |
repostedPost.authorId | string or null | Gives the original author's ID. |
repostedPost.authorHandle | string or null | Gives the original author's handle. |
repostedPost.authorDisplayName | string or null | Gives the original author's display name. |
repostedPost.nbLikes | integer or null | Gives the original post’s number of likes, when available. |
repostedPost.nbReposts | integer or null | Gives the original post’s number of reposts, when available. |
repostedPost.nbReplies | integer or null | Gives the original post’s number of replies, when available. |
repostedPost.quoteCount | integer or null | Gives the original post’s number of quotes, when available. |
repostedPost.nbBookmarks | integer or null | Gives the original post’s number of bookmarks, when available. |
repostedPost.nbViews | integer or null | Gives the original post’s number of views, when available. |
mentions | object[] | Lists accounts mentioned in the post. |
mentions.profileId | string or null | Gives the mentioned account ID. |
mentions.handle | string or null | Gives the mentioned handle without @. |
mentions.displayName | string or null | Gives the mentioned account name. |
place | object or null | Gives place details attached to the post by X. |
place.id | string or null | Gives the X place ID. |
place.name | string or null | Gives the place name. |
place.fullName | string or null | Gives the full place name. |
place.type | string or null | Gives the kind of place. |
place.country | string or null | Gives the country name. |
place.countryCode | string or null | Gives the country code. |
place.boundingBox | object or null | Gives the area around the place. |
place.boundingBox.type | string or null | Gives the geometry type. |
place.boundingBox.coordinates | number[][][] | Gives boundary rings of longitude and latitude points. |
Example post row from a successful current-beta run
{"rowType": "post","postId": "2125641758432284978","postUrl": "https://x.com/NASA/status/2125641758432284978","postText": "Medicine or engineering? Military or civilian? We're looking for a variety of backgrounds to join our astronaut corps as we journey to the Moon, Mars, and beyond.\n\nApplications for our next class of astronauts close in one week! Apply by Dec. 3: https://t.co/CaW5MpcrAd https://t.co/6ZcRo0kJA7","postDateTime": "2026-11-25T17:24:22.000Z","language": "en","authorId": "11348282","authorHandle": "NASA","authorDisplayName": "NASA","authorBio": "Making the seemingly impossible, possible. ✨","authorLocation": "Pale Blue Dot","authorAvatarUrl": "https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB_normal.jpg","authorFollowersCount": 92085739,"authorFollowingCount": 115,"authorCreatedAt": "2007-12-19T20:20:32.000Z","authorIsVerified": true,"authorIsBlueVerified": true,"authorVerifiedType": "Government","nbLikes": 3082,"nbReposts": 538,"nbReplies": 282,"quoteCount": 69,"nbViews": 763751,"nbBookmarks": 305,"mediaDetails": [{"id": "2125641730489782272","type": "video","url": "https://video.twimg.com/amplify_video/2125641730489782272/vid/avc1/1920x1080/k-Yu6xwkBjwzaNXJ.mp4?tag=16","thumbnailUrl": "https://pbs.twimg.com/media/HX_L6d4WoAAWOU-.jpg","width": 720,"height": 405,"durationMs": 17664,"aspectRatio": "16:9","contentType": "video/mp4","variants": [{"url": "https://video.twimg.com/amplify_video/2125641730489782272/vid/avc1/1920x1080/k-Yu6xwkBjwzaNXJ.mp4?tag=16","contentType": "video/mp4","bitrate": 10368000},{"url": "https://video.twimg.com/amplify_video/2125641730489782272/vid/avc1/1280x720/M05p1UXa9QPrz8Yo.mp4?tag=16","contentType": "video/mp4","bitrate": 2176000},{"url": "https://video.twimg.com/amplify_video/2125641730489782272/vid/avc1/640x360/hXPmmTKys4eG9kH8.mp4?tag=16","contentType": "video/mp4","bitrate": 832000},{"url": "https://video.twimg.com/amplify_video/2125641730489782272/vid/avc1/480x270/z6iD_plry7pkXL76.mp4?tag=16","contentType": "video/mp4","bitrate": 288000}]}],"hashtags": [],"linkEntities": ["https://go.nasa.gov/astro2026"],"mentions": [],"conversationId": "2125641758432284978","isPinned": false,"sourceInput": "-filter:retweets from:NASA OR from: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.
| Field | Type | What it does |
|---|---|---|
rowType | string | Marks this row as a profile. |
profileId | string | Gives the profile ID. |
handle | string | Gives the profile handle without @. |
displayName | string | Gives the profile display name. |
bio | string or null | Gives the public profile bio, when available. |
createdAt | string or null | Gives the account creation time, when available. |
location | string or null | Gives the public profile location, when available. |
avatarUrl | string or null | Gives the profile avatar image link, when available. |
bannerUrl | string or null | Gives the profile banner image link, when available. |
followersCount | integer or null | Gives the public follower count, when available. |
followingCount | integer or null | Gives the public following count, when available. |
postsCount | integer or null | Gives the public post count, when available. |
likesCount | integer or null | Gives the public like count, when available. |
isVerified | boolean or null | Says whether X marks the profile as verified. |
pinnedPostIds | string[] | Gives the shown pinned post IDs. |
sourceInput | string or null | Gives the submitted query, handle, URL, ID, or similar value that first found the profile. |
networkType | string or null (optional) | Gives followers, following, or retweeters. Only network rows include it. |
websiteUrl | string or null | Gives the profile website link. |
mediaCount | integer or null | Gives the number of media posts. |
listedCount | integer or null | Gives the number of public lists that include the profile. |
isBlueVerified | boolean or null | Says whether the profile has X Premium verification. |
verifiedType | string or null | Gives the verification type. |
verificationReason | string or null | Gives X’s reason for the checkmark, when available. |
professional | object or null | Gives professional account details. |
professional.type | string or null | Gives the professional account type. |
professional.categories | string[] | Lists professional categories. |
restrictions | object or null | Gives public access limits. |
restrictions.isProtected | boolean or null | Says whether posts are limited to approved followers. |
restrictions.withheldCountries | string[] | Lists country codes where X withholds the account. |
restrictions.withheldScope | string or null | Gives the scope of the access limit. |
accountRegion | object or null (optional) | Gives public account-region details when includeAccountRegion is on. Absent when it is off. |
accountRegion.country | string or null | Gives the stated country or region. |
accountRegion.accuracy | string or null | Gives X's description of region accuracy. |
usernameChangeCount | integer or null (optional) | Gives the number of handle changes when includeUsernameChangeCount is on and a count is available. |
connectedVia | string or null (optional) | Gives the app or web source shown by X when includeConnectionSource is on and the detail is available. |
usernameHistory | object[] (optional) | Lists past username details. Present only when includeUsernameHistory is on and entries are available. |
usernameHistory.handle | string or null | Gives a past handle without @. |
usernameHistory.changedAt | string or null | Gives the reported username change time. |
usernameHistory.firstSeenDate | string or null | Gives the first known date the account used the handle. |
usernameHistory.lastSeenDate | string or null | Gives the last known date the account used the handle. |
verificationHistory | object[] | Lists current verification details and any requested past entries. Past entries depend on the history switch and maxPastVerificationEntriesPerProfile. |
verificationHistory.verifiedType | string or null | Gives the verification type for an entry. |
verificationHistory.verifiedAt | string or null | Gives the reported verification start time. |
Example profile row with username history
{"rowType": "profile","profileId": "66369181","handle": "DeptofWar","displayName": "Department of War 🇺🇸","bio": "Official U.S. Department of War X account.","createdAt": "2009-08-17T14:43:00.000Z","location": "The Pentagon, Washington, D.C.","avatarUrl": "https://pbs.twimg.com/profile_images/1965912244262170624/7NoruMt1_normal.jpg","bannerUrl": "https://pbs.twimg.com/profile_banners/66369181/1757107269","websiteUrl": "http://War.gov","followersCount": 7561637,"followingCount": 642,"postsCount": 44732,"likesCount": 6019,"mediaCount": 16493,"listedCount": 18052,"isVerified": true,"isBlueVerified": true,"verifiedType": "Government","verificationReason": "This account is verified because it is a government or multilateral organization account. Learn more","pinnedPostIds": [],"professional": {"type": "Business","categories": []},"restrictions": {"isProtected": false,"withheldCountries": []},"verificationHistory": [{"verifiedAt": "2010-01-15T18:13:10.370Z"}],"usernameHistory": [{"changedAt": "2025-09-05T20:36:09.299Z"},{"handle": "DeptofDefense","firstSeenDate": "2011-09-29","lastSeenDate": "2025-09-05"}],"sourceInput": "66369181"}
Example network-member row from a successful current-beta run
{"rowType": "profile","profileId": "17471979","handle": "NatGeo","displayName": "National Geographic","bio": "Step into wonder and find your inner explorer with National Geographic 🌎","createdAt": "2008-11-18T21:28:10.000Z","location": "Global","avatarUrl": "https://pbs.twimg.com/profile_images/2050149546685022208/72MxNUv-_normal.jpg","bannerUrl": "https://pbs.twimg.com/profile_banners/17471979/1789591798","websiteUrl": "http://www.nationalgeographic.com","followersCount": 28069279,"followingCount": 178,"postsCount": 73775,"likesCount": 7568,"mediaCount": 8638,"listedCount": 58982,"isVerified": true,"isBlueVerified": true,"verifiedType": "Business","verificationReason": "This account is verified because it's an official organization on X. Learn more","pinnedPostIds": ["2121317172936954057"],"restrictions": {"isProtected": false,"withheldCountries": []},"verificationHistory": [{"verifiedAt": "2012-09-26T16:57:26.471Z"}],"sourceInput": "NASA","networkType": "followers"}
Region trend row
| Field | Type | What it does |
|---|---|---|
rowType | string | Marks this row as a trend. |
trendName | string | Gives the topic name. |
trendRank | integer | Gives its rank in the region. |
trendListDateTime | string or null | Gives the time of the trend list, when available. |
trendQuery | string or null | Gives the search query, when available. |
trendSearchUrl | string | Gives the X search link for the trend. |
regionId | string | Gives the selected region ID for region trends. |
regionName | string | Gives the selected region name for region trends. |
regionCountry | string or null | Gives the country or global label for the region. |
regionCountryCode | string or null | Gives the ISO country code, or null for Worldwide. |
Example region trend row from a successful current-beta run
{"trendName": "Cumhurbaşkanı Yardımcısı","trendListDateTime": "2026-11-26T17:40:00.639Z","trendQuery": "Cumhurbaşkanı Yardımcısı","trendSearchUrl": "https://twitter.com/search?q=Cumhurba%C5%9Fkan%C4%B1%20Yard%C4%B1mc%C4%B1s%C4%B1","trendRank": 1,"rowType": "trend","regionId": "23424969","regionName": "Turkey","regionCountry": "Turkey","regionCountryCode": "TR"}
City trend row
| Field | Type | What it does |
|---|---|---|
rowType | string | Marks this row as a trend. |
trendName | string | Gives the topic name. |
trendRank | integer | Gives its rank in the city. |
trendListDateTime | string or null | Gives the time of the trend list, when available. |
trendQuery | string or null | Gives the search query, when available. |
trendSearchUrl | string | Gives the X search link for the trend. |
cityName | string | Gives the selected city name for city trends. |
regionCountry | string | Gives the city's country. |
regionCountryCode | string (optional) | Gives the ISO country code, when available. |
Example city trend row from a successful current-beta run
{"trendName": "#超特急_Signal","trendListDateTime": "2026-11-26T17:04:11.481Z","trendQuery": "#超特急_Signal","trendSearchUrl": "https://twitter.com/search?q=%23%E8%B6%85%E7%89%B9%E6%80%A5_Signal","trendRank": 1,"rowType": "trend","cityName": "Tokyo","regionCountry": "Japan","regionCountryCode": "JP"}
Each run returns rows for one chosen target shape. Network-member runs use the profile shape. Optional fields can be absent or null when X does not provide them. With transformFunction, rows can also hold the extra fields your function adds.
💳 Pricing
This Actor uses pay-per-event pricing. Each saved public post, profile, network member, or trend is one billable event. Set a small work limit for a first test, then raise it when you need more rows.
The live Apify Store schedule charges $0.0014 per saved row. This is its only charge. Check the Pricing tab before you run.
Local pricing configuration
The Actor’s local configuration sets a $0.005 run start charge, even for a run with no rows, and $0.0001 per saved post, profile, network member, or trend.
The local configuration also sets the following charges. Each switch can add one charge per profile. They are off by default.
- Verification history costs $0.0005 for past verification entries from
includeArchivedVerificationHistory. - Username history costs $0.0002 when
includeUsernameHistoryadds any history. This can be a change time on its own or a past handle with dates, when known. - Account region costs $0.0002 when
includeAccountRegionadds a country. Accuracy details alone do not add a charge. - Rename count costs $0.0001 for the number of handle changes from
includeUsernameChangeCount. - Connection source costs $0.0001 for the app or web source from
includeConnectionSource.
🔌 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 Actor keeps valid saved rows and continues with other submitted values. It warns when a value cannot finish. If source access fails and no submitted value completes, the run fails. Each saved row is billed once. A successful empty run can mean no matches, unavailable public content, or a handled input problem. Read the run warnings for the reason.
How do I fetch one post without fetching its thread?
Use directPostUrls for an exact public post URL or numeric ID. Use conversationIds when you want posts from a conversation.
How do I search profiles or collect a network?
Choose searchProfiles. Use searchPhrases with profileSearchQueries to look for a name or topic. If you know the exact handle, profile URL, or user ID, use directTargets with profileLookupTargets. For networks, choose followers or following with profileLookupTargets, or retweeters with retweeterPostUrlsOrIds.
Can I get earlier trend lists for a city?
City mode returns the current list. The recent option returns earlier lists for the selected region. Use the list time and rank to compare topics across those lists.
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 available results until the source runs out or you reach the charge limit. 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
v6.0 (26-11-2026)
- Removed the
quotedPostIdsinput and thequotedPostIdschoice inpostDiscoveryMethod. This way to find posts that quote a given post is no longer available. Remove the key and choose a supported search method. There is no direct replacement. - Removed
includeDirectMessagePermissionandcanReceiveDirectMessages. The Actor no longer checks if a profile accepts direct messages. There is no replacement. Remove the input from saved runs and the field from exports. - Removed
includePostClientLabel. Thesourcefield now uses only the posting app label X includes with the post. Runs with the old switch off can now get a label. A post that had a label before can now returnnullif X leaves it out or clears it. Remove the switch from saved inputs and allow both a label andnullin exports. There is no switch to get the old result. - Removed
resultPositionfrom post and profile rows. The Actor no longer reports where a result appeared in the list it came from. There is no replacement. Remove the field from exports. - Removed
inReplyToUserIdfrom post rows. The Actor no longer reports the ID of the user a post replies to. There is no replacement. Remove the field from exports. - Removed
postKindfrom post rows. ThepostKindsinput still filters post searches, but it does not label each row. RemovepostKindfrom exports. There is no replacement field. - Past
verificationHistoryentries can change or disappear. The Actor no longer uses badge color to reportblue verified badgeorgold verified badge. A badge on some older profile pages still gives a generalverifiedentry when the page confirms it belongs to that profile. Update exports to accept the general label and allow for missing entries. - Get the latest X trends for one or more covered cities. Set
trendDiscoveryMethodtocityand give each city and country intrendCities. City rows usecityNameandregionCountryin place ofregionIdandregionName. - For region trends, set
trendListScopetorecentto get up to 24 lists, including the latest one. Region rows can also include the country name inregionCountry. Trend rows includetrendListDateTimeso you can tell the lists apart. - Trend rows leave out
trendQuerywhen the link has no search text. Update exports to accept a missing field where they used to getnull. - The same trend name can now appear more than once for a location, even in one list. If you need one row per name for each location, group your results by location and
trendName. - Turn on
includeUsernameChangeCountto addusernameChangeCount, the number of handle changes X shows. You pay per profile that gets a count. - Turn on
includeConnectionSourceto addconnectedVia, the app or web source X shows for the profile. You pay per profile that gets this detail. usernameHistorycan now includefirstSeenDateandlastSeenDatefor past handles. These dates show when the handle was seen. A past-handle entry now leaves outchangedAt, and a change-time entry leaves outhandle, where both used to givenull. Update exports to accept missing keys.maxUsernameHistoryEntriesPerProfilenow limits past handles only. Allow for one extra entry when a change time is available.- Profile rows now include
verificationReasonwhen X provides it. - When X includes the original post in a repost, the row uses the original’s text, media, poll, hashtags, links, mentions, quote details, and article. Otherwise it uses the returned post’s content.
repostedPostnow includes available like, repost, reply, bookmark, quote, and view counts for the original post.authorIsVerifiedandisVerifiedcan now betruewhen X reports a government or organization checkmark.isPinnednow uses X’s pinned-post list when it is available.- When X only gives the older form of post text, the Actor now reads
&,<, and>as&,<, and>. restrictions.withheldScopecan now benulleven when a profile is withheld in some countries. Update exports to acceptnullwhere they used to getuserwhen X did not give a scope.- Runs now use 128 MB of memory by default when the item limit is 1 to 1024, past verification is off, and past handles are off or limited to 1 to 10 per profile. Other runs use 1024 MB by default. The range is now 128 to 2048 MB.
- Each saved post, profile, network member, or trend now costs $0.0001, down from $0.0014 per row. Each run now has a $0.005 start fee. Extra profile details are billed separately.
- If you leave
startDateempty, asince:date that applies to the full post query can now set the start. Anuntil:date alone keeps the 30-day default start. When you enterstartDateorendDate, the search also applies dates from the query and uses the tighter bounds. Check saved searches that use both kinds of dates. - Profile search now uses the handle when a search phrase is a single
@handleor X profile URL. It treats commas in other phrases as spaces. Check saved phrases that use commas. - Reliability improvements.
v5.0 (28-10-2026)
- Profile region, past handles, and direct message permission are now off by default. Each one is charged per profile that gets it. To keep them, set
includeAccountRegion,includeUsernameHistory, orincludeDirectMessagePermissiontotrue. When off,accountRegionis absent,usernameHistoryis empty, andcanReceiveDirectMessagesisnull. - The post client app label in
sourceis now off by default. It is charged per post that gets a label. To keep it, setincludePostClientLabeltotrue. When off,sourceisnull. - Added
maxUsernameHistoryEntriesPerProfileto limit past handles per profile. The default is 10. Use 0 for all available handles. - Past verification details from
includeArchivedVerificationHistoryare now charged per profile that gets past entries. - A handle with no public profile is now reported as no match, and the run goes on instead of failing.
- Runs now use 512 MB of memory by default when
maxNbItemsToScrapeis 1 to 1024 andincludeArchivedVerificationHistoryis off. Other runs still use 1024 MB. The range is now 512 to 2048 MB. - Reliability improvements.
v4.0 (27-10-2026)
- Renamed input
archivedVerificationHistoryLimittomaxPastVerificationEntriesPerProfileto match its form label. The old key no longer works. Move your value to the new key. When it is left empty, the default is now 10 entries per profile instead of 3. Use 0 for all available entries. - Added
transformFunctionto change every result row with your own JavaScript function. - Added
article.imageUrlswith image links from X articles. - Removed
authorProfileUrlandprofileUrlfrom the result schema and the Overview table, because runs did not fill them. There is no replacement field. UseauthorHandleorhandleto build the profile link. - Runs now use 1024 MB of memory by default, with a range of 1024 to 2048 MB.
- Missing or deleted posts are now skipped as unavailable instead of failing the run.
- Profile runs now say at the start that the first profile can take a few minutes.
- Reliability improvements.
v3.0 (25-10-2026)
searchQuerynow takes a list so one run can search several queries. Change a string such as"OpenAI"to["OpenAI"].- Network collection is now part of Profiles. Replace
target: "networkMembers"withtarget: "searchProfiles". Replace the input keynetworkTypewithprofileDiscoveryMethod, usingfollowers,following, orretweeters. ReplacenetworkProfileHandleswithprofileLookupTargetsfor followers and following. KeepretweeterPostUrlsOrIdsfor retweeters. - Removed
nearandgeocodebecause matching locations could not be confirmed. Remove these keys from saved inputs. There is no place-name or radius replacement.placeIdfilters posts with an attached X place ID; it does not search a radius. - Added available poll results, article text, mentions, attached places, and original-post details for reposts to post rows.
- Added available profile region, website, message settings, professional details, restrictions, and verification and username history. Past badge details are off by default. Set
includeArchivedVerificationHistorytotrueto collect them.archivedVerificationHistoryLimitdefaults to 3 per profile; use 0 for all available entries. Current verification details are still collected with past badge details off. - Direct post lookup now also accepts numeric post IDs in
directPostUrls. maxNbItemsToScrapenow accepts 0 to collect all available matches.- Runs now use 256 MB of memory by default, with a range of 256 to 512 MB.
- Reliability improvements.
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.
- Changed post fields
searchQueryandsourceUrl, and profile fieldsearchQuery, tosourceInputto show the value that found each row. Update exports to readsourceInput. - Removed post field
sourceTypeand profile fieldnetworkOwnerHandleas result details were simplified. These fields have no direct replacement.sourceInputgives the submitted value, not its type or a separate network owner. Update exports that use the removed fields. - Removed trend field
tweetVolume, with no replacement. Remove it from exports. - Replaced input
directPostIdswithdirectPostUrlsfor direct post lookup. SetpostDiscoveryMethodtodirectPosts. Convert each ID to a full X post URL and put the URLs indirectPostUrls. - Improved handling of X source failures by preserving valid rows and clearly reporting when a run cannot finish.
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.
- Moved post media links from
imageUrls,videoUrls, andgifUrlsintomediaDetails. Update exports to read the media type and URL there. - Removed profile field
twitterUrl; useprofileUrlfor the public profile link. RemovedscrapedAtfrom profile and trend rows, with no replacement. Update exports that use these fields. - Removed inputs
withinandshouldIncludePromotedPosts, with no replacement. Remove these keys from saved inputs. - 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 that show which search found each profile.
v0.1
- Added Trending Topics and supported trend regions.
- Added grouped target inputs and pay-per-event pricing.
v0.0
- Initial release.
🆘 Support
For issues, questions, or feature requests, file a ticket and I'll fix or implement it in less than 24h 🫡
🔗 Related Actors
- Twitter Media Scraper gets source-hosted image, video, and GIF links from public X posts.
- Twitter Organization Affiliates Scraper maps public affiliate accounts connected to X organizations.
- X (Twitter) Community Top Posts Scraper collects public posts with X Community context.
- Twitter Article Scraper collects public X article text and publication details.
- X (Twitter) Replies Scraper collects public replies to selected posts.
Made with ❤️ by Maxime Dupré