100 free credits. No credit card required.Start building
Logo
X logo
100 free credits. No credit card required

X Search Tweets API

Scrape X Search Tweets data with one API call. Searches X (Twitter) for tweets matching a keyword or phrase, each result with the full text, like count, retweet count, reply count, bookmark count, view count, media attachments, author info, and creation timestamp. Long-form posts return their complete body, not the 280-character clamp. t.co links in the text are resolved to their destinations. A post carrying more than one photo lists every URL in `post.ext.all_media_urls`, while `post.content.media_urls` holds the first; `post.ext.quote_count` is how many times the post was quote-tweeted. X search operators inside `query` narrow the search itself: `since:`/`until:` (YYYY-MM-DD), `from:handle`, quoted exact phrases, `filter:images`, and `filter:videos`. The `since` and `until` parameters filter the returned rows instead, and `since` ends a newest-first walk at that date. `sort` picks the ranking: `latest` (the default) returns the newest matches first, `top` returns the most POPULAR ones, which on an unquoted multi-term query means engagement-ranked rather than relevance-ranked, so `meltwater expensive contract` can return high-engagement posts about none of those things. Quote the phrase, or pin the topic with an operator such as `min_faves:20`, when you need precision from `top`. Page size is set by the source, typically around 20 tweets. To go deeper, send `pagination.next_cursor` back as `cursor` and repeat until `pagination.has_more` is false; each page costs 1 credit. When the main source cannot fetch a page, a second source answers it; a `latest` walk carries on from the last post you received, while a `top` search answered that way is one page with no cursor.

Last updated October 2026Maintained by the SocialCrawl team

Returns tweets matching a keyword or phrase, each with the full text, like, retweet, reply, bookmark and view counts, media attachments, author info, and creation time.

Use it to track a topic or brand across X. Operators like from:, quoted phrases, filter:images, and since:/until: work inside query; sort picks latest (default) or top, the cursor pages deeper.

Searching 68 platforms in parallel

