Skip to Content
Documentation

Search posts

Twitter Search API · 15 points per successful call

Product overview and demoAll Twitter (X) API endpointsError codes

GET
/v1/twitter/search

Searches public posts, latest first or X’s top ranking, about 20 per page. The query takes X’s search operators (from:NASA, lang:en, since:2026-01-01, "exact phrase", -exclude). Ads are left out. No match is an empty page, not an error. Page with meta.pagination.next_cursor, which is null on the last page.

Authorization

bearerAuth
headerAuthorizationBearer <token>

Your API key, sent as a bearer token. In the console on this page you can leave it empty: signed in, calls run on your own plan; otherwise they run on a shared demo key after a quick human check.

Query Parameters

query*string

What to search for, with X’s operators (from:, lang:, since:, "exact phrase" …).

Length1 <= length <= 500
type?string

latest for newest first, top for X’s ranking.

Default"latest"
Value in"latest""top"
cursor?string

Opaque cursor from meta.pagination.next_cursor of a previous response.

Response Body

Successful response

application/json
  1. response
meta*
data*
Example Request
curl -X GET 'https://api.endpointry.com/v1/twitter/search?query=cloudflare&type=latest'
Example Response
{
  "meta": {
    "request_id": "req_7729f93d3facf68ff83e5c50",
    "as_of": "2026-11-24T12:00:00.000Z",
    "pagination": {
      "next_cursor": "YjNiNDk1ZTI6REFBSENnQUJIWDVXUWJ2X18tc0xBQUlB",
      "returned": 1
    }
  },
  "data": {
    "tweets": [
      {
        "id": "2124940993489162256",
        "url": "https://x.com/NASA/status/2124940993489162256",
        "created_at": "2026-11-23T18:59:46.000Z",
        "author": {
          "id": "11348282",
          "username": "NASA",
          "name": "NASA",
          "verified": true,
          "profile_image_url": "https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB_400x400.jpg"
        },
        "text": "Happy Thanksgiving from the @Space_Station!",
        "lang": "en",
        "likes": 4832,
        "retweets": 606,
        "replies": 171,
        "quotes": 33,
        "bookmarks": 228,
        "views": 986529,
        "conversation_id": "2124940993489162256",
        "in_reply_to": null,
        "hashtags": [],
        "mentions": [
          {
            "id": "1451773004",
            "username": "Space_Station"
          }
        ],
        "urls": [],
        "media": [
          {
            "type": "video",
            "url": "https://pbs.twimg.com/media/HX1OkiYWQAAGf8b.jpg",
            "width": 720,
            "height": 405,
            "alt_text": null,
            "duration_ms": 165965,
            "video_url": "https://video.twimg.com/amplify_video/2124940778208215040/vid/avc1/1920x1080/ZPhFDSjcq_onYTBH.mp4?tag=16"
          }
        ],
        "sensitive": false,
        "quoted_tweet": null,
        "retweeted_tweet": null
      }
    ]
  }
}