X Twitter Posts Search avatar

X Twitter Posts Search

Pricing

$19.99/month + usage

Go to Apify Store
X Twitter Posts Search

X Twitter Posts Search

🔎 X (Twitter) Posts Search finds and filters posts by keywords, hashtags, users, date, language & engagement. ⚡ Real-time results with advanced operators. 📊 Export CSV/JSON. Perfect for social listening, brand monitoring, trend analysis & content research.

Pricing

$19.99/month + usage

Rating

0.0

(0)

Developer

Scraply

Scraply

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

6 days ago

Last modified

Share

X Twitter Posts Search is an Apify actor that finds and extracts public posts from X (Twitter) by profiles, keywords, and hashtags, then saves them as clean, structured data. It solves the hassle of manual social listening by filtering posts by recency and popularity, capturing engagement and media, and exporting results to CSV/JSON for analysis. Built for marketers, developers, data analysts, and researchers, it scales from quick checks to ongoing monitoring with proxy-aware reliability and advanced search operators.

What data / output can you get?

Below are the exact fields the actor saves to the dataset for each post. Values are derived directly from X’s timeline/search responses and normalized into a consistent schema.

Data typeDescriptionExample value
idPost REST ID"1770123456789012345"
urlCanonical X post URL"https://x.com/SpaceX/status/1770123456789012345"
user_postedAuthor’s handle (screen name)"SpaceX"
nameAuthor’s display name"SpaceX"
descriptionFull post text"Starlink is now available in..."
date_postedISO timestamp (UTC)"2026-03-30T14:22:05.000Z"
likesFavorite count1523
repliesReply count214
repostsRetweet/repost count289
quotesQuote count37
viewsView/impression count120450
bookmarksBookmark count56
is_verifiedBlue verification flagtrue
followersAuthor’s followers32500000
followingAuthor’s following150
posts_countAuthor’s total posts9800
profile_image_linkAuthor’s avatar URL"https://pbs.twimg.com/profile_images/..._normal.jpg"
biographyAuthor’s bio text"Making life multiplanetary"
hashtagsArray of hashtag texts or null["Starlink","coverage"]
tagged_usersArray of mentioned handles or null["elonmusk"]
photosFirst photo URL if present, else null"https://pbs.twimg.com/media/xyz.jpg"
videosArray of MP4 URLs (highest bitrate first) or null["https://video.twimg.com/.../720p.mp4","https://video.twimg.com/.../480p.mp4"]
quoted_postNested object with quoted post metadata (if any){"data_posted":"2026-03-30T12:00:00.000Z","description":"...","post_id":"1769...","profile_id":"4419...","profile_name":"Elon Musk","url":null,"videos":null}
external_urlAuthor’s external profile URL (if set)"https://www.spacex.com"
inputSource context for the row (search query or constructed URL){"searchQuery":"starlink coverage"}

Notes:

  • Many media and enrichment fields are optional. When not present, they return null (e.g., photos, videos, hashtags, tagged_users, quoted_post fields).
  • You can export results from the dataset as CSV or JSON in Apify.

Key features

  • 🔎 Top vs Latest search modes Choose between “top” (popular/relevant) and “latest” (newest first) via searchType. “Latest” pairs perfectly with timeWindow for real-time monitoring.

  • ⏱️ Time window filtering (Latest mode) Keep only posts from the last N days by combining searchType="latest" with timeWindow. Works for both keyword searches and profile timelines.

  • 👤 Profile timelines & keyword/hashtag search Add @handles, profile URLs, usernames, multi-word queries, or advanced operators like “search: python from:NASA”.

  • 📸 Media-aware extraction Capture photos and ordered MP4 video variants (highest bitrate first) when available, plus hashtags and user mentions.

  • 📈 Engagement & author metadata Collect likes, replies, reposts, quotes, views, bookmarks, and author details like followers, following, posts_count, profile image, biography, and verification.

  • 🌐 Proxy-aware reliability with fallback Use Apify Proxy (recommended). On network errors, the actor can escalate from no proxy → datacenter (e.g., SHADER) → residential automatically.

  • 🔁 Pagination & smart parsing Uses X’s GraphQL timelines with cursor-based pagination and robust extraction that avoids duplicating quoted/embedded posts as separate rows.

  • 💾 Dataset-ready outputs Results are pushed to your run’s dataset and can be exported to CSV/JSON or consumed downstream via the Apify platform.

  • 🚫 Clear behavior on unsupported inputs Single tweet/status URLs are intentionally skipped. Use a profile or a search query instead.

