xAPIs.dev
API Reference · v2
Free Tools{ }OpenAPI YAMLGet API key
API Reference / Tweet / Advanced tweet search

Advanced tweet search

GET/twitter/tweet/advanced_search15 credits

Search recent tweets with advanced query operators, type filters, and cursor pagination. The sample response below is captured from the live API. List endpoints paginate with `has_next_page` and `next_cursor`.

Authentication required
Send your key in the x-api-key header. Requests without a valid key return 401.

Query parameters

query
stringrequired
Search query. Supports operators like from:, #hashtag, and "exact phrase".
queryType
stringoptional
Either "Latest" or "Top". Defaults to "Latest".
cursor
stringoptional
Pagination cursor for the next page.

Response fields

tweetsarray
Array of tweet objects with engagement metrics and author info.
has_next_pageboolean
Whether another page of results is available.
next_cursorstring
Cursor for the next page; null or empty when exhausted.
Request
curl https://v2.xapis.dev/twitter/tweet/advanced_search \
  -G --data-urlencode "query=ai%20agents" \
  -G --data-urlencode "queryType=Latest" \
  -H "x-api-key: $XAPIS_KEY"
Response200 OK
application/json
{
  "tweets": [
    {
      "type": "tweet",
      "id": "2074779532553314665",
      "url": "https://x.com/nightwolf_421/status/2074779532553314665",
      "twitterUrl": "https://twitter.com/nightwolf_421/status/2074779532553314665",
      "text": "@Defi_princesss @Concordium Who are the AI agents though .. they’re doing a good job",
      "source": "Twitter for iPhone",
      "retweetCount": 0,
      "replyCount": 0,
      "likeCount": 0,
      "quoteCount": 0,
      "viewCount": 0,
      "createdAt": "Wed Jul 08 08:56:02 +0000 2026",
      "lang": "en",
      "bookmarkCount": 0,
      "isReply": true,
      "inReplyToId": "2074515531768492329",
      "conversationId": "2074515531768492329",
      "displayTextRange": [
        28
      ],
      "inReplyToUserId": "1473429440906633220",
      "inReplyToUsername": "Defi_princesss",
      "author": {
        "type": "user",
        "userName": "nightwolf_421",
        "url": "https://x.com/nightwolf_421",
        "twitterUrl": "https://twitter.com/nightwolf_421",
        "id": "1721061954704306176",
        "name": "Bobo",
        "isVerified": false,
        "isBlueVerified": false,
        "verifiedType": null,
        "profilePicture": "https://pbs.twimg.com/profile_images/2013981880614334464/xu-jOn9O_normal.jpg",
        "coverPicture": "https://pbs.twimg.com/profile_banners/1721061954704306176/1774441021",
        "description": "",
        "location": "",
        "followers": 1395,
        "following": 164,
        "status": "",
        "canDm": true,
        "canMediaTag": true,
        "createdAt": "Sun Nov 05 07:09:01 +0000 2023",
        "entities": {
          "description": "…",
          "url": "…"
        },
        "fastFollowersCount": 0,
        "favouritesCount": 42279,
        "hasCustomTimelines": true,
        "isTranslator": false,
        "…": "…"
      },
      "extendedEntities": {},
      "card": null,
      "place": {},
      "…": "…"
    }
  ],
  "has_next_page": true,
  "next_cursor": "DAADDAABCgABHMsY_gEXYWkKAAIcyxhE6ZZwKwAIAAIAAAACCAADAAAAAAgABAAAAAAKAAUcyxkZUsAnEAoABhzLGRlSv9jwAAA"
}
base url · https://v2.xapis.dev
Ready to call Advanced tweet search?