Skip to main content
GET
Twitter advanced search API & tweet scraper
Requested result counts are upper bounds for paid authenticated calls. When remaining credits cannot cover the full page or ID list, Xquik returns fewer results. Large limit pulls are resumable: if has_next_page is true, pass next_cursor back as cursor with the same query, filters, queryType, and limit. If zero paid results are affordable, it returns 402 insufficient_credits.
Use Search Tweets as an advanced Twitter search API for keywords, hashtags, operators, dates, authors, media, and engagement filters. For exact lookup, send a Tweet ID or X status URL in q with no time params. To search one user’s tweets as a plain timeline, call Search user tweets (GET /x/users/{id}/tweets). Date params append since: and until: search operators to q, so q=from:username&sinceTime=2026-05-01&untilTime=2026-05-02 stays on search.
1 credit per tweet returned · All plans from $0.00012/credit
Omit mode for automatic maximum coverage. Xquik combines available views within a short request window. It keeps the existing response shape. Pass next_cursor back unchanged as cursor. Keep the same endpoint, target, query, and filters.
Existing unprefixed cursors keep their legacy behavior. after, limit, and pageSize aliases also keep working. Billing still counts only returned rows. Use mode=standard only to force legacy single-view pagination. A page can be empty or underfilled. Continue while has_next_page is true. Stop only after the response reports has_next_page=false. If automatic coverage is busy, an initial request returns a standard data page. Live coverage cursors remain atomic. Concurrent use returns 409 coverage_cursor_unavailable with exact Retry-After seconds. Wait, then retry the same cursor once. Finished, expired, superseded, or identity-mismatched cursors return 410 coverage_cursor_gone. The response omits Retry-After. Restart without a cursor. Deduplicate restarted results by id. Malformed cursors return 400 invalid_coverage_cursor. Restart without them.
Fresh searches return available automatic rows when some views fail. If automatic coverage cannot start, Xquik uses standard pagination. Coverage cursors never switch sources mid-sequence.

Direct API handoff

Use GET /x/tweets/search when an app, queue worker, CRM enrichment job, or agent needs the latest matching tweets without creating a stored extraction job. It returns paginated JSON for live search pages and app ingestion. The examples above write JSON Lines rows with tweet fields, author ID, username, display name, follower count, verified state, profile image URL, media, and cursor fields so a worker can resume from the last saved next_cursor. Use tweet_search_extractor instead when a team needs an estimate, extraction ID, saved result pages, or CSV, JSON, and XLSX downloads after completion.

Live search page

Call GET /x/tweets/search with q, filters, queryType, limit, and cursor for low-latency JSON rows.

Exact tweet lookup

Send a plain Tweet ID or X status URL in q when the source queue stores links.

Saved export job

Run tweet_search_extractor for estimates, job status, stored pages, and downloadable files.
For explicit limit pulls, treat limit as a batch-size upper bound. If the response returns fewer tweets than limit and has_next_page is true, store next_cursor and continue with the same q, structured filters, queryType, and limit plus cursor. De-duplicate stable IDs and reject repeated cursors. Return a partial-result checkpoint if pagination stalls. For account date windows, sinceTime and untilTime append since: and until: to q. Inline since_time: and until_time: intersect. The start is inclusive. The end is exclusive. q=from:username&sinceTime=2026-05-01&untilTime=2026-05-02 behaves like from:username since:2026-05-01 until:2026-05-02. Use queryType=Latest for backfills or keywords for ranked search. Bounds apply to every returned page. Coverage continues past rejected rows. Bare q=from:username uses automatic timeline and search coverage. Continue when the response includes next_cursor. Use mode=standard only when an old integration requires the legacy single-page timeline behavior. For exact lookups, a plain Tweet ID or X status URL in q returns that tweet when available. Send no cursor on the first lookup; cursor requests return an empty final page for exact IDs. For CSV or XLSX output, project the returned tweets[] rows locally or use tweet_search_extractor for saved CSV, JSON, or XLSX files.

Advanced Twitter search patterns

Tweet rows

Store tweets[] as the matching tweet rows for app ingestion, analyst export, or retrieval.

Tweet keys

Store tweets[].id as the stable tweet key for dedupe, CRM notes, queues, and follow-up lookups.

Search context

Store tweets[].text and tweets[].createdAt for search hit context and time ordering.

Author joins

Store tweets[].author.id, tweets[].author.username, tweets[].author.name, tweets[].author.followers, tweets[].author.verified, and tweets[].author.profilePicture for author joins and enrichment.

Scoring fields

Store engagement counts for scoring, routing, and prioritization.

Relationship context

Store tweets[].media, quoted_tweet, and retweeted_tweet to preserve attached media and relationship context when available.

Next page

Store has_next_page and next_cursor as the cursor handoff. For bounded limit batches, keep the same query, filters, queryType, and limit when resuming.

File exports

Use tweet_search_extractor when the output must be saved CSV, JSON, or XLSX.
Tweet search costs 1 credit per tweet returned. Low credit balances can return fewer tweets than limit; zero affordable results return 402 insufficient_credits. Retry 429 with the Retry-After header, and retry 424 or 502 after a short backoff.

Query parameters

string
required
Send the caller’s query without adding terms or filters. Supports X search operators, Tweet IDs, and X status URLs.
string
Top ranks best or most-liked results. A like minimum alone uses Latest. The default is Latest.
string
Optional compatibility override. Omit it for automatic maximum coverage. Use standard for legacy single-view pagination. Use coverage for a one-shot diagnostic response without cursor pagination.
string
Pass next_cursor back unchanged. New Xquik cursors resume automatic coverage. Existing unprefixed cursors keep legacy behavior.
string
Inclusive lower bound. Intersects with inline bounds.
string
Exclusive upper bound. Intersects with inline bounds.
integer
Maximum Tweets requested per automatic page. Use 1 through 10000. A page can return fewer. Keep the same limit when continuing with cursor.