How to use X Twitter Posts Search - step by step

  1. Create or log in to your Apify account You’ll run the actor from the Apify platform and access results in the run dataset.

  2. Open the X Twitter Posts Search actor Find “X Twitter Posts Search” in the Apify Store and click Try for free.

  3. Add your targets to startUrls Enter one item per line. Supported examples:

  4. Choose the search mode Set searchType to “top” (popular/relevant) or “latest” (newest first).

  5. (Optional) Filter by recency If you selected searchType="latest", set timeWindow to keep only posts from the last N days (UTC).

  6. Set limits and proxy

    • maxTweets controls how many posts to collect per target (1–1000).
    • Enable proxyConfiguration (RESIDENTIAL recommended if you see blocking).
  7. Start the run The actor launches a guest session, discovers GraphQL endpoints, paginates results, and saves posts to the dataset.

  8. Download your data Open the run’s Dataset and export to CSV or JSON, or connect programmatically via the Apify platform.

Pro tip: Use multi-word queries or the “search:” prefix for advanced operators (e.g., search: "from:NASA #Artemis"). For best stability on X, enable Apify Proxy with a RESIDENTIAL group.

Use cases

Use caseDescription
Social listening for brandsMonitor brand mentions, hashtags, and campaign performance to inform messaging and support.
News & trend trackingTrack “latest” posts within a time window to detect breaking stories and real-time topics.
Competitor content analysisBenchmark posting cadence, engagement, and media usage across competitor profiles.
Market research & sentimentCollect structured posts for qualitative analysis and KPIs across audiences and geographies.
Academic & policy researchBuild reproducible datasets of public posts for studies, reports, and fact-checking.
Analytics pipelinesFeed CSV/JSON exports into BI tools, data lakes, or automation workflows for ongoing reporting.
Developer integrationsTrigger runs and consume datasets programmatically as part of internal tools and dashboards.

A precision-focused, proxy-aware X/Twitter post collector built for structured datasets and reliable automation.

  • 🎯 Accurate, structured outputs – Consistent fields for posts, media, engagement, and author metadata.
  • ⚡ Scales with your workload – Crawl profiles and keyword timelines with per-target limits up to 1,000 posts.
  • 🧑‍💻 Developer-friendly – Clean dataset outputs for CSV/JSON exports and platform integrations.
  • 🔒 Safer public-data approach – Captures guest session details and respects platform constraints; no private profiles.
  • 🌐 Proxy-ready reliability – Designed for Apify Proxy with escalation to residential IPs when needed.
  • 💸 Cost-efficient operations – Practical defaults and pagination to control resource usage.
  • 🧩 Production-ready – Robust GraphQL discovery and parsing to keep results consistent versus brittle alternatives.

Yes—when used responsibly. This actor extracts public information from X (Twitter) timelines and search results without accessing private profiles.

Guidelines for compliant use:

  • Scrape only publicly available data and respect platform terms.
  • Avoid private or protected accounts and do not bypass access controls.
  • Use proxies responsibly and keep request volumes reasonable.
  • Ensure your usage complies with applicable regulations (e.g., GDPR, CCPA).
  • Consult your legal team for edge cases or regulated workflows.

Input parameters & output format

Example input

{
"startUrls": [
"Iceland",
"search: python from:NASA",
"@wikipedia",
"https://x.com/elonmusk"
],
"maxTweets": 25,
"timeWindow": 7,
"searchType": "latest",
"proxyConfiguration": {
"useApifyProxy": true,
"apifyProxyGroups": ["RESIDENTIAL"]
}
}

