Sand AISand AI MAGI-2ตอนนี้ MAGI-2 อยู่บน SandBase แล้ว: วิดีโอ 1080p พร้อมเสียงในตัวลองใช้เลย

Twitter Search Timeline

เอกสาร API
https://api.sandbase.ai/v1/api/twitter/search

Search 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.

ราคา
$0.014286USD / คำขอ
Method
POST
การตอบกลับ
JSON
พารามิเตอร์
1 จำเป็น · 2 ไม่บังคับ

Playground

อินพุต
Search keyword.
Search result type.
Pagination cursor returned by the previous response.
เอาต์พุตพร้อมใช้งาน

เอาต์พุตของคุณจะแสดงที่นี่

กรอกอินพุตให้ครบ แล้วคลิก Run

API README

Twitter Search Timeline API

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.

Use cases

  • Track public posts that mention a product name such as iphone.
  • Rank posts about a topic by views, favorites, and retweets to find the ones that spread most.
  • Collect video posts and their file URLs for a topic.
  • Find large accounts that post about a topic using user_info.followers_count.

Request

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.

Parameters

NameTypeRequiredDescription
keywordstringYesSearch keyword.
cursorstringNoPagination cursor returned by the previous response.
searchTypestringNoSearch result type.

Example response

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"
    }
  ]
}

Response fields

FieldMeaning
timeline[]One search result per item. In this response each item is a post with type set to tweet.
timeline[].tweet_id / timeline[].conversation_idID of the post and ID of the conversation it belongs to. Both are strings.
timeline[].textText of the post. Long text may be cut.
timeline[].created_atTime the post was created, in a format like Tue Oct 27 20:39:51 +0000 2026.
timeline[].screen_nameHandle of the account that wrote the post.
timeline[].favorites / timeline[].retweets / timeline[].replies / timeline[].quotes / timeline[].bookmarksEngagement counts for the post.
timeline[].viewsView count of the post, returned as a string.
timeline[].user_info.followers_countFollower 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_nameHandle of the author of a quoted post, present when the result quotes another post.

Notes

  • For the next page, pass the response next_cursor as cursor in the next request. The response also returns prev_cursor.
  • Keep keyword the same when you send a cursor.
  • To read one post in full, call Twitter Post Detail. To read replies, call Twitter Post Comments.
  • To search accounts only, see X / Twitter User Search.

Pricing

$0.014286 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.

สำรวจเพิ่มเติม

APIs ที่เกี่ยวข้อง

APIs ทั้งหมด
APIราคาการตอบกลับ
Twitter$0.014286 ต่อการเรียกJSON
X (Twitter)เริ่มต้นที่ $0.00054 ต่อครั้งJSON
Twitterเริ่มต้นที่ $0.0006 ต่อครั้งAsync JSON
X (Twitter)เริ่มต้นที่ $0.0001 ต่อครั้งJSON
X (Twitter)เริ่มต้นที่ $0.0036 ต่อครั้งJSON
X (Twitter)เริ่มต้นที่ $0.00045 ต่อครั้งJSON

คู่มือ:X API alternative: pay per call, not per postBest Twitter API in 2026: X API Pricing Compared

คำถาม

คำถามที่พบบ่อย

ฉันจะใช้ Twitter Search Timeline API ได้อย่างไร?

ส่งคำขอ POST ไปที่ https://api.sandbase.ai/v1/api/twitter/search โดยใส่ SandBase API key ของคุณใน Authorization header (Bearer) และส่งพารามิเตอร์เป็น JSON body คุณยังสามารถลองใช้ได้ใน Playground บนหน้านี้โดยไม่ต้องเขียนโค้ด

Twitter Search Timeline API ราคาเท่าไร?

$0.014286 ต่อครั้ง คิดจากยอดคงเหลือ SandBase ของคุณ คุณจะถูกเรียกเก็บเฉพาะคำขอที่คุณส่งเท่านั้น ไม่มีค่าสมาชิกรายเดือน

Twitter Search Timeline API รับพารามิเตอร์อะไรบ้าง?

ที่ต้องระบุ: keyword (string). ตัวเลือก: searchType (หนึ่งใน TOP, LATEST, MEDIA, PEOPLE, LISTS) และ cursor (string). ตาราง Parameters และ Playground ในหน้านี้แสดงทุกฟิลด์

Twitter Search Timeline API ส่งคืนอะไร?

การตอบกลับ JSON ที่ส่งกลับในคำขอ HTTP เดียวกัน (แบบซิงโครนัส) README บนหน้านี้มีตัวอย่างการตอบกลับ

ฉันจำเป็นต้องมีบัญชีนักพัฒนาหรือ API key ของ Twitter ไหม?

ไม่จำเป็น Twitter Search Timeline ทำงานผ่าน SandBase ดังนั้น SandBase API key เดียวครอบคลุม endpoint นี้และทุก API กับโมเดลอื่นในแค็ตตาล็อก คุณไม่ต้องสมัครขอสิทธิ์เข้าถึง Twitter API แยกต่างหาก