VOOZH about

URL: https://apify.com/xtracto/x-search-scraper

⇱ X (Twitter) Search Scraper Β· Apify


Pricing

from $0.10 / 1,000 results

Go to Apify Store

X (Twitter) Search Scraper

Search X (Twitter) by keyword, hashtag, or 'from:user' query and stream matching tweets. Supports Top / Latest / People / Photos / Videos tabs. HTTP-only, no native login flow.

Pricing

from $0.10 / 1,000 results

Rating

0.0

(0)

Developer

πŸ‘ Farhan Febrian Nauval

Farhan Febrian Nauval

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

19 hours ago

Last modified

Categories

Share

Search X (Twitter) tweets by keyword, hashtag, or from:USERNAME query β€” with two modes: anonymous per-user search (no setup) or authenticated general search (paste cookies once for full keyword/hashtag support).

Why use this actor

  • No account required for per-user search β€” pass from:jack twitter and get every tweet from @jack containing "twitter", newest first. Works out of the box.
  • General keyword and hashtag search with cookies β€” paste your logged-in X cookies once to unlock keyword (bitcoin), hashtag (#worldcup), and combined queries that X login-walls anonymously.
  • Higher rate limits when authenticated β€” anonymous mode uses guest-token rate limits (~50 calls per 15 min). Cookies give you account-tier limits (~150 calls per 15 min for normal accounts, more for Premium).
  • Multiple keywords supported β€” from:elonmusk doge mars matches tweets containing both "doge" AND "mars" (case-insensitive substring AND).
  • Pagination handled automatically β€” request up to 500 tweets per query; cursor-based pagination is streamed without you managing it.
  • Bulk input β€” pass a list of queries in one run; one dataset row per matching tweet, tagged with the original query in _input.
  • Stable JSON output β€” every record carries _input, _source, and _scrapedAt envelope fields so you can join results back to your input list.
  • Structured error envelope β€” when cookies expire or general search hits a server-side gate, you get one clean _error record per query instead of a crashed run.

How it works

  1. You provide a list of search queries. Optionally, paste X cookies into the xCookies input field to enable authenticated mode.
  2. The actor either:
    • Authenticated: hits X's search endpoint directly with your session cookies, paginates via cursor, streams matching tweets.
    • Anonymous + from:USERNAME: resolves the username, walks the user's timeline, filters for keyword matches.
  3. Matching tweets stream into your dataset, ready to download as JSON, CSV, or Excel.

You do not need to manage scrapers, browsers, logins, or rotating IPs β€” all handled internally.

How to get X cookies (for authenticated mode)

This is a 1-minute, one-time setup. Required only if you want general keyword/hashtag search; from:USERNAME queries work without cookies.

  1. Install Cookie-Editor in Chrome or Firefox (free extension, 1M+ users).
  2. Log in to x.com in that browser, using either your real account or a throwaway. (Throwaway recommended for heavy automated use β€” see Notes.)
  3. Click the Cookie-Editor extension icon while on any x.com page.
  4. Click the "Export" icon (πŸ“€) in the bottom toolbar of the popup, choose "Export as JSON", and your clipboard will have the JSON.
  5. Paste the JSON into the xCookies field on the Apify input form. Save and run.

The minimum required cookies are auth_token and ct0. The Cookie-Editor export includes them automatically along with helpful aux cookies (gt, twid, kdt, __cf_bm).

Alternative format: instead of the JSON export, you can paste a plain auth_token=xxx; ct0=yyy cookie string copied from your browser DevTools network tab.

Input

{
"queries":[
"bitcoin",
"from:elonmusk doge"
],
"maxResults":20,
"product":"Top",
"xCookies":"[ {\"name\":\"auth_token\",\"value\":\"...\"}, {\"name\":\"ct0\",\"value\":\"...\"} ]",
"proxyConfiguration":{
"useApifyProxy":true,
"apifyProxyGroups":["DATACENTER"]
}
}
FieldTypeDescription
queriesarrayList of search queries. Two formats supported: (1) general keywords / hashtags like bitcoin, #worldcup, iphone 17 β€” require xCookies. (2) per-user from:USERNAME [keywords] like from:jack twitter β€” work without cookies.
maxResultsintegerMax tweets returned per query. Default 20, max 500. Pagination handled automatically.
productstringOne of Top, Latest, People, Photos, Videos. Applied to authenticated search only; anonymous from:USERNAME always returns user timeline regardless. Default Top.
xCookiesstring (secret)Your logged-in X cookies as JSON array (Cookie-Editor export) or name=val; ... string. See the tutorial section above. Leave empty for anonymous mode.
proxyConfigurationobjectApify Proxy settings. Datacenter proxy works for both modes.

Output

Input: from:jack twitter

{
"_input":"from:jack twitter",
"_source":"S1-primary",
"_scrapedAt":"2026-05-18T11:06:09.702476+00:00",
"rest_id":"1189634360472829952",
"id_str":"1189634360472829952",
"conversation_id_str":"1189634360472829952",
"created_at":"Wed Oct 30 20:05:08 +0000 2019",
"full_text":"We've made the decision to stop all political advertising on Twitter globally. We believe political message reach should be earned, not bought. Why? A few reasons...",
"lang":"en",
"favorite_count":308633,
"retweet_count":72664,
"reply_count":12506,
"quote_count":32307,
"bookmark_count":3628,
"is_quote_status":false,
"display_text_range":[0,164],
"entities":{
"hashtags":[],
"symbols":[],
"urls":[],
"user_mentions":[]
},
"source":"<a href=\"http://twitter.com/download/iphone\" rel=\"nofollow\">Twitter for iPhone</a>",
"views":{"state":"Enabled"},
"user_id_str":"12",
"author":{
"rest_id":"12",
"screen_name":"jack",
"name":"jack",
"description":"no state is the best state",
"followers_count":7537451,
"friends_count":3,
"statuses_count":30509,
"is_blue_verified":true,
"created_at":"Tue Mar 21 20:50:14 +0000 2006"
}
}
FieldTypeDescription
_inputstringThe query exactly as you supplied it. Use to join results back to your input list.
_sourcestringInternal tag for the fetch path used (S1-primary for both anonymous and authenticated runs).
_scrapedAtstringISO-8601 UTC timestamp when the record was scraped.
rest_id / id_strstringTweet ID (stable across edits).
conversation_id_strstringRoot tweet ID of the thread this tweet belongs to.
created_atstringOriginal X-format timestamp (Wed Oct 30 20:05:08 +0000 2019).
full_textstringFull tweet body (no truncation).
langstringISO-639 language code detected by X.
favorite_countintegerLikes.
retweet_countintegerReposts.
reply_countintegerDirect replies.
quote_countintegerQuote-tweets.
bookmark_countintegerBookmarks (publicly counted).
is_quote_statusbooleantrue if this tweet quotes another.
display_text_rangearray[start, end] character indices for the visible portion of full_text.
entitiesobjectStructured hashtags, URLs, user mentions, symbols extracted by X.
sourcestringClient used to post (e.g. Twitter for iPhone).
views.statestringEnabled if view-count is publicly available, otherwise omitted.
user_id_strstringAuthor's numeric user ID (mirrors author.rest_id).
authorobjectEmbedded author block: rest_id, screen_name, name, description, follower/following/tweet counts, is_blue_verified, created_at.

Tweets with photos / videos also include extended_entities.media with full media_url_https, sizes, and (for videos) MP4 variants.

Error envelope

The actor surfaces structured errors instead of crashing the run:

{
"_input":"bitcoin",
"_error":"login_required",
"_errorDetail":"X requires a logged-in user session for general keyword/hashtag search in 2025+. ...",
"_source":"S1-primary",
"_scrapedAt":"2026-05-18T11:06:10.848836+00:00"
}
_error valueWhen
login_requiredGeneral keyword / hashtag query was attempted without xCookies. Paste cookies or rewrite as from:USERNAME.
cookies_invalidxCookies was provided but X rejected them (expired or revoked). Re-export from Cookie-Editor after re-logging in to x.com.
resolve_failedThe username after from: does not resolve (deleted, suspended, or typo).
empty_resultsThe query is valid but no tweets matched within the pagination window.
blockedTransient block from X β€” retry later.

Pricing

This actor is billed per result: $8.00 per 1,000 tweets (Tier 6 β€” X requires the most maintenance overhead of any platform: bundle queryId rotation, guest-token refresh, optional auth cookies). Each matching tweet returned = 1 result. Error envelope records (login_required, cookies_invalid, etc.) are not billed.

Other Sosmed Actors

PlatformActorBest for
Twitter / XX Account ScraperProfile, bio, follower/following counts for any handle
Twitter / XX Account Tweets ScraperFull timeline of a user (no keyword filter)
Twitter / XX Post Detail ScraperSingle-tweet detail with author and engagement
BlueskyBluesky Search ScraperFull-text search across all of Bluesky (no login wall)
RedditReddit Search ScraperSearch posts across subreddits
YouTubeYouTube Search ScraperSearch videos by keyword
MastodonMastodon Account ScraperProfile data for any Mastodon handle

Browse the full catalog at apify.com/xtracto.

Notes

  • X login-walls general search anonymously. To search by keyword or hashtag (anything that isn't from:USERNAME), you must paste xCookies from a logged-in x.com session. The Cookie-Editor tutorial above is the fastest path.
  • Cookie rotation: auth_token is typically valid for several weeks to a few months; ct0 rotates more often. If you start seeing _error: "cookies_invalid", just re-export from Cookie-Editor while logged in. The auth_token itself is what matters β€” refresh as needed.
  • Use a throwaway account for heavy automated use. X enforces per-account rate limits (~150 search calls per 15 minutes for normal accounts, scaling up for Premium). High-volume runs from a single account can trigger flags or a temporary lock. Best practice: use one or more disposable accounts dedicated to scraping, not your primary account.
  • Pagination per query is automatic via cursor. The actor stops when it hits maxResults or when X returns no further pages.
  • Per-user mode is permanent. The anonymous from:USERNAME [keywords] path will keep working even if your cookies expire β€” it doesn't depend on auth.
  • Keyword filter is AND + substring. from:jack iphone twitter matches tweets containing both iphone and twitter (case-insensitive). from:jack new will also match news (no tokenisation).
  • Counters are eventually-consistent. favorite_count, retweet_count etc. may lag the live network by a few minutes.
  • Quoted phrases ("new policy"), OR, -exclude, lang:en, etc. are parsed by X server-side when running with cookies; in anonymous from:USERNAME mode they are not interpreted (treated as plain tokens).

You might also like

Twitter (X.com) Search Scraper

web.harvester/easy-twitter-search-scraper

Easily extract tweets from Twitter (X.com) search results with our powerful Twitter Search Scraper. Get full tweet data, including text, engagement, media, and user info. Export in JSON, CSV, Excel, or HTMLβ€”perfect for social media monitoring, market research, competitor analysis, and trend tracking

6.2K

4.7

(12)

X (Twitter) Advanced Search Scraper 𝕏

api-ninja/x-twitter-advanced-search

Advanced X (Twitter) post search with 50+ filters: content, users, geo, time, engagement, media. Dual modes: simple queries or structured filters. Enterprise-grade reliability for precise data extraction

2.2K

4.7

(43)

Ultimate X (Twitter) Advanced Search Scraper

delicious_zebu/ultimate-x-twitter-advanced-search-scraper

πŸš€ Harness the full power of X (Twitter) Advanced Search! Filter by keywords, users, dates, engagement & more. Fast, stable, and precise data.

500

4.9

(20)

X.com Twitter User Search Scraper

xtdata/twitter-x-user-search-scraper

Scrape Twitter (X.com) user profiles instantly. Scrape detailed metrics like follower counts, bios, locations, and verified status using specific search terms. Fast, reliable, and perfect for influencer research and competitor analysis.

125

5.0

(1)

X (Twitter) Advanced Search Tweet Scraper 𝕏

mikolabs/x-twitter-advanced-search-tweet-scraper

Twitter/X scraper is Lightning-fast in 3 sec 20 tweets with 60+ advanced filters. Extract tweets by engagement, media, users, keywords, time, and location. Supports Latest/Top sorting, threads, quotes, and polls. Returns profiles, media URLs, engagement stats, and metadata.

206

5.0

(4)

Twitter/X Search Scraper Β· No Cookies

data-slayer/twitter-search

Search Twitter/X and extract tweets matching any keyword, hashtag, or mention without login. Get full tweet text, likes, retweets, views, bookmarks, user profiles, media URLs, and conversation threads. No cookies, no API key. JSON/CSV/Excel export.

256

5.0

(1)

X (Twitter) Community Search Post Scraper 𝕏

api-ninja/x-twitter-community-search-post-scraper

Extract tweets from X (Twitter) communities. Process single or multiple communities, get comprehensive tweet data with community context, and handle large-scale data collection efficiently.

385

4.9

(33)

X (Twitter) Tweet Scraper | Search, Hashtags & Profiles

khadinakbar/x-tweet-scraper

Scrape tweets from X.com (Twitter) by search query, hashtag, username, or URL. Returns tweet text, engagement metrics, author info, media, and more $3.00/1K.

50

Twitter (X.com) Search Results Scraper by Keyword - Cookieless

patient_discovery/twitter-search

Extract Twitter search results without login or cookies. Search by keyword, hashtag, mention, or advanced operators and get tweets, engagement metrics, hashtags, media, and user profiles in JSON or CSV. Ideal for lead generation, brand monitoring, and competitive analysis at scale.

169

X(Twitter) Jobs Search Scraper

powerai/twitter-jobs-search-scraper

Search X’s job listings by keyword and optional filtersβ€”export titles, pay bands, locations, and apply links in structured rows.

X Twitter Search Scraper - Tweets, People & Media

khadinakbar/x-twitter-search-scraper

Search public X/Twitter results by keyword, hashtag, advanced operator, or tab. Export tweets, profiles, photos, and media with engagement metrics, authors, URLs, cursors, and clean summaries. No cookies required.

12