·TikTok logoTikTok·Instagram logoInstagram·YouTube logoYouTube·Facebook logoFacebook·X logoX·LinkedIn logoLinkedIn·Reddit logoReddit·Threads logoThreads·Pinterest logoPinterest·Twitch logoTwitch·Truth Social logoTruth Social·Snapchat logoSnapchat·Kick logoKick·Bluesky logoBluesky·Kwai logoKwai·Rumble logoRumble·Spotify logoSpotify·Apple Music logoApple Music·TikTok Shop logoTikTok Shop·Amazon Shop logoAmazon Shop·Google Shopping logoGoogle Shopping·Trustpilot logoTrustpilot·TripAdvisor logoTripAdvisor·Yelp logoYelp·Linktree logoLinktree·Komi logoKomi·Pillar logoPillar·lnk.bio logolnk.bio·Facebook Ads logoFacebook Ads·Google Ads logoGoogle Ads·LinkedIn Ads logoLinkedIn Ads·Google Search logoGoogle Search·Google News logoGoogle News·Finance logoFinance·Polymarket logoPolymarket·Tavily logoTavily·Hacker News logoHacker News·GitHub logoGitHub·Perplexity logoPerplexity·Naver logoNaver·Utility logoUtility·Universal Search logoUniversal Search
·TikTok logoTikTok·Instagram logoInstagram·YouTube logoYouTube·Facebook logoFacebook·X logoX·LinkedIn logoLinkedIn·Reddit logoReddit·Threads logoThreads·Pinterest logoPinterest·Twitch logoTwitch·Truth Social logoTruth Social·Snapchat logoSnapchat·Kick logoKick·Bluesky logoBluesky·Kwai logoKwai·Rumble logoRumble·Spotify logoSpotify·Apple Music logoApple Music·TikTok Shop logoTikTok Shop·Amazon Shop logoAmazon Shop·Google Shopping logoGoogle Shopping·Trustpilot logoTrustpilot·TripAdvisor logoTripAdvisor·Yelp logoYelp·Linktree logoLinktree·Komi logoKomi·Pillar logoPillar·lnk.bio logolnk.bio·Facebook Ads logoFacebook Ads·Google Ads logoGoogle Ads·LinkedIn Ads logoLinkedIn Ads·Google Search logoGoogle Search·Google News logoGoogle News·Finance logoFinance·Polymarket logoPolymarket·Tavily logoTavily·Hacker News logoHacker News·GitHub logoGitHub·Perplexity logoPerplexity·Naver logoNaver·Utility logoUtility·Universal Search logoUniversal Search
·TikTok logoTikTok·Instagram logoInstagram·YouTube logoYouTube·Facebook logoFacebook·X logoX·LinkedIn logoLinkedIn·Reddit logoReddit·Threads logoThreads·Pinterest logoPinterest·Twitch logoTwitch·Truth Social logoTruth Social·Snapchat logoSnapchat·Kick logoKick·Bluesky logoBluesky·Kwai logoKwai·Rumble logoRumble·Spotify logoSpotify·Apple Music logoApple Music·TikTok Shop logoTikTok Shop·Amazon Shop logoAmazon Shop·Google Shopping logoGoogle Shopping·Trustpilot logoTrustpilot·TripAdvisor logoTripAdvisor·Yelp logoYelp·Linktree logoLinktree·Komi logoKomi·Pillar logoPillar·lnk.bio logolnk.bio·Facebook Ads logoFacebook Ads·Google Ads logoGoogle Ads·LinkedIn Ads logoLinkedIn Ads·Google Search logoGoogle Search·Google News logoGoogle News·Finance logoFinance·Polymarket logoPolymarket·Tavily logoTavily·Hacker News logoHacker News·GitHub logoGitHub·Perplexity logoPerplexity·Naver logoNaver·Utility logoUtility·Universal Search logoUniversal Search
·TikTok logoTikTok·Instagram logoInstagram·YouTube logoYouTube·Facebook logoFacebook·X logoX·LinkedIn logoLinkedIn·Reddit logoReddit·Threads logoThreads·Pinterest logoPinterest·Twitch logoTwitch·Truth Social logoTruth Social·Snapchat logoSnapchat·Kick logoKick·Bluesky logoBluesky·Kwai logoKwai·Rumble logoRumble·Spotify logoSpotify·Apple Music logoApple Music·TikTok Shop logoTikTok Shop·Amazon Shop logoAmazon Shop·Google Shopping logoGoogle Shopping·Trustpilot logoTrustpilot·TripAdvisor logoTripAdvisor·Yelp logoYelp·Linktree logoLinktree·Komi logoKomi·Pillar logoPillar·lnk.bio logolnk.bio·Facebook Ads logoFacebook Ads·Google Ads logoGoogle Ads·LinkedIn Ads logoLinkedIn Ads·Google Search logoGoogle Search·Google News logoGoogle News·Finance logoFinance·Polymarket logoPolymarket·Tavily logoTavily·Hacker News logoHacker News·GitHub logoGitHub·Perplexity logoPerplexity·Naver logoNaver·Utility logoUtility·Universal Search logoUniversal Search
X API

What can you do with the Search Tweets API?

The Search Tweets endpoint gives you structured X data with computed fields in a single request. No scraping infrastructure to build or maintain.

Example Request

curl -H "x-api-key: YOUR_API_KEY" \
  "https://www.socialcrawl.dev/v1/twitter/search/tweets?query=nike+running+shoes&label=sponsored&relevance=filter"
import requests

response = requests.get(
    "https://www.socialcrawl.dev/v1/twitter/search/tweets",
    params={
    'query': 'nike running shoes',
    'label': 'sponsored',
    'relevance': 'filter',
    },
    headers={"x-api-key": "YOUR_API_KEY"},
)

data = response.json()
const response = await fetch(
  "https://www.socialcrawl.dev/v1/twitter/search/tweets?query=nike+running+shoes&label=sponsored&relevance=filter",
  {
    headers: { "x-api-key": "YOUR_API_KEY" },
  },
);

