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 (x-twitter-posts-search) finds and filters X posts by keywords, hashtags, users, language, and date β€” with engagement metrics, media links & IDs. ⚑ Export results (CSV/JSON), track trends in real time. πŸš€ Perfect for social listening, brand monitoring & research.

Pricing

$19.99/month + usage

Rating

0.0

(0)

Developer

ScrapeMesh

ScrapeMesh

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 filters public X (Twitter) posts by profiles, keywords, or hashtags β€” then saves clean, structured results with engagement metrics, media links, and author details. It solves the β€œhow do I run an X advanced search at scale” problem for marketers, developers, data analysts, and researchers by supporting both profile timelines and raw queries (with X search operators) and exporting to CSV/JSON for downstream analysis.

What data / output can you get?

Below are the exact fields this actor stores for each post. Examples are illustrative.

Data typeDescriptionExample value
idUnique post ID (rest_id)"1988877569597260072"
urlDirect URL to the post"https://x.com/elonmusk/status/1988877569597260072"
user_postedAuthor’s @handle (screen_name)"elonmusk"
nameAuthor’s display name"Elon Musk"
descriptionFull post text"Long press on any image to turn it into a video…"
date_postedISO timestamp (UTC)"2025-11-13T07:52:18.000Z"
likesFavorite count1729
repliesReply count554
repostsRetweet/repost count368
quotesQuote count38
viewsView/impression count1399060
bookmarksBookmark count213
is_verifiedBlue-verified statustrue
followersAuthor follower count229031060
followingAuthor following count1226
posts_countAuthor total post count89153
profile_image_linkAuthor avatar URL"https://pbs.twimg.com/profile_images/.../normal.jpg"
biographyAuthor bio text"Technoking of Tesla, Imperator of Mars"
hashtagsArray of hashtag texts["AI","SpaceX"]
tagged_usersArray of mentioned @handles["tetsuoai"]
photosFirst photo URL if present"https://pbs.twimg.com/media/ABC123.jpg"
videosArray of MP4 video URLs (sorted by bitrate)["https://video.twimg.com/.../1080p.mp4","https://video.twimg.com/.../720p.mp4"]
quoted_postQuoted post metadata (object){"data_posted":"2025-11-12T10:00:00.000Z","description":"…","post_id":"1988…","profile_id":"44196397","profile_name":"Elon Musk","url":null,"videos":null}
external_urlAuthor profile external URL"https://tesla.com"
inputSource context (search query or status URL){"searchQuery":"python from:NASA"}

Notes:

  • Bonus media and context: photos, videos, hashtags, tagged_users, and quoted_post are included when present.
  • You can export results from the Apify dataset to CSV or JSON for use in BI tools and pipelines.

Key features

  • πŸ”Ž Powerful search modes (Top & Latest) Choose between β€œtop” (popular/relevant) and β€œlatest” (newest first). Latest pairs perfectly with the Time window to monitor breaking topics in real time using Twitter advanced search patterns.
  • 🧠 Raw query support with X search operators Enter multi-word queries or prefix with β€œsearch:” to run live search on X. Ideal for exact phrases, mentions, and other X search operators in your workflow.
  • πŸ‘€ Profile timelines and keyword/hashtag search Add @handles, profile URLs, single-word usernames, or multi-word queries to collect either an account’s posts or topic-based results.
  • ⏱️ Time-window filtering (days) Limit results to the last N days (UTC) when Search mode is Latest β€” a simple way to β€œsearch X posts by date” for timely monitoring.
  • πŸ–ΌοΈ Media & engagement captured Collect likes, replies, reposts, quotes, views, bookmarks plus media links (photos, videos) and conversation context (quoted_post).
  • 🧡 Clean, de-duplicated output Internal normalization avoids double-counting embedded or quoted tweets, giving you accurate, analysis-ready records.
  • 🌐 Proxy-ready with smart fallback Use Apify Proxy to reduce blocking. The actor can escalate from no proxy β†’ datacenter β†’ residential automatically if requests fail.
  • πŸ’Ύ Easy exports for analytics Export your dataset as CSV or JSON. Perfect for dashboards, reporting, and data-science pipelines.

