Skip to content

Twitter Search Tweets API

Search for tweets using the Twitter Search API, powered searchTweets from agent-twitter-client (no Twitter API key required).

Endpoint

GET https://api.recoupable.com/api/x/search

Parameters

NameTypeRequiredDescription
querystringYesThe search query. Any Twitter-compatible query format can be used.
maxTweetsintYesThe maximum number of tweets to return.
searchModestringNoThe category filter to apply to the search. One of Top, Latest, Photos, Videos, Users. Defaults to Latest.

Supported searchMode values: Top, Latest, Photos, Videos, Users

Request Examples

cURL
curl -X GET "https://api.recoupable.com/api/x/search?query=%23nodejs&maxTweets=10&searchMode=Latest" \
  -H "Content-Type: application/json"

Example Response

{
  "status": "success",
  "tweets": [
    {
      "id": "1922396246674710840",
      "text": "¡Nena revela su nueva web! Un espacio para artistas tras Bonfire con @n_e_n_x ! https://t.co/MZTXWRbn5V",
      "username": "sweetman_eth",
      "timestamp": 1747169956000,
      "createdAt": "2025-05-13T20:59:16.000Z",
      "isReply": false,
      "isRetweet": false,
      "likes": 0,
      "retweetCount": 0,
      "replies": 0,
      "photos": [],
      "videos": [
        {
          "id": "1922396229574512640",
          "preview": "https://pbs.twimg.com/amplify_video_thumb/1922396229574512640/img/CePUg62SJxbOgOH4.jpg",
          "url": "https://video.twimg.com/amplify_video/1922396229574512640/vid/avc1/720x1280/JBlyA2OcoPXMBEiu.mp4?tag=14"
        }
      ],
      "urls": [],
      "permanentUrl": "https://twitter.com/sweetman_eth/status/1922396246674710840",
      "hashtags": []
    },
    {
      "id": "1922358171726729721",
      "text": "studying @duodomusica  \nwith the new attachments \nimages x deep artist research on @base https://t.co/lrtKU8rwsy",
      "username": "sweetman_eth",
      "timestamp": 1747160878000,
      "createdAt": "2025-05-13T18:27:58.000Z",
      "isReply": false,
      "isRetweet": false,
      "likes": 3,
      "retweetCount": 1,
      "replies": 2,
      "photos": [
        {
          "id": "1922358115304960001",
          "url": "https://pbs.twimg.com/media/Gq2WhVHXcAEid6E.jpg"
        }
      ],
      "videos": [],
      "urls": [],
      "permanentUrl": "https://twitter.com/sweetman_eth/status/1922358171726729721",
      "hashtags": []
    },
    {
      "id": "1922310206895120515",
      "text": "@BlackDave Looks like she used them for ticketing\n\nScreenshot from sza IG story shows link to tickets on itm\n\nhttps://t.co/VZi1v44Qem",
      "username": "sweetman_eth",
      "timestamp": 1747149442000,
      "createdAt": "2025-05-13T15:17:22.000Z",
      "isReply": true,
      "isRetweet": false,
      "likes": 0,
      "retweetCount": 0,
      "replies": 1,
      "photos": [],
      "videos": [],
      "urls": [
        "https://x.com/itmstudio/status/1921093688626704718?t=8PbP1GbmeR35dDMZsZijuA&s=19"
      ],
      "permanentUrl": "https://twitter.com/sweetman_eth/status/1922310206895120515",
      "quotedStatusId": "1921093688626704718",
      "inReplyToStatusId": "1922104626435821711",
      "hashtags": []
    }
  ]
}

Response Properties

PropertyTypeDescription
statusstringStatus of the request ("success" or "error")
tweetsarrayList of tweet objects
tweets[].idstringTweet ID
tweets[].textstringTweet text content
tweets[].usernamestringUsername of the tweet author
tweets[].timestampnumberUnix timestamp (ms) of when the tweet was posted
tweets[].createdAtstringISO timestamp of when the tweet was posted
tweets[].isReplybooleanWhether the tweet is a reply
tweets[].isRetweetbooleanWhether the tweet is a retweet
tweets[].likesnumberNumber of likes
tweets[].retweetCountnumberNumber of retweets
tweets[].repliesnumberNumber of replies
tweets[].photosarrayArray of photo objects (id, url)
tweets[].videosarrayArray of video objects (id, preview, url)
tweets[].urlsarrayArray of URLs included in the tweet
tweets[].permanentUrlstringPermanent URL to the tweet
tweets[].quotedStatusIdstring?ID of the quoted tweet (if applicable)
tweets[].inReplyToStatusIdstring?ID of the tweet this is replying to (if applicable)
tweets[].hashtagsarrayArray of hashtags in the tweet

Workflow Guide

This endpoint is typically used as part of a workflow to:

  1. Search for tweets using from:handle with a search term (e.g., query=CoinbaseDev%20from:sweetman_eth)
  2. Filter results for tweets with non-null videos
  3. Send a monthly influencer impact report to the CoinbaseDev team

Notes