x/
search

Search public X posts through the Twitter Search API with one focused expression, choose latest or top ordering, and receive matching content, authors, engagement, media, entities, and source-query context.

Twitter Search API

Query discovery
Latest or Top
Source-query trace
0.7 credits / result
Ready
Ready

Enter parameters and send a request. The task status and normalized results will appear here.

README

Twitter Search

X search results are public posts selected for a query, carrying the language, author, media, entities, conversation context, and visible engagement of each match. Keeping the query beside every record makes recurring topic scans, launch listening, and result-set comparisons easier to audit.

Twitter Search API Features

  • Discovery from one expressionSubmit a non-empty keyword or search expression and turn its matching public X posts into structured records.
  • Ordering for two research modesUse latest to follow recent matches or top to review prominent matches, with latest selected by default.
  • A practical search-result capRequest 20 to 2,000 results from the Twitter Search API in increments of 20 to set the maximum depth of the search collection.
  • Matches that retain their queryCombine text, author, engagement, media, entities, timestamps, and relationship fields with extra.search_query and collected_at.

Twitter Search API Parameters

ParametersRequiredDescription
queryRequiredRequired non-empty keyword or X post search expression used to discover matching public posts.
results_limitOptionalOptional requested result cap. Defaults to 20 and accepts multiples of 20 from 20 to 2,000.
sort_byOptionalOptional ordering with latest for recent matches or top for prominent matches. Defaults to latest.

How to Use the Twitter Search API

Frame a precise research question as a search expression for the Twitter Search API, select the ordering that fits it, and preserve the query with the resulting posts.

  1. Write one focused, non-empty expression for the X posts you want to find.
  2. Select latest or top and choose a results_limit from 20 to 2,000 in increments of 20.
  3. POST the request to /v1/x/search, then poll /v1/tasks/{task_id} until completion.
  4. Store data.results.items, then follow next_cursor until has_more becomes false.
curl -X POST "https://api.socq.ai/v1/x/search" \
  -H "Authorization: Bearer $SOCQ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"artificial intelligence","results_limit":40,"sort_by":"latest"}'

# Poll GET /v1/tasks/{task_id}
# Read data.results.items and follow next_cursor while has_more is true

Twitter Search API Use Cases

  • Listen around a named launch: Search a product, release, conference, or campaign phrase and organize matching posts by publication and collection time.
  • Track brand and product mentions: Bring authors, text, visible engagement, hashtags, mentions, and media together for a focused name or phrase.
  • Map a developing topic: Use latest results to follow new posts and top results to inspect prominent content within the same research expression.
  • Maintain a recurring query dataset: Store extra.search_query with every match, rerun a versioned expression, and append only previously unseen post IDs.

Twitter Search API Pro Tips

  • Begin with a focused expression, inspect the matches, and broaden the wording only when coverage is too narrow.
  • Choose latest for time-sensitive listening and top when prominent matches matter more than chronology.
  • Set results_limit as a multiple of 20 and interpret it as a cap, not a guaranteed result count.
  • Version the query whenever its terms change so recurring result sets remain comparable.
  • Deduplicate by post id while retaining extra.search_query and collected_at for discovery context.

Beyond the Twitter Search API, use these APIs when you need a different type of public X data.

  • Twitter Tweet Scraper API — Retrieve public post text, authors, engagement, media, hashtags, mentions, and conversation relationships from x.com or twitter.com status URLs.
  • Twitter Profile Scraper API — Retrieve public account identity, biographies, avatars, cover images, account status, and visible audience statistics by username.
  • X Post Replies API — Collect public replies from X post URLs with selectable ordering, reply text, authors, visible engagement, media, and parent-post context.
  • X Trends API — Collect current public X trend snapshots for known numeric WOEIDs with source rank, query, description, and location context.
  • Twitter User Search API — Find public X accounts by keyword.
  • X Communities Search API — Find communities by keyword, with member counts and links for the member and post endpoints.

Explore other platforms

Combine X data with public data from other supported social platforms.

Twitter Search API — FAQ

Twitter Search API finds public X posts for one search expression. It returns structured post content, authors, engagement, media, entities, relationships, and the source query.

Use one non-empty keyword or search expression that describes the brand, product, event, phrase, or topic you want to investigate.

Choose latest to prioritize recent matches and top to review prominent matches. latest is the default.

results_limit defaults to 20 and accepts multiples of 20 from 20 to 2,000. It defines the maximum requested result count.

A result can include text, language, author data, visible engagement, media, hashtags, mentions, timestamps, and conversation relationships.

Yes. extra.search_query carries the submitted expression so the match can remain connected to its discovery rule.

The limit is a collection ceiling, while the actual count reflects eligible public matches available when the task runs.

The Twitter Search API charges 0.7 SocQ credits for each returned normalized search result.

By SocQ · Updated

From the official X API documentation:

“The X API uses pay-per-usage pricing. No subscriptions—pay only for what you use.”
X Developer Platform: X API introduction · accessed November 2026