How to use X Twitter Posts Search - step by step

  1. Create or log in to your Apify account
  2. Open the X Twitter Posts Search actor in the Apify Store
  3. Add input targets in startUrls
  • Use one row per target. Examples:
    • "https://x.com/username"
    • "@user" or "username" (profile timeline)
    • "climate change" (multi-word = search)
    • "search: python from:NASA" (raw X advanced search query)
  1. Choose Search mode
  • searchType = "top" for popular/relevant
  • searchType = "latest" for newest-first
  1. (Optional) Set Time window (days)
  • Only applies when searchType is "latest". Keeps posts newer than N days (UTC).
  1. (Optional) Set Max posts per target
  • maxTweets caps results per profile or query (1–1000).
  1. (Recommended) Configure Proxy
  • Enable Apify Proxy (RESIDENTIAL suggested) to reduce blocks and improve reliability.
  1. Run the actor and monitor progress
  • The actor discovers X session details automatically, paginates, filters (if configured), and pushes results to the dataset.
  1. Download your data
  • Export results to CSV or JSON from the run’s Dataset tab for use in your tools.

Pro tip: Automate recurring monitoring with an Apify schedule and pipe the dataset to your data warehouse. Developers can call the run via API and stream dataset items programmatically.

Use cases

Use caseDescription
Social listening & brand monitoringTrack mentions, hashtags, and conversation context to quantify engagement and surface customer insights.
Real-time trend trackingMonitor news and topics with Latest + Time window for timely alerts and reports.
Competitor content analysisAggregate profile timelines to study posting cadence, media formats, and engagement patterns.
Campaign performance reportingExport posts and metrics to CSV/JSON for dashboards and KPI tracking.
Academic & policy researchCollect structured public posts for topic modeling, sentiment analysis, and longitudinal studies.
Developer/API pipelinesTrigger runs via API, then integrate the dataset into ETL/ELT workflows and ML pipelines.

Built for precision and reliability, this actor combines live X advanced search with robust profile scraping and clean, consistent outputs.

  • 🎯 Accurate, structured data β€” Deduplicated results with post text, media, and full engagement metrics.
  • ⚑ Scales per target β€” Configure maxTweets to control volume for topics or user timelines.
  • 🧩 Developer-friendly β€” Clean JSON output and Apify Dataset exports for easy integration.
  • πŸ”’ Resilient networking β€” Proxy support with automatic fallback to datacenter and residential tiers.
  • 🌍 Query flexibility β€” Use multi-word queries or β€œsearch:” to leverage Twitter search operators in your workflow.
  • πŸ’° Cost-effective automation β€” Run scheduled jobs and export to CSV/JSON without manual overhead.

Compared to browser extensions or unstable scripts, this production-ready actor runs on Apify infrastructure, handles pagination and session bootstrapping, and outputs consistent records you can trust.

Yes β€” when used responsibly. This actor extracts publicly available data from X (Twitter). It does not access private profiles or require authentication. Users are responsible for ensuring their use complies with applicable laws and platform terms in their jurisdiction.

Guidelines:

  • Only collect and use publicly available content
  • Respect platform terms and local regulations (e.g., GDPR/CCPA)
  • Avoid scraping private or protected accounts
  • Use proxies responsibly and moderate request volumes
  • Consult your legal team for specific compliance needs

Input parameters & output format

Input JSON example

{
"startUrls": [
"search: climate change from:NASA",
"@nasa",
"https://x.com/wikipedia",
"open source ai"
],
"maxTweets": 25,
"timeWindow": 7,
"searchType": "latest",
"proxyConfiguration": {
"useApifyProxy": true
}
}

