X Twitter Posts Search
Pricing
$19.99/month + usage
X Twitter Posts Search
Search and extract posts from X (Twitter) by keyword, hashtag, or topic. Collect tweet text, usernames, timestamps, likes, reposts, replies, and more. Perfect for trend tracking, sentiment analysis, and social media research with clean, structured data output.
Pricing
$19.99/month + usage
Rating
0.0
(0)
Developer
ScrapeLabs
Actor stats
0
Bookmarked
2
Total users
0
Monthly active users
a day ago
Last modified
Categories
Share
X Twitter Posts Search
X Twitter Posts Search is an Apify actor that searches and extracts public posts from X (Twitter) by profile, keyword, or query. It solves the manual, time-consuming process of collecting tweet text, engagement metrics, author details, and media by delivering clean, structured records at scale. Built for marketers, developers, data analysts, and researchers, it powers trend tracking, sentiment analysis, and social media research with automated, reliable pipelines.
What data / output can you get?
Below are the exact fields the actor saves to the dataset for each post. Examples illustrate typical values.
| Data type | Description | Example value |
|---|---|---|
| id | Tweet ID (rest_id) | "1765432109876543210" |
| url | Direct link to the post | "https://x.com/wikipedia/status/1765432109876543210" |
| user_posted | Author username (handle) | "wikipedia" |
| name | Author display name | "Wikipedia" |
| description | Full post text | "Today in history: The first programmable computer..." |
| date_posted | ISO timestamp (UTC) | "2026-03-22T14:05:12.000Z" |
| likes | Like count | 128 |
| replies | Reply count | 42 |
| reposts | Repost count | 19 |
| quotes | Quote count | 7 |
| views | View/impressions count | 15432 |
| bookmarks | Bookmark count | 3 |
| is_verified | Author verified status | true |
| followers | Author followers count | 1234567 |
| following | Author following count | 12 |
| posts_count | Author total posts | 54321 |
| profile_image_link | Author avatar URL | "https://pbs.twimg.com/profile_images/.../avatar_normal.jpg" |
| biography | Author bio text | "Free encyclopedia that anyone can edit." |
| hashtags | Array of hashtags (without #) or null | ["history", "OTD"] |
| tagged_users | Array of mentioned usernames or null | ["exampleuser"] |
| photos | URL of a photo if present, else null | "https://pbs.twimg.com/media/abcd1234.jpg" |
| videos | Array of MP4 video URLs sorted by quality, else null | ["https://video.twimg.com/.../vid/720x1280/video.mp4"] |
| quoted_post | Quoted post summary object | {"data_posted":"2026-03-21T10:30:00.000Z","description":"Original post text","post_id":"1765000000000000001","profile_id":"6253282","profile_name":"Original Author","url":null,"videos":null} |
| external_url | Author profileโs external URL if set, else null | "https://www.wikipedia.org" |
| input | Source context for this row (query or URL) | {"searchQuery":"climate change"} |
Note: You can export your dataset in JSON, CSV, or Excel directly from Apify.
Key features
-
๐ Keyword, hashtag, and profile modes Query X via search (multi-word text or the โsearch:โ prefix) or collect timeline posts from profiles (URLs, @handles, or usernames). Single-tweet links (/status/โฆ) are intentionally skipped.
-
๐งญ Top vs Latest search modes Choose searchType "top" for popular/relevant ordering or "latest" for newest-first results. โLatestโ is ideal for time-sensitive monitoring.
-
โฑ๏ธ Time-window filtering (Latest) Combine searchType "latest" with timeWindow to keep only posts from the last N days (UTC) for both keyword searches and profile timelines.
-
๐งฑ Proxy-ready with automatic fallback Configure proxyConfiguration to use Apify Proxy. The actor can escalate proxy tiers when requests throw (e.g., to datacenter and then RESIDENTIAL) to mitigate network blocks.
-
๐ฅ Media-aware extraction Captures photos and MP4 video variants (sorted by bitrate), plus hashtags and mentions for richer analysis.
-
๐ Complete engagement & author metadata Collect likes, replies, reposts, quotes, views, bookmarks, and author fields like followers, following, posts_count, profile_image_link, biography, and is_verified.
-
๐ง Robust session bootstrapping Automatically launches a headless browser to capture a guest bearer token and current GraphQL operation IDs for reliable, login-free scraping.
-
๐ฆ Clean, structured dataset output Each record follows a consistent 25-field schema to streamline analysis, exports, and downstream integrations.
How to use X Twitter Posts Search - step by step
-
Create or log in to your Apify account Open the Apify Console to access the actor.
-
Add targets to startUrls Enter one target per row. Examples:
- "https://x.com/wikipedia"
- "@NASA"
- "climate change"
- "search: python from:NASA" Note: Links to a single tweet (/status/โฆ) are skipped.
-
Choose the Search mode Set searchType to "top" (default) or "latest" depending on your goal.
-
(Optional) Limit to recent posts If you need freshness, set timeWindow (days) and use searchType = "latest".
-
(Optional) Control volume Set maxTweets to cap how many posts are saved per target (1โ1000).
-
(Optional) Configure proxy Under proxyConfiguration, enable Apify Proxy. For X, residential IPs work best. The actor can escalate proxy tiers automatically if requests throw.
-
Start the run The actor bootstraps a session via Playwright, discovers GraphQL endpoints, and begins fetching results. Tweets are saved to the dataset as theyโre collected.
-
Export your data Open the runโs Dataset and export to JSON, CSV, or Excel for reporting, enrichment, or pipelines.
Pro tip: Multi-word inputs trigger a live search; a single word or profile URL targets that accountโs timeline. Use "search:" for advanced queries like search: python from:NASA.
Use cases
| Use case | Description |
|---|---|
| Social media analytics & reporting | Track engagement, hashtags, and content performance by collecting likes, replies, reposts, quotes, views, and bookmarks. |
| Trend & news monitoring | Monitor โLatestโ results within a defined timeWindow to capture breaking topics and real-time conversations. |
| Brand & competitor tracking | Aggregate timeline posts for specific accounts to benchmark messaging, cadence, and audience reactions. |
| Academic & market research | Build clean corpora of tweet text, hashtags, and metadata for sentiment analysis and topic modeling. |
| Campaign & hashtag analysis | Analyze keyword or hashtag searches at scale with structured outputs for BI dashboards. |
| API/ETL pipelines | Feed structured JSON into data warehouses or automation tools for enrichment, alerting, and downstream workflows. |
Why choose X Twitter Posts Search?
This actor focuses on precision, automation, and reliability for production data pipelines.
- โ Structured, consistent output with 25 well-defined fields
- ๐ Proxy-aware with automatic escalation to handle challenging networks
- โก Scales to 1โ1000 posts per target with pagination and cursor handling
- ๐งฐ Developer-friendly on Apify: datasets, exports, and SDK integrations
- ๐งช No login required: captures guest bearer + cookies in a headless session
- ๐๏ธ Media- and metadata-rich records for deeper analytics
- ๐งผ Cleaner than ad-hoc scripts or extensions, with fewer duplicates and noise
In short: a production-ready alternative to unstable browser plugins and manual scraping workflows.
Is it legal / ethical to use X Twitter Posts Search?
Yesโwhen used responsibly. This actor targets publicly available content on X (Twitter) and does not access private profiles or authenticated data.
Guidelines:
- Only collect public information and respect the platformโs terms.
- Comply with applicable regulations (e.g., GDPR, CCPA) when processing data.
- Avoid scraping private accounts or attempting to bypass protections.
- Validate your specific use case with your legal team if in doubt.
Input parameters & output format
Example input
{"startUrls": ["https://x.com/wikipedia","@NASA","climate change","search: python from:NASA"],"maxTweets": 50,"timeWindow": 3,"searchType": "latest","proxyConfiguration": {"useApifyProxy": true}}
Parameter details
-
startUrls (array, required)
- Description: Add one row per target. Works: https://x.com/username ยท @user ยท username ยท climate change ยท search: python from:NASA. Skipped: links to a single tweet (โฆ/status/123โฆ). Multi-word = search. One word / profile URL = that accountโs posts.
- Default: none
-
maxTweets (integer)
- Description: Cap how many posts to collect per URL, user, or keyword (1โ1000). Higher = longer run & more API load.
- Default: 10
- Min/Max: 1โ1000
-
timeWindow (integer)
- Description: Keep posts newer than this many days (UTC). Requires Search type โ Latest + a number here. Applies to keyword search and profile timelines. Leave empty if you want all posts up to Max posts.
- Default: none
- Minimum: 1
-
searchType (string, required; enum: top, latest)
- Description: Top โ popular/relevant ordering. Latest โ newest first (best for news + Time window). On profile runs this mainly changes sort order of saved posts.
- Default: "top"
-
proxyConfiguration (object)
- Description: Off = direct connection (fast, but X may block datacenter IPs). On = Apify Proxy โ pick groups in the proxy UI. The actor can escalate to other Apify proxy tiers if a request throws (network errors). For stubborn blocks, try RESIDENTIAL.
- Default: {"useApifyProxy": false}
Example output
[{"id": "1765432109876543210","url": "https://x.com/wikipedia/status/1765432109876543210","user_posted": "wikipedia","name": "Wikipedia","description": "Today in history: The first programmable computer was demonstrated. #history #OTD","date_posted": "2026-03-22T14:05:12.000Z","likes": 128,"replies": 42,"reposts": 19,"quotes": 7,"views": 15432,"bookmarks": 3,"is_verified": true,"followers": 1234567,"following": 12,"posts_count": 54321,"profile_image_link": "https://pbs.twimg.com/profile_images/1234567890/avatar_normal.jpg","biography": "Free encyclopedia that anyone can edit.","hashtags": ["history", "OTD"],"tagged_users": ["exampleuser"],"photos": "https://pbs.twimg.com/media/abcd1234.jpg","videos": ["https://video.twimg.com/amplify_video/1765432109876543210/vid/720x1280/sample.mp4"],"quoted_post": {"data_posted": "2026-03-21T10:30:00.000Z","description": "Original post text","post_id": "1765000000000000001","profile_id": "6253282","profile_name": "Original Author","url": null,"videos": null},"external_url": "https://www.wikipedia.org","input": {"searchQuery": "climate change"}}]
Notes:
- For search queries, input contains {"searchQuery": "..."}.
- For profile timelines, input contains {"url": "https://x.com/{screen_name}/status/{id}/"}.
- photos is a single image URL if present; videos is an array of MP4 URLs sorted by quality; both may be null.
FAQ
Does it support single-tweet URLs?
No. Single tweet links that contain โ/status/...โ are intentionally skipped. Provide a profile, username/@handle, or a search query instead.
How many posts can I collect per target?
Up to 1,000 per target. Control this with the maxTweets parameter (1โ1000). Higher limits increase run time and API load.
Do I need to log in to X (Twitter)?
No. The actor bootstraps a guest session in a headless browser, captures a bearer token and cookies, and uses Xโs GraphQL endpoints without a user login.
How do I get only recent posts?
Set searchType to "latest" and provide timeWindow with the number of days (UTC). This filter applies to both keyword searches and profile timelines.
Can I search by keyword or hashtag?
Yes. Use multi-word inputs (e.g., "climate change") or the "search:" prefix (e.g., "search: python from:NASA") to trigger a live search on X.
Can I target profiles by URL or @handle?
Yes. Provide https://x.com/username, @user, or a plain username to collect that accountโs timeline posts.
What fields are included in the output?
Each record includes id, url, user_posted, name, description, date_posted, likes, replies, reposts, quotes, views, bookmarks, is_verified, followers, following, posts_count, profile_image_link, biography, hashtags, tagged_users, photos, videos, quoted_post, external_url, and input.
How can I reduce blocks or failures?
Enable proxyConfiguration with Apify Proxy. The actor can escalate to other proxy tiers when requests throw. For stubborn blocks, use RESIDENTIAL proxies.
Final thoughts
X Twitter Posts Search is built to collect clean, structured X (Twitter) post data for analytics, monitoring, and research. With flexible targeting (profiles or search), time-window filtering, media extraction, and proxy-aware reliability, it serves marketers, analysts, and developers alike. Export to JSON/CSV/Excel, or plug the dataset into your automation pipeline to start extracting smarter social insights today.