const data = await response.json();

Parameters worth sending

  • label=sponsored Marks each post that is paid or sponsored, at no extra credits; intent and niche are free too.
  • relevance=filter Drops rows that are not about your query, at no extra credits; relevance=score keeps them and adds a score.

Parameters

ParameterRequiredDescription
queryYesKeyword or phrase to search tweets for. X operators inside this string narrow the search itself, for example since:YYYY-MM-DD, until:YYYY-MM-DD, from:handle, quoted phrases, min_faves:20, filter:images, and filter:videos. Quote a multi-word phrase when you want relevance rather than engagement ranking from sort=top
sortNoResult ranking: latest (default) for the newest matches first, top for the most popular matches. top ranks by engagement, not relevance, so an unquoted multi-term query can return popular posts that match none of your terms. Quote the phrase or add an operator to tighten it (latest | top)
cursorNoCursor from the previous response's pagination.next_cursor to fetch the next page
switch_fromNoOptional brand. data.switch_receipts lists posts where the author says they personally left that brand, with the verbatim text, the reason, where they went, and a link. There is no percentage. No extra credits.
relevanceNoOptional. Without this param every row already carries computed.relevance against your query, free ({ p, sense, depth, spam }: is this row about what your query means, or a different thing that shares its words?), and nothing is dropped or reordered. score asks for it explicitly and waits for every row; filter also drops the rows that are not about your query, and lists their ids in data.relevance.dropped_ids. Your query is the topic; nothing to configure. A row that could not be judged is never dropped and carries relevance: null. Pagination is unchanged, so a filtered page can hold fewer rows. Free with your query as the topic; with relevant_to it adds 1 credit per started 25 newly judged rows (rows already judged for the same topic are free, and so is a cached page). (score | filter)
relevance_thresholdNoOptional, only with relevance. The probability (0 to 1) a row must reach to be kept by relevance=filter. Default 0.5. Lower keeps more rows, higher keeps fewer.
relevant_toNoOptional, only with relevance. Up to 200 characters describing what you mean, used as the topic instead of the query. Use it when the query is ambiguous, for example query=cleopatra with relevant_to=Cleopatra, the IGT slot game.
judgmentsNoOptional, on (the default) or off. By default every row gains free SocialCrawl judgments (computed.labels, and computed.relevance on search endpoints), reported in data.labels (mode default) and data.relevance (origin default), each with a status (complete, partial or skipped) and pending: the rows still being judged when the page was sent, which carry null now and are filled on your next call or cached read. Default judgments never add credits, never change an existing field, and never drop or reorder a row. off returns the page exactly as before, with none of those keys. label=none does the same. (on | off)
dry_runNoOptional. When 1, return a cost preview for this labelled or relevance-filtered request without fetching the page or judging any row. data.estimate reports rows_expected, rows_cached, label_credits_min, label_credits_max and base_credits. 0 credits charged. (1)
fitNoOptional. When goal, keep the rows and fields needed for the goal you pass in goal= (plus any that are uncertain, and the first and last), and replace the rest with a stub. data.held_back lists the held ids and a recall id that re-reads the full page from cache at no extra charge. Without this param the page is unchanged. (goal)
goalNoRequired by fit=goal. What you are trying to do, in your own words, up to 300 characters.
fit_tokensNoOptional, only with fit=goal. Soft cap on how much of the page to keep, in tokens. Uncertain blocks and the first and last block are kept even if they exceed it.
labelNoOptional CSV of SocialCrawl labels to add to every post. Without this param every page already carries sponsored, intent and niche, free; label= adds the labels you name to them (the defaults keep running). sponsored, intent and niche are free when asked for too; mention, quality, intent with offer=, and injection add 1 credit per started 25 newly judged posts. judgments=off (or label=none) turns the default labels off. sponsored: is the post a paid or gifted promotion (p, 0 to 1), did it carry a disclosure marker such as #ad or 광고 (disclosed), is it likely paid with no marker (undisclosed), and which of the accounts it mentions does it promote (brand, or null). These are signals to review, never a finding. mention (needs brand=): is the post about that brand rather than something that shares its name (about_brand, 0 to 1), how it feels about the brand on five levels (sentiment_level 0 to 4 and sentiment_score 0 to 1, null when the post is not about the brand), is it sarcastic, which aspect it talks about (taste_or_quality, price_or_value, availability_or_delivery, health_or_safety, advertising_or_campaign, customer_service, none), and did the author buy or use it (first_hand). intent: what the author is mainly doing (label: asking_for_recommendation, comparing_options, switching_away, complaining, promoting, news_or_discussion, other, or null when unsure, with confidence), whether they read as a potential buyer rather than a seller (buyer, seller), how pressing the need is (urgency, 0 to 3), and, when you pass offer=, whether your offer would plausibly help them (fits_offer). niche: which of the 33 niches of the published taxonomy sc-niche-v1 the caption belongs to, or personal_no_niche, or other (label, confidence, taxonomy), with label null when the caption is too thin to tell or the pick is unsure. It reads the caption only, not the video. quality: how much checkable detail the caption carries (fact_density 0 to 3), whether it mainly asks for likes, replies, shares, follows or tags (engagement_bait, 0 to 1), whether it is written to provoke anger as a way to get engagement (rage_bait, 0 to 1; about the writing, never the side taken), whether it only repeats someone else's news or view (secondhand, 0 to 1), and what the post is mainly doing (post_aim: inform, opinion, sell, entertain, provoke, other). exclude=engagement_bait drops posts whose engagement_bait is 0.8 or higher. injection flags text that addresses an AI system and tries to direct it (flagged, p); it never drops or rewrites a row. A post that could not be judged carries labels: null. Posts already labelled for anyone are free, and so is a cached page. data.labels reports what was judged and billed.
excludeNoOptional CSV (engagement_bait), only with label=quality. Drops posts whose engagement_bait probability is 0.8 or higher and lists their ids in data.labels.dropped_ids. A post that could not be judged is never dropped.
brandNoRequired by label=mention, ignored otherwise. The brand or product the posts are judged against, up to 300 characters, for example brand=Buldak. Without it label=mention is skipped with the warning label_mention_needs_brand and is not billed.
brand_descriptionNoOptional, with label=mention. One plain sentence saying what the brand is, for example brand_description=Samyang's spicy instant noodle brand. Use it when the name is also an ordinary word or another company's name.
offerNoOptional, with label=intent. One or two plain sentences saying what you sell, up to 300 characters, for example offer=A web design agency that builds websites for small businesses. Adds fits_offer to every post; without it fits_offer is null.
label_evidenceNoOptional, only with label=. When 1, every labelled row also carries computed.labels_evidence.<preset> = { quote, sentence_index }: the sentence in the row that most clearly shows the label, copied verbatim. Absent or null when no single sentence shows it. (1)
sinceNoOnly rows published on or after this date: YYYY-MM-DD (midnight UTC) or an ISO 8601 timestamp. Rows older than it are left off the page, and the page that reaches one ends the walk: `next_cursor` is not returned and `pagination.stopped_at` is `since`. Sending it sets the newest-first sort shown in this endpoint's sort parameter (any other sort value is a free 400). The page still costs what a page costs, so you pay for the pages you walk and no more. A row with no date is kept. `published_after`, `start_date`, `from_date`, `publish_time` (`yesterday`, `this-week`, `this-month`, `last-3-months`, `last-6-months`) and `max_age_days` are accepted and applied as `since`.
untilNoOnly rows published on or before this date: YYYY-MM-DD (that whole UTC day is included) or an ISO 8601 timestamp. Newer rows are left off each page and the walk does not stop, so older pages follow. A row with no date is kept. `published_before`, `end_date` and `to_date` are accepted and applied as `until`.
min_viewsNoKeep only rows with at least this many views (`post.engagement.views`). A row whose view count is unknown is discarded, so every returned row meets the floor. Filtering runs on our side after each page is fetched, so every page walked is billed as usual; `data.walk.discarded` counts what was removed and why.
max_age_daysNoKeep only rows published within this many days (`post.published_at`), 1 to 3650. A row with no date is discarded. Filtering runs on our side after each page is fetched, so every page walked is billed as usual; `data.walk.discarded` counts what was removed and why.
sort_rowsNo`views`: return the kept rows ordered by view count, highest first, across every page walked. Rows without a view count go last. (views)
max_pagesNo1 to 5 (default 1). Walk up to this many pages in one call and return the rows from all of them (after any filter). Each page walked is billed exactly as one call to this endpoint (a cached page is free) and counts against your rate limit. The walk stops early at the last page, or when the request's time budget runs low; `data.walk.stopped` says why (`end`, `max_pages`, `time_budget`, `page_error`) and `data.next_cursor` continues from where it stopped.
seenNoAn id you choose (1 to 64 letters, digits, `.`, `_` or `-`). Rows your account already received under the same `seen` id are removed from the page, and the page price falls with the share of repeats: page credits x new rows / rows on the page, rounded up, so a page of nothing but repeats is free. Only the page's own price is discounted: credits for joined data (`include=`) are charged only for rows you have not received, and are never discounted. The memory lasts 24 hours from the last call that used the id, holds row ids only, and is private to your account. Use one id across a set of related searches; `data.walk.repeats` counts what was removed.
Example Response