Structured filters

Structured filters are part of the public Search Tweets API. Use X search operators. Keep the same filters on every cursor request.
string
Filter to posts from this username. The @ prefix is optional.
string
Filter to replies directed to this username.
string
Filter to posts that mention this username.
string
Only include posts with this language code.
string
Include posts created on or after this date or timestamp.
string
Include posts before this date or timestamp.
string
Use images, videos, gifs, media, links, or none.
integer
Require this minimum like count.
integer
Require this minimum repost count.
integer
Require this minimum reply count.
integer
Require this minimum quote count.
integer
Require this minimum view count.
integer
Require this minimum bookmark count.
integer
Allow this maximum like count. Missing counts pass.
integer
Allow this maximum repost count. Missing counts pass.
integer
Allow this maximum reply count. Missing counts pass.
integer
Allow this maximum quote count. Missing counts pass.
boolean
When true, only return posts from Blue-verified authors.
boolean
When true, only return posts from verified authors.
string
Use include, exclude, or only for replies.
string
Use include, exclude, or only for reposts.
string
Require this exact phrase.
string
Exclude comma-separated or whitespace-separated terms.
string
Require at least 1 comma-separated or whitespace-separated term.
string
Match these hashtags. Separate values with commas or spaces.
string
Match these cashtags. Separate values with commas or spaces.
string
Use include, exclude, or only for quote posts.
string
URL substring or domain that must appear in tweet URL entities.
string
Filter to tweets in this conversation thread.
string
Only include replies to this tweet ID.
string
Filter to quote tweets of this tweet ID.
string
Filter to retweets of this tweet ID.
string
Match the Tweet card name.
string
Match the source application.
string
Exclude Tweets from this source application.
string
Match latitude, longitude, and radius in X search syntax.
string
Return Tweets newer than this Tweet ID.
string
Return Tweets older than this Tweet ID.
string
Match this place name.
string
Set the radius for the near filter.
string
Match Tweets inside this recent time window.
boolean
When true, only return native reposts.
boolean
When true, enable X safe-search filtering.
boolean
When true, only return news results.

Search-only operators

These query parameters apply only to GET /x/tweets/search because they map to search operators before the request runs. Use advancedQuery only when you already have trusted raw X search operator syntax to append.
string
Search within this X List ID.
string
Search within this X place ID.
string
Search within this country code.
string
Geo point radius in X search syntax, such as -73.99 40.73 25mi.
string
Geo bounding box in X search syntax, such as -74.1 40.6 -73.9 40.8.
string
Raw X search operators appended to the final search query.

Headers

string
Full account key. Sessions and OAuth also work.
string
Bearer xq_your_guest_key_here for paid_reads.

Response

200 OK

object[]
Array of matching tweets. Tweet object fields. Fields absent from a source tweet are omitted.
string
Tweet ID.
string
Tweet text.
string
Tweet type.
string
ISO 8601 creation time.
boolean
Whether this is a Note Tweet.
number
Like count.
number
Repost count.
number
Reply count.
number
Quote count.
number
View count.
number
Bookmark count.
string
Tweet URL.
string
Tweet language code.
boolean
Whether the tweet is a reply.
string
Tweet ID being replied to. Omitted if not a reply.
string
User ID being replied to. Omitted if not a reply.
string
Username being replied to. Omitted if not a reply.
string
Conversation thread ID.
string
Tweet client.
number[]
Rendered text offsets.
boolean
Whether replies are limited.
boolean
Whether this tweet quotes another.
object
Parsed entities.
object
Disclosure labels.
object
Tweet author profile. Author object fields.
string
Author user ID.
string
Author X username.
string
Author display name.
number
Follower count.
number
Following count.
boolean
Whether the author is verified.
string
Profile image URL.
string
Cover image URL.
string
Profile bio.
string
Profile location.
string
Account creation date.
number
Total tweet count.
object[]
Attached media items. Omitted when the tweet has no attached media. Media item fields.
string
Direct media URL (pbs.twimg.com).
object[]
Video variants. Omit for images.
string
Media type: photo, video, or animated_gif.
string
Shortened t.co URL from the tweet text.
object
Embedded quoted tweet (same shape as tweet object). Omitted if not a quote tweet.
object
Original retweeted tweet (same shape as tweet object). Omitted if not a retweet.
boolean
Whether more results are available. Pass next_cursor to fetch the next page.
string
Opaque cursor for the next page. Empty string when no more results.

400 Missing query

The q query parameter is empty or missing.

401 Unauthenticated

Anonymous requests get WWW-Authenticate: Bearer and a guest wallet checkout action. This is not a Payment challenge.
Missing or invalid API key. Check the x-api-key header value.

402 Payment required

Account keys get account options; guest keys get guest top-up only. No checkout starts automatically. Confirm any payment action.

502 X API unavailable

The read service returned an error. Retry after a short delay.

429 Rate limit exceeded

Your tier rate limit was exceeded. Wait for the Retry-After header before retrying.

424 Dependency failed

The normalized v1 response contract can return 424 when the read service is unavailable.
Next steps. Tweet Search Export Workflow when you need saved CSV, JSON, or XLSX files, Get Tweet to fetch full details for a specific tweet, or Get User to look up an author profile.