API reference · Twitter

twitter/bulk/tweet-search

Integrate this model through SandBase's unified API, with production-ready schemas and examples.

Production endpoint

Send your first request

OpenAI-compatible endpoint with unified authentication and usage tracking.

POSThttps://api.sandbase.ai/v1/run
Model IDtwitter/bulk/tweet-search
01

Input Schema

26 parameters · 0 required · 26 optional

ParameterTypeRequiredDescription
endstringOptionalReturns tweets sent before the given date.
sortstringOptionalSorts search results. If you are getting low results, try Top instead of Latest. Latest + Top runs both simultaneously to maximize results but may return some duplicate tweets. · Options: Top, Latest, Latest + Top
TopLatestLatest + Top
startstringOptionalReturns tweets sent after the given date.
authorstringOptionalReturns tweets sent by the given user. It should be a Twitter (X) Handle.
geocodestringOptionalReturns tweets sent by users located within a given radius of the given latitude/longitude.
maxItemsintegerOptionalMaximum number of items that you want as output. · Min: -9007199254740991 · Max: 9007199254740991
inReplyTostringOptionalReturns tweets that are replies to the given user. It should be a Twitter (X) Handle.
onlyImagebooleanOptionalIf selected, only returns tweets that contain images.
onlyQuotebooleanOptionalIf selected, only returns tweets that are quotes.
onlyVideobooleanOptionalIf selected, only returns tweets that contain videos.
startUrlsarrayOptionalTwitter (X) URLs. Paste the URLs and get the results immediately. Tweet, Profile, Search or List URLs are supported.
mentioningstringOptionalReturns tweets mentioning the given user. It should be a Twitter (X) Handle.
searchTermsarrayOptionalSearch terms you want to search from Twitter (X). You can refer to https://github.com/igorbrigadir/twitter-advanced-search.
withinRadiusstringOptionalReturns tweets sent within the given radius of the given location.
geotaggedNearstringOptionalReturns tweets sent near the given location.
placeObjectIdstringOptionalReturns tweets tagged with the given place.
tweetLanguagestringOptionalRestricts tweets to the given language, given by an ISO 639-1 code. · Options: ab, aa, af, ak, sq, am, ar, an, hy, as, av, ae, ay, az, bm, ba, eu, be, bn, bi, bs, br, bg, my, ca, ch, ce, ny, zh, cu, cv, kw, co, cr, hr, cs, da, dv, nl, dz, en, eo, et, ee, fo, fj, fi, fr, fy, ff, gd, gl, lg, ka, de, el, kl, gn, gu, ht, ha, he, hz, hi, ho, hu, is, io, ig, id, ia, ie, iu, ik, ga, it, ja, jv, kn, kr, ks, kk, km, ki, rw, ky, kv, kg, ko, kj, ku, lo, la, lv, li, ln, lt, lu, lb, mk, mg, ms, ml, mt, gv, mi, mr, mh, mn, na, nv, nd, nr, ng, ne, no, nb, nn, ii, oc, oj, or, om, os, pi, ps, fa, pl, pt, pa, qu, ro, rm, rn, ru, se, sm, sg, sa, sc, sr, sn, sd, si, sk, sl, so, st, es, su, sw, ss, sv, tl, ty, tg, ta, tt, te, th, bo, ti, to, ts, tn, tr, tk, tw, ug, uk, ur, uz, ve, vi, vo, wa, cy, wo, xh, yi, yo, za, zu
abaaafaksqamaranhyasavaeayazbmbaeubebnbibsbrbgmycachcenyzhcucvkwcocrhrcsdadvnldzeneoeteefofjfifrfyffgdgllgkadeelklgnguhthahehzhihohuisioigidiaieiuikgaitjajvknkrkskkkmkirwkykvkgkokjkulolalvlilnltlulbmkmgmsmlmtgvmimrmhmnnanvndnrngnenonbnniiocojoromospipsfaplptpaqurormrnrusesmsgsascsrsnsdsiskslsostessuswsssvtltytgtatttethbotitotstntrtktwugukuruzvevivowacywoxhyiyozazu
minimumRepliesintegerOptionalReturns tweets with at least the given number of replies. · Min: -9007199254740991 · Max: 9007199254740991
twitterHandlesarrayOptionalTwitter handles that you want to search on Twitter (X)
conversationIdsarrayOptionalConversation IDs that you want to search on Twitter (X)
minimumRetweetsintegerOptionalReturns tweets with at least the given number of retweets. · Min: -9007199254740991 · Max: 9007199254740991
onlyTwitterBluebooleanOptionalIf selected, only returns tweets by users who are Twitter Blue subscribers.
minimumFavoritesintegerOptionalReturns tweets with at least the given number of favorites. · Min: -9007199254740991 · Max: 9007199254740991
customMapFunctionstringOptionalFunction that takes each of the objects as argument and returns data that will be mapped by the function itself. This function is not intended for filtering, please don't use it for filtering purposes or you will get banned automatically.
onlyVerifiedUsersbooleanOptionalIf selected, only returns tweets by users who are verified.
includeSearchTermsbooleanOptionalIf selected, a field will be added to each tweets about the search term that was used to find it.
02

Output Schema

FieldTypeDescription
idstringUnique identifier for the generation task
statusstringTask status: pending, running, completed, failed, timeout
modelstringModel used for the generation
outputsarrayArray of output items
outputs[].urlstringURL of the generated artifact
outputs[].content_typestringMIME type (e.g. image/png, video/mp4)
errorobject | nullError details if failed, null on success
error.typestringMachine-readable error type code
error.messagestringHuman-readable error description

Async Workflow

This model uses asynchronous execution. Submit a request and poll for the result.

  1. Submit — POST to /v1/run, receive an id
  2. Poll — GET /v1/run/{id} until status is completed, failed, or timeout
  3. Retrieve — Read outputs from the completed response
03

Code Examples

Ready-to-run snippets

# Step 1: Submit
curl -X POST https://api.sandbase.ai/v1/run \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
  "model": "twitter/bulk/tweet-search",
  "prompt": "a beautiful sunset over mountains"
}'

# Step 2: Poll result (replace <id>)
curl https://api.sandbase.ai/v1/run/<id> \
  -H "Authorization: Bearer YOUR_API_KEY"