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 extracts tweets by keywords, hashtags, users, and date ranges β€” with media, links & engagement. ⚑ Real-time results, advanced filters, and CSV/JSON export. πŸ“Š Ideal for social listening, brand monitoring, and market research.

Pricing

$19.99/month + usage

Rating

0.0

(0)

Developer

Scrapium

Scrapium

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 multi-word queries β€” complete with media, engagement, author metadata, and structured links. It solves the hassle of manual X tweet search by automating both profile timelines and live results, so marketers, developers, data analysts, and researchers can run X advanced search/Twitter advanced search at scale for social listening, brand monitoring, and market research. With flexible input (e.g., search X posts by keyword, or search tweets from a user on X), it enables fast data collection for dashboards, NLP pipelines, and reporting.

What data / output can you get?

Below are the exact fields the actor saves to the Apify dataset. You can export to JSON, CSV, or Excel.

Data typeDescriptionExample value
idPost ID (tweet rest_id)"1988877569597260072"
urlCanonical post URL"https://x.com/elonmusk/status/1988877569597260072"
user_postedUsername (handle)"elonmusk"
nameDisplay name"Elon Musk"
descriptionFull post text"Long press on any image to turn it into a video..."
date_postedISO timestamp (UTC)"2026-03-30T12:34:56.000Z"
likesFavorite count1729
repliesReply count554
repostsRetweet/Repost count368
quotesQuote count38
viewsView/impression count"1399060"
bookmarksBookmark count213
is_verifiedBlue check/verified flagtrue
followersAuthor followers229031060
followingAuthor following1226
posts_countAuthor total posts89153
profile_image_linkAuthor avatar URL"https://pbs.twimg.com/profile_images/.../normal.jpg"
biographyAuthor bio text"Technoking of Tesla..."
hashtagsArray of hashtags in the post (no # symbol)["AI","Mars"]
tagged_usersArray of mentioned usernames["tetsuoai"]
photosFirst photo URL (if any)"https://pbs.twimg.com/media/xxxx.jpg"
videosArray of MP4 variants (sorted by bitrate)["https://video.twimg.com/.../1080p.mp4"]
quoted_postMetadata for quoted post (if any){ "data_posted": "...", "description": "...", "post_id": "...", "profile_id": "...", "profile_name": "...", "url": null, "videos": null }
external_urlAuthor profile external URL"https://tesla.com"
inputSource context for this row (searchQuery or url){"searchQuery":"from:NASA moon"} or {"url":"https://x.com/user/status/123/..."}

Notes:

  • Media fields may be null if not present (photos, videos).
  • Hashtags and tagged_users return null when none are detected.
  • input contains either searchQuery (for search runs) or url (for profile timeline runs).

Key features

  • πŸ”Ž Advanced query modes (Top & Latest) Choose searchType "top" for popular/relevant ordering or "latest" for freshest results β€” ideal for X tweet search when monitoring breaking topics.

  • ⏱️ Time-window filtering (Latest only) Combine searchType "latest" with timeWindow (days) to search tweets by date on X and filter to the last N days for both keyword search and profile timelines.

  • πŸ‘€ Profiles and keyword/hashtag search in one Multi-word text or the β€œsearch:” prefix triggers live search on X; single-word usernames or profile URLs pull timeline posts β€” great for search old tweets on X or filter X search results by author.

  • πŸ›‘οΈ Proxy-aware with smart fallback Starts with your Apify Proxy settings and can escalate to datacenter or residential proxies on network errors to reduce blocking and improve reliability.

  • 🧠 Robust session bootstrapping Automatically collects the guest bearer token and GraphQL operation IDs in a headless browser to stay aligned with X’s rotating endpoints.

  • πŸ” Pagination & deduplication built-in Cursor-based pagination collects up to your maxTweets per target while avoiding duplicate rows and keeping quoted tweets attached as context, not separate posts.

  • πŸ“€ Flexible exports Download structured results from the Apify dataset in JSON, CSV, or Excel for analytics, dashboards, and ETL workflows.

  • 🧩 Developer-friendly Works smoothly via the Apify platform and SDKs. Pushes clean JSON suitable for API pipelines, Python scripts, and data engineering tasks.

  • πŸ” No login required Uses a guest session; no credentials, cookies, or private data needed.

How to use X Twitter Posts Search - step by step

  1. Create or log in to your Apify account You can run the actor directly from the Apify platform.

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

  3. Add your targets in startUrls

    • Each line is a target (string).
    • Multi-word text or queries prefixed with search: trigger live search on X.
    • Single-word usernames or profile URLs fetch that account’s timeline.
    • Not supported: single tweet/status links (/status/…). Use a profile or search query instead. Examples:
    • "https://x.com/wikipedia"
    • "@NASA"
    • "climate change"
    • "search: python from:NASA"
  4. Choose Search mode

    • searchType: "top" for relevance, or "latest" for newest-first ordering.
  5. (Optional) Limit by recent days

    • Set timeWindow (integer days) when using searchType "latest" to keep only recent posts.
  6. Set Max posts per target

    • maxTweets controls how many posts are collected for each URL/username/keyword (1–1000).
  7. Configure Proxy (recommended for X)

    • Use Apify Proxy, and consider RESIDENTIAL for stubborn blocks. The actor can escalate proxies if network errors occur.
  8. Run the actor and export results

    • The run will bootstrap a guest session, collect posts, and save rows to the dataset.
    • Export your dataset as JSON, CSV, or Excel.

Pro Tip: Use X search operators inside your query for precision (e.g., search: "from:NASA has:images Artemis") to refine X advanced search and filter X search results.

Use cases

Use case nameDescription
Social listening & brand monitoringTrack mentions, hashtags, and replies to measure awareness and sentiment over time.
Market research & trend analysisMonitor keywords and topics with X advanced search to quantify traction and engagement patterns.
Competitor content insightsAnalyze posting cadence and engagement by scraping competitor timelines.
News & crisis monitoringFollow β€œLatest” search streams with a time window to capture fast-moving conversations.
Influencer discoveryCombine hashtag queries with engagement metrics to surface high-impact accounts.
Academic & policy researchCollect structured datasets for longitudinal studies and discourse analysis.
NLP & AI training dataExport clean JSON for downstream sentiment models, topic modeling, and LLM pipelines.

This actor is built for precision, resilience, and scale β€” a production-ready way to run Twitter advanced search and profile scraping without manual work.

  • 🎯 Accurate, structured fields aligned to X’s data model
  • 🧭 Top/Latest modes with optional timeWindow for recent-only datasets
  • βš™οΈ Batch-friendly: maxTweets per target and automatic pagination
  • πŸ”Œ Developer access via Apify datasets and SDKs for API pipelines
  • πŸ”’ No login needed; public data only with guest sessions
  • 🌐 Proxy-ready with fallback escalation to reduce blocking
  • πŸ“€ Easy exports to JSON/CSV/Excel for analytics and reporting

Unlike brittle browser extensions, this workflow auto-discovers required API parameters, handles pagination, and streams clean records ready for analysis.

Yes β€” when used responsibly. This actor targets publicly available posts and does not access private profiles or authenticated data.

Guidelines for compliant use:

  • Only collect publicly available information.
  • Respect X’s terms and applicable laws (e.g., GDPR, CCPA).
  • Avoid excessive request rates and abusive behavior.
  • Do not attempt to bypass authentication or scrape private content.
  • Consult your legal team for edge cases and jurisdiction-specific requirements.

Input parameters & output format

Example JSON input

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

Parameters

  • startUrls (array, required): Add one row per target. Works with profile URLs, @handles, single-word usernames, multi-word keywords, or queries starting with "search:". Skips single tweet/status links. Default: none.
  • maxTweets (integer, optional): Cap how many posts to collect per URL, user, or keyword (1–1000). Default: 10.
  • timeWindow (integer, optional): Only keep posts newer than this many days (UTC). Requires searchType = "latest". Applies to keyword search and profile timelines. Default: none.
  • searchType (string, required): "top" (popular/relevant) or "latest" (newest first). On profile runs, this mainly changes the saved sort order. Default: "top".
  • proxyConfiguration (object, optional): Apify Proxy settings. Off = direct connection; On = Apify Proxy. The actor can escalate proxy tiers on network errors. Prefill: {"useApifyProxy": false}.

Example JSON output

[
{
"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": "2026-03-30T07: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": {
"url": "https://x.com/elonmusk/status/1988877569597260072/"
}
},
{
"id": "1988000000000000000",
"url": "https://x.com/NASA/status/1988000000000000000",
"user_posted": "NASA",
"name": "NASA",
"description": "New lunar imagery from Artemis I",
"date_posted": "2026-03-29T12:00:00.000Z",
"likes": 420,
"replies": 25,
"reposts": 90,
"quotes": 7,
"views": "250000",
"bookmarks": 12,
"is_verified": true,
"followers": 80000000,
"following": 200,
"posts_count": 90000,
"profile_image_link": "https://pbs.twimg.com/profile_images/.../normal.jpg",
"biography": "Exploring the universe.",
"hashtags": ["Artemis"],
"tagged_users": null,
"photos": "https://pbs.twimg.com/media/xxxx.jpg",
"videos": null,
"quoted_post": {
"data_posted": null,
"description": null,
"post_id": null,
"profile_id": null,
"profile_name": null,
"url": null,
"videos": null
},
"external_url": "https://www.nasa.gov",
"input": {
"searchQuery": "from:NASA moon"
}
}
]

Notes:

  • For search inputs, input will contain {"searchQuery": "..."}; for profile timeline rows, input will contain {"url": "..."}.
  • Some media or metadata fields can be null if not present in the source post.

FAQ

How do I search posts on X by keyword?

Use a multi-word query or prefix your query with "search:" in startUrls. For example, "climate change" or "search: python from:NASA" will run a live search on X and collect matching posts.

Can I search tweets from a user on X?

Yes. Add a profile URL ("https://x.com/username"), a handle ("@user"), or a single-word username ("username") in startUrls to scrape that account’s timeline.

How do I search tweets by date on X?

Set searchType to "latest" and add a timeWindow value (in days). The actor will keep only posts newer than the specified number of days (UTC) for both keyword search and profile timelines.

Does it support X search operators?

Yes. Since the actor forwards your raw query to X, you can include X search operators like from:, has:images, and more (e.g., "search: python from:NASA") to refine Twitter advanced search.

Can I search old tweets on X?

Yes. Use searchType "top" or "latest" and paginate up to your maxTweets per target. For recent-only datasets, combine "latest" with a timeWindow to filter to the last N days.

Are single tweet/status URLs supported?

No. Links to a single tweet (/status/…) are skipped. Use a profile timeline or a keyword/search query instead.

How many posts can I scrape per target?

You can set maxTweets between 1 and 1000 per target. Keep in mind that higher limits take longer and increase API load.

Do I need a proxy?

Proxy is optional but recommended for X. You can enable Apify Proxy, and the actor can escalate to datacenter or residential proxy tiers on network errors to reduce blocking.

What export formats are available?

Results are saved to the Apify dataset and can be exported in JSON, CSV, or Excel.

Final thoughts

X Twitter Posts Search is built to automate X post discovery and extraction for profiles and live queries β€” with engagement, media, and author details in one clean schema. It helps marketers, developers, analysts, and researchers run powerful X advanced search workflows, apply time-window filters, and export structured datasets for analysis. Developers can integrate via Apify datasets and SDKs to build automated pipelines. Start extracting smarter, faster insights from public X conversations today.