Parameter reference:

  • startUrls (array, required): Targets — URLs, @users, or keywords. Works with profile URLs/usernames, @handles, multi-word queries, and “search:” prefixed queries. Skips links to a single tweet. Default: none.
  • maxTweets (integer): Max posts to collect per target (1–1000). Default: 10.
  • timeWindow (integer): Only posts from the last N days (UTC). Requires searchType="latest". Default: none.
  • searchType (string, required): Search mode — "top" or "latest". On profiles, this mainly affects sort order. Default: "top".
  • proxyConfiguration (object): Proxy (recommended for X). Off = direct, On = Apify Proxy. The actor can escalate on network errors. Default: useApifyProxy false (prefill).

Example output

[
{
"biography": "Official account for climate updates.",
"bookmarks": 12,
"date_posted": "2026-04-10T09:15:30.000Z",
"description": "Latest data shows rapid warming in the Arctic region. #climate #research",
"external_url": "https://example.org",
"followers": 245000,
"following": 120,
"hashtags": ["climate", "research"],
"id": "1770123456789012345",
"input": {
"searchQuery": "climate change"
},
"is_verified": true,
"likes": 834,
"name": "Climate Watch",
"photos": "https://pbs.twimg.com/media/ArcticTrend.jpg",
"posts_count": 18250,
"profile_image_link": "https://pbs.twimg.com/profile_images/abc123_normal.jpg",
"quoted_post": {
"data_posted": "2026-04-10T07:00:00.000Z",
"description": "New report on Arctic sea ice trends released today.",
"post_id": "1769988776655443322",
"profile_id": "44196397",
"profile_name": "Research Lab",
"url": null,
"videos": null
},
"quotes": 21,
"replies": 96,
"reposts": 143,
"tagged_users": ["researchlab"],
"url": "https://x.com/ClimateWatch/status/1770123456789012345",
"user_posted": "ClimateWatch",
"videos": [
"https://video.twimg.com/amplify_video/1770123456789012345/vid/720/track1.mp4",
"https://video.twimg.com/amplify_video/1770123456789012345/vid/480/track2.mp4"
],
"views": 54012
}
]

Notes:

  • photos, videos, hashtags, tagged_users, and quoted_post may be null when not present in the source post.
  • input contains either {"searchQuery": "..."} for searches or {"url": "..."} for profile timeline items.

FAQ

Does this actor support single post URLs?

No. Single tweet/status links are not supported. Add a profile target or use a keyword/advanced “search:” query instead to collect posts.

Which search modes are available?

Two modes: “top” for popular/relevant ordering and “latest” for newest-first. For time-based filtering with timeWindow, set searchType to “latest”.

How many posts can I collect per target?

You can set maxTweets from 1 to 1000 per target. The actor paginates results and stops when it reaches your limit or the timeline ends.

Can I filter by recency?

Yes, when searchType is “latest”. Set timeWindow to keep only posts from the last N days (UTC) for both keyword searches and profile timelines.

Do I need to log in to X?

No. The actor boots a guest browser session, captures the necessary headers and GraphQL operation IDs, and issues API calls accordingly. For stability on X, enabling Apify Proxy is recommended.

How does proxy fallback work?

If requests throw network errors, the actor can escalate: no proxy → datacenter → residential. Residential proxies are recommended for stubborn blocks.

What formats can I export to?

All results are saved to the run’s Dataset, which you can export as CSV or JSON directly from the Apify platform.

What fields are included in the output?

Each row includes post identifiers, URL, text, timestamps, engagement (likes, replies, reposts, quotes, views, bookmarks), author metadata (handle, name, followers, following, posts_count, avatar, biography), media (photos and video MP4s), hashtags, mentions, quoted_post details, external_url, and input context.

Final thoughts

X Twitter Posts Search is built to turn X/Twitter timelines and search results into structured, analysis-ready datasets. With top/latest modes, time-window filtering, rich media and engagement capture, and proxy-aware reliability, it empowers marketers, analysts, researchers, and developers to monitor topics and profiles at scale. Export CSV/JSON from Apify or integrate into your pipelines to automate social listening and trend tracking—start extracting smarter insights from public X posts today.