What does the X Search Tweets API return?

Every response follows one unified schema. Here is a real, unmodified response body, so you can see the exact fields you get back before spending a credit.

Example response
{
  "success": true,
  "platform": "twitter",
  "endpoint": "/v1/twitter/search/tweets",
  "data": {
    "items": [
      {
        "post": {
          "id": "2105921048097001600",
          "url": "https://x.com/user_b389f6/status/2105921048097001600",
          "content": {
            "text": "Sample comment text (redacted). Sample comment text (redacted). Sample comment text (redacted). Sample comment text (redacted). Sample comment text (redacted). Sample comment text (redacted). Sample comment text (redacted). Sample comment text (redacted). Sample comment text (redacted). Sample comment text (redacted). Sample comment text (redacted). Sample comment text (redacted). Sample comment text (redacted). Sample comment text (redacted).",
            "media_urls": null,
            "thumbnail_url": null,
            "duration_seconds": null
          },
          "author": {
            "username": "user_b389f6",
            "display_name": "user_75597e",
            "avatar_url": "https://example.com/avatars/user_16049e.png",
            "verified": true
          },
          "engagement": {
            "views": 84,
            "likes": 0,
            "comments": 0,
            "shares": 0,
            "saves": 0
          },
          "flags": {
            "nsfw": null,
            "spoiler": null,
            "pinned": false,
            "deleted": false
          },
          "published_at": "2026-10-02T07:21:18.000Z",
          "ext": {
            "author_followers": 586,
            "author_following": 11,
            "author_posts_count": 607,
            "content_language": "en",
            "quote_count": 0,
            "all_media_urls": null
          }
        },
        "computed": {
          "engagement_rate": 0,
          "language": "en",
          "content_category": "business",
          "estimated_reach": 101,
          "relevance": null,
          "labels": null
        }
      },
      {
        "post": {
          "id": "2105916328628433024",
          "url": "https://x.com/user_b2b619/status/2105916328628433024",
          "content": {
            "text": "Sample comment text (redacted). Sample comment text (redacted). Sample comment text (redacted). Sample comment text (redacted). Sample comment text (redacted). Sample comment text (redacted). Sample comment text (redacted). Sample comment text (redacted). Sample comment text (redacted). Sample comment text (redacted). Sample comment text (redacted). Sample comment text (redacted). Sample comment text (redacted). Sample comment text (redacted).",
            "media_urls": null,
            "thumbnail_url": null,
            "duration_seconds": null
          },
          "author": {
            "username": "user_b2b619",
            "display_name": "user_44661d",
            "avatar_url": "https://example.com/avatars/user_34343f.png",
            "verified": true
          },
          "engagement": {
            "views": 27,
            "likes": 1,
            "comments": 0,
            "shares": 0,
            "saves": 0
          },
          "flags": {
            "nsfw": null,
            "spoiler": null,
            "pinned": false,
            "deleted": false
          },
          "published_at": "2026-10-02T07:02:33.000Z",
          "ext": {
            "author_followers": 873,
            "author_following": 1512,
            "author_posts_count": 16187,
            "content_language": "en",
            "quote_count": 0,
            "all_media_urls": null
          }
        },
        "computed": {
          "engagement_rate": 0.037037,
          "language": "en",
          "content_category": "other",
          "estimated_reach": 32,
          "relevance": null,
          "labels": null
        }
      }
    ],
    "total": null,
    "relevance": {
      "mode": "score",
      "topic_source": "query",
      "rows": 20,
      "scored": 8,
      "cached": 0,
      "kept": 20,
      "dropped": 0,
      "dropped_ids": [],
      "unjudged": 0,
      "too_short": 0,
      "threshold": 0.5,
      "extra_credits": 0,
      "methodology_version": "relevance/2",
      "origin": "default",
      "pending": 12,
      "pending_ids": [
        "2105921048097001600",
        "2105916328628433024"
      ],
      "status": "partial"
    },
    "labels": {
      "presets": [
        "sponsored",
        "intent"
      ],
      "rows": 20,
      "labelled": 0,
      "cached": 0,
      "skipped": 0,
      "unjudged": 0,
      "dropped": 0,
      "dropped_ids": [],
      "extra_credits": 0,
      "methodology_version": "labels/1",
      "mode": "default",
      "status": "partial",
      "pending": 20,
      "pending_ids": [
        "2105921048097001600",
        "2105916328628433024"
      ]
    },
    "dropped": 0
  },
  "credits_used": 1,
  "request_id": "req_example000000",
  "cached": false,
  "pagination": {
    "next_cursor": null,
    "has_more": false,
    "page_size": 20
  },
  "credits_remaining": 9999,
  "source": "captured",
  "captured_at": "2026-10-02T07:30:40.236Z",
  "redacted": true
}

Live sample illustrating the unified response shape. Field values reflect the record you query.

API Details

How does the X Search Tweets API work?

Send a GET request with your API key and get back clean, structured JSON in our unified schema. Supported computed fields are populated when the source provides the required inputs.

Method

GET

Response

JSON

Why SocialCrawl

Why use SocialCrawl for X Search Tweets data?

We handle the complexity of X data extraction so you can focus on building. Unified schema, AI enrichment, and zero platform logic in your code.

Developer First

How do you scrape social media data in seconds?

The fastest social media scraping API for developers. Scrape profiles, posts, comments, and analytics from 68 platforms covering 10B+ monthly active users.

One schema, every platform

Query 68 platforms with identical response structures. Write your integration once.

Computed fields, not just scraped

When an endpoint supports these metrics and the source provides the required inputs, the normalized record includes engagement_rate, estimated_reach, content_category, and language. Ready to use.

See your data before you code

Visual Data Explorer. Paste any URL, get rich result cards, sortable tables, CSV export.

import requests

response = requests.get(
    'https://www.socialcrawl.dev/v1/tiktok/profile',
    params={'handle': 'charlidamelio'},
    headers={'x-api-key': 'sc_YOUR_API_KEY'}
)
data = response.json()
[ .JSON ]
{
  "success": true,
  "platform": "tiktok",
  "data": {
    "author": {
      "username": "charlidamelio",
      "followers": 152400000
    },
    "engagement": {
      "likes": 12400000000,
      "engagement_rate": 0.087
    },
    "metadata": {
      "language": "en",
      "content_category": "lifestyle"
    }
  }
}
+ 68 platforms

Ready to scrape X Search Tweets data?

Get your API key and start pulling X data in under 60 seconds.

Start for free

🤖 AI agent or LLM? Read this page as markdown