keywordstringzorunlu
Search keyword.
https://api.sandbase.ai/v1/api/twitter/searchSearch X (Twitter) by keyword across top, latest, media, people, or list result modes with cursor pagination. Use it to find public conversations, accounts, media, or lists related to a topic.
Çıktınız burada görünecek
Girdileri tamamlayın, ardından Çalıştır'a tıklayın.
This API searches X (Twitter) by keyword and returns a page of matching results in the timeline array. It needs a keyword. You can set searchType to TOP, LATEST, MEDIA, PEOPLE, or LISTS.
iphone.views, favorites, and retweets to find the ones that spread most.user_info.followers_count.curl -X POST "https://api.sandbase.ai/v1/api/twitter/search" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"keyword": "iphone"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
keyword | string | Yes | Search keyword. |
cursor | string | No | Pagination cursor returned by the previous response. |
searchType | string | No | Search result type. |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"next_cursor": "DAACCgACHWL0SvpAJxAKAAMdYvRK-j_Y8AgABAAAAAILAAUAAADwRW1QQzZ3QUFBZlEvZ0dKTjB2R3Av…",
"prev_cursor": "DAACCgACHWL0SvpAJxAKAAMdYvRK-j_Y8AgABAAAAAELAAUAAADwRW1QQzZ3QUFBZlEvZ0dKTjB2R3Av…",
"status": "ok",
"timeline": [
{
"bookmarks": 254,
"conversation_id": "2115181704403165431",
"created_at": "Tue Oct 27 20:39:51 +0000 2026",
"display_text_range": [
0
],
"entities": {
"hashtags": [],
"media": [
{
"additional_media_info": {
"monetizable": false
},
"display_url": "pic.x.com/m7nyDKgKuU",
"expanded_url": "https://x.com/TecnonautaTV/status/2115181704403165431/video/1",
"ext_media_availability": {
"status": "Available"
},
"id_str": "2115181241813147648",
"indices": [
205
],
"media_key": "13_2115181241813147648",
"media_results": {
"result": {
"media_key": "13_2115181241813147648"
}
}
}
],
"symbols": [],
"timestamps": [],
"urls": [],
"user_mentions": []
},
"favorites": 1888,
"lang": "es",
"media": {
"video": [
{
"aspect_ratio": [
9
],
"duration": 69300,
"id": "2115181241813147648",
"media_url_https": "https://pbs.twimg.com/amplify_video_thumb/2115181241813147648/img/Fi_52oJPz8Ji6Z…",
"original_info": {
"focus_rects": [],
"height": 1920,
"width": 1080
},
"variants": [
{
"content_type": "application/x-mpegURL",
"url": "https://video.twimg.com/amplify_video/2115181241813147648/pl/_f3RJZ0z46BMZC3H.m3…"
}
]
}
]
},
"quotes": 16,
"replies": 72,
"retweets": 196,
"screen_name": "TecnonautaTV"
}
]
}
| Field | Meaning |
|---|---|
timeline[] | One search result per item. In this response each item is a post with type set to tweet. |
timeline[].tweet_id / timeline[].conversation_id | ID of the post and ID of the conversation it belongs to. Both are strings. |
timeline[].text | Text of the post. Long text may be cut. |
timeline[].created_at | Time the post was created, in a format like Tue Oct 27 20:39:51 +0000 2026. |
timeline[].screen_name | Handle of the account that wrote the post. |
timeline[].favorites / timeline[].retweets / timeline[].replies / timeline[].quotes / timeline[].bookmarks | Engagement counts for the post. |
timeline[].views | View count of the post, returned as a string. |
timeline[].user_info.followers_count | Follower count of the author. The user_info object also has avatar, location, and the account created_at. |
timeline[].media.video[].variants[] | Video files for the post. Each has a content_type and url. MP4 variants also have a bitrate. |
timeline[].quoted.author.screen_name | Handle of the author of a quoted post, present when the result quotes another post. |
next_cursor as cursor in the next request. The response also returns prev_cursor.keyword the same when you send a cursor.$0.014286 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
Geliştirmeye başlayın
Birleşik kimlik doğrulama ve kullanım takibi sunan Platform API uç noktası.
curl -X POST "https://api.sandbase.ai/v1/api/twitter/search" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"keyword": "iphone"
}'SandBase API anahtarınızı sunucu ortamınıza ayarlayın. İstekler Bearer kimlik doğrulaması kullanır.
export SANDBASE_API_KEY="YOUR_API_KEY"Anahtarınızı sunucuda tutun. Tarayıcı kodunda açığa çıkarmayın.
keywordstringzorunluSearch keyword.
searchTypestringSearch result type.
Olası değerler: TOP, LATEST, MEDIA, PEOPLE, LISTS
cursorstringPagination cursor returned by the previous response.
Bu API için kaydedilmiş örnek yanıt; görüntülerken canlı istek yapılmaz.
Yayınlanmış bir kaydedilmiş yanıt yok. Yanıtını incelemek için API'yi Playground'da çalıştırın.
Daha fazlasını keşfedin
| API | Fiyat | Yanıt |
|---|---|---|
Twitter Search TimelineBu API Twitter | $0.014286 çağrı başına | JSON |
X (Twitter) | Kullanım başına $0.00054'den itibaren | JSON |
Twitter | Kullanım başına $0.0006'den itibaren | Asenkron JSON |
X (Twitter) | Kullanım başına $0.0001'den itibaren | JSON |
X (Twitter) | Kullanım başına $0.0036'den itibaren | JSON |
X (Twitter) | Kullanım başına $0.00045'den itibaren | JSON |
Kılavuzlar:X API alternative: pay per call, not per postBest Twitter API in 2026: X API Pricing Compared
Sorular
SandBase API anahtarınızı Authorization başlığında (Bearer) ve parametreleri JSON gövdesi olarak ile https://api.sandbase.ai/v1/api/twitter/search adresine bir POST isteği gönderin. Ayrıca bu sayfadaki Playground’da kod yazmadan da deneyebilirsiniz.
çağrı başına $0.014286, SandBase bakiyenizden tahsil edilir. Yalnızca yaptığınız çağrılar için ücretlendirilirsiniz; abonelik yoktur.
Gerekli: keyword (string). İsteğe bağlı: searchType (TOP, LATEST, MEDIA, PEOPLE, LISTS arasından biri) ve cursor (string). Parametreler tablosu ve bu sayfadaki Playground, tüm alanları listeler.
Aynı HTTP isteğinde döndürülen bir JSON yanıtı (senkron). Bu sayfadaki README'de örnek bir yanıt yer alır.
Hayır. Twitter Search Timeline, SandBase üzerinden çalışır; bu nedenle tek bir SandBase API anahtarı bu uç noktayı ve katalogdaki diğer tüm API'leri ve modelleri kapsar. Twitter API erişimi için ayrıca başvuru yapmanız gerekmez.