Parameters

  • startUrls (array, required)
    Description: Add one row per target. Works with profile URLs/usernames, @handles, multi-word keywords, or queries prefixed with "search:". Single-tweet links (/status/…) are skipped.
    Default: none

  • maxTweets (integer)
    Description: Cap how many posts to collect per URL, user, or keyword (1–1000). Higher values mean longer runs and more API load.
    Default: 10

  • timeWindow (integer)
    Description: Keep posts newer than this many days (UTC). Requires Search mode β†’ Latest. Applies to keyword search and profile timelines. Leave empty to collect up to Max posts.
    Default: none

  • 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 output sort order.
    Default: "top"

  • proxyConfiguration (object)
    Description: Off = direct connection (X may block datacenter IPs). On = Apify Proxy (choose groups in UI). The actor can escalate proxy tiers on network errors; for stubborn blocks, try RESIDENTIAL.
    Default: none

Output JSON example

[
{
"id": "1988877569597260072",
"url": "https://x.com/elonmusk/status/1988877569597260072",
"user_posted": "elonmusk",
"name": "Elon Musk",
"description": "@tetsuoai Long press on any image to turn it into a video in less than 30 seconds https://t.co/Nsp7Ba0flp",
"date_posted": "2025-11-13T07:52:18.000Z",
"likes": 1729,
"replies": 554,
"reposts": 368,
"quotes": 38,
"views": 1399060,
"bookmarks": 213,
"is_verified": true,
"followers": 229031060,
"following": 1226,
"posts_count": 89153,
"profile_image_link": "https://pbs.twimg.com/profile_images/1983681414370619392/oTT3nm5Z_normal.jpg",
"biography": "",
"hashtags": null,
"tagged_users": ["tetsuoai"],
"photos": null,
"videos": [
"https://video.twimg.com/amplify_video/1988877511368019968/vid/avc1/576x856/34pcJSQSXqqM4JRQ.mp4?tag=23"
],
"quoted_post": {
"data_posted": null,
"description": null,
"post_id": null,
"profile_id": null,
"profile_name": null,
"url": null,
"videos": null
},
"external_url": null,
"input": {
"searchQuery": "python from:NASA"
}
}
]

Notes:

  • input contains either {"searchQuery": "..."} for searches or {"url": "https://x.com/{user}/status/{id}/"} for profile timelines.
  • photos is a single URL when present; videos is an array of MP4 URLs sorted by quality.

FAQ

How do I search X posts by date?

Set searchType to "latest" and provide timeWindow (days). The actor keeps only posts newer than the specified number of days (UTC) for both keyword searches and profile timelines.

Can I search X posts from a user and by hashtag or keyword?

Yes. Add a username (e.g., "@user" or "username") to collect that profile’s posts, or add multi-word keywords/hashtags to run a live search. Prefix with "search:" to pass a raw query.

Does it support X search operators and exact phrases?

Yes. Multi-word inputs or "search:" queries are sent to X’s SearchTimeline endpoint, so you can include X search operators and exact phrases in your raw query.

Can I export results to CSV or JSON?

Yes. Results are stored in the Apify dataset. You can download exports as CSV or JSON directly from the run.

Do I need a proxy?

Not strictly, but it’s recommended. X may block certain IPs. Enable Apify Proxy (RESIDENTIAL for best results). The actor can escalate proxy tiers automatically when network requests fail.

Are single post URLs supported?

Single tweet/status links are intentionally not processed. Provide a profile URL/handle or a keyword/search query instead.

How many posts can I scrape per target?

Use maxTweets to set the limit from 1 to 1000 per target. Higher limits increase run time and request volume.

What fields are included in the output?

You’ll get post text, engagement (likes, replies, reposts, quotes, views, bookmarks), author details (name, handle, followers/following, posts_count, profile_image_link, biography), media (photos, videos), hashtags, tagged_users, quoted_post, external_url, and the input context.

Closing CTA / Final thoughts

X Twitter Posts Search is built to run reliable X (Twitter) advanced searches and profile timeline extractions at scale. With clean JSON records, media links, and engagement metrics β€” plus proxy-ready reliability β€” it’s ideal for marketers, developers, analysts, and researchers. Export to CSV/JSON for BI, call runs via API for automation, and schedule jobs to keep your monitoring up to date. Start extracting smarter, structured insights from public X posts today.