---
title: "Advanced tweet search"
method: GET
path: "/v1/twitter/tweets/advanced_search"
tags: ["Tweets"]
---

# Advanced tweet search

`GET /v1/twitter/tweets/advanced_search`

Search for tweets using advanced query syntax. Supports filtering by Top, Latest, or Media results. Use Twitter's advanced search operators in the query (e.g., `from:username`, `since:2024-01-01`, `min_faves:100`). Essential for monitoring, research, and content discovery.

## Query parameters

- `query` string, required
- `query_type` 'Top' | 'Latest' | 'Media'
- `count` integer
- `cursor` string

## Response `200`

Successfully retrieved search results.

- TweetsResponse — Paginated list of tweets.
  - `data` TweetData[], nullable — Array of tweet objects.
    - `id` string, required — Unique tweet identifier.
    - `text` string, required — The tweet text content.
    - `full_text` string, nullable — Full text of the tweet, including extended content beyond 280 characters.
    - `created_at` string, required — Timestamp when the tweet was created.
    - `lang` string, nullable — BCP 47 language tag of the tweet content.
    - `user_id` string, nullable — Numeric ID of the tweet author.
    - `username` string, nullable — Username (screen name) of the tweet author.
    - `user_name` string, nullable — Display name of the tweet author.
    - `favorite_count` integer — Number of times this tweet has been liked.
    - `retweet_count` integer — Number of times this tweet has been retweeted.
    - `reply_count` integer — Number of replies to this tweet.
    - `quote_count` integer — Number of times this tweet has been quoted.
    - `view_count` integer, nullable — Number of times this tweet has been viewed.
    - `bookmark_count` integer, nullable — Number of times this tweet has been bookmarked.
    - `favorited` boolean — Whether the authenticated user has liked this tweet.
    - `retweeted` boolean — Whether the authenticated user has retweeted this tweet.
    - `bookmarked` boolean — Whether the authenticated user has bookmarked this tweet.
    - `possibly_sensitive` boolean — Whether the tweet is flagged as possibly containing sensitive content.
    - `is_quote_status` boolean — Whether the tweet is a quote tweet.
    - `is_retweet` boolean — Whether the tweet is a retweet.
    - `conversation_id` string, nullable — ID of the conversation thread this tweet belongs to.
    - `in_reply_to_status_id` string, nullable — ID of the tweet this is a reply to, if applicable.
    - `in_reply_to_user_id` string, nullable — ID of the user this tweet is replying to.
    - `media` Media[] — Media attachments (photos, videos, GIFs).
      - `media_key` string, nullable — Unique identifier for the media.
      - `type` 'photo' | 'video' | 'animated_gif', nullable — Type of media.
      - `url` string, nullable — URL of the media resource.
      - `preview_image_url` string, nullable — URL of the preview/thumbnail image.
      - `width` integer, nullable — Width of the media in pixels.
      - `height` integer, nullable — Height of the media in pixels.
      - `duration_ms` integer, nullable — Duration in milliseconds (for video/GIF).
      - `view_count` integer, nullable — Number of views (for video).
      - `alt_text` string, nullable — Alt text description of the media.
    - `urls` URL[] — URLs mentioned in the tweet.
      - `url` string, required — The shortened t.co URL.
      - `expanded_url` string, nullable — The fully expanded URL.
      - `display_url` string, nullable — Display-friendly version of the URL.
      - `unwound_url` string, nullable — Fully resolved URL after following redirects.
    - `hashtags` Hashtag[] — Hashtags in the tweet.
      - `text` string, required — The hashtag text (without the # symbol).
      - `indices` integer[], nullable — Start and end positions of the hashtag in the tweet text.
    - `user_mentions` UserMention[] — Users mentioned in the tweet.
      - `id` string, nullable — Numeric ID of the mentioned user.
      - `username` string, nullable — Username of the mentioned user.
      - `name` string, nullable — Display name of the mentioned user.
      - `indices` integer[], nullable — Start and end positions of the mention in the tweet text.
    - `poll` Poll — Poll data in a tweet.
      - `id` string, nullable — Unique poll identifier.
      - `voting_status` 'open' | 'closed', nullable — Current voting status.
      - `end_datetime` string, nullable — When the poll ends or ended.
      - `duration_minutes` integer, nullable — Total duration of the poll in minutes.
      - `options` PollOption[] — Poll options with vote counts.
        - `position` integer, required — Position of the option (1-indexed).
        - `label` string, required — Text label of the poll option.
        - `votes` integer, required — Number of votes for this option.
    - `place` Place — Geographic place information attached to a tweet.
      - `id` string, nullable — Unique place identifier.
      - `full_name` string, nullable — Full human-readable place name.
      - `name` string, nullable — Short place name.
      - `country` string, nullable — Country name.
      - `country_code` string, nullable — ISO country code.
      - `place_type` 'city' | 'country' | 'admin' | 'poi' | 'neighborhood', nullable — Type of place.
    - `quoted_status_id` string, nullable — ID of the quoted tweet, if this is a quote tweet.
    - `retweeted_status_id` string, nullable — ID of the original tweet, if this is a retweet.
    - `edit_tweet_ids` string[], nullable — List of tweet IDs in the edit chain.
    - `editable_until_msecs` integer, nullable — Timestamp (milliseconds) until the tweet can be edited.
    - `edits_remaining` integer, nullable — Number of remaining edits allowed.
    - `is_edit_eligible` boolean, nullable — Whether the tweet is eligible for editing.
    - `has_card` boolean, nullable — Whether the tweet has a link preview card.
    - `thumbnail_url` string, nullable — URL of the link preview thumbnail.
    - `thumbnail_title` string, nullable — Title of the link preview card.
    - `has_community_notes` boolean, nullable — Whether the tweet has community notes attached.
    - `source` string, nullable — Client application used to post the tweet.
  - `next_cursor` string, nullable — Cursor for fetching the next page. Null if no more results.

## Other responses

- `401` — Authentication failed. The API key is missing, invalid, or expired.
- `402` — Insufficient credits. Your account balance has been exhausted. Purchase more credits at https://scrapebadger.com/dashboard/billing.
- `429` — Rate limit exceeded. Too many requests in a given time period. Implement exponential backoff and retry.

---

[API](https://skmtc.net/scrapebadger/apis/scrapebadger-account-api.md) · [All operations](https://skmtc.net/scrapebadger/apis/scrapebadger-account-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/scrapebadger/scrapebadger-account-api/versions/4a1ef8777baf/schema)
