> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sorsa.io/llms.txt
> Use this file to discover all available pages before exploring further.

# 推文评论

> 分页返回指定推文下的回复（评论），每页最多 20 条。每条回复包含文本、创建日期、互动指标、对话上下文和作者资料。



## OpenAPI

````yaml openapi-zh-Hans.json POST /comments
openapi: 3.0.3
info:
  contact: {}
  title: Sorsa.io API
  version: '3.0'
servers:
  - url: https://api.sorsa.io/v3
security: []
paths:
  /comments:
    post:
      tags:
        - 推文
      summary: 推文评论
      description: 分页返回指定推文下的回复（评论），每页最多 20 条。每条回复包含文本、创建日期、互动指标、对话上下文和作者资料。
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/tweets.CommentsReq'
        description: 推文链接必填，next_cursor 可选
        required: true
        x-originalParamName: payload
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/common.TweetsResponse'
          description: 成功
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handler.ErrorResponse'
          description: 请求无效
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handler.ErrorResponse'
          description: 未授权
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handler.ErrorResponse'
          description: 禁止访问
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handler.ErrorResponse'
          description: 未找到
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handler.ErrorResponse'
          description: 请求过多
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handler.ErrorResponse'
          description: 服务器内部错误
      security:
        - ApiKeyAuth: []
components:
  schemas:
    tweets.CommentsReq:
      properties:
        next_cursor:
          description: 上一次响应中的分页游标。
          example: JKHSJFHADUYJKSDy2y3u123
          type: string
        order_by:
          description: 排序方式：`Relevance`、`Recency` 或 `Likes`。默认为 `Relevance`。
          example: Relevance
          type: string
        tweet_link:
          description: 完整推文 URL（例如 `https://x.com/user/status/123`）或推文 ID。
          type: string
      type: object
    common.TweetsResponse:
      properties:
        next_cursor:
          description: 用于获取下一页结果的游标。没有更多页面时为 null 或缺失。
          type: string
        tweets:
          description: 推文对象数组。
          items:
            $ref: '#/components/schemas/common.Tweet'
          type: array
      type: object
    handler.ErrorResponse:
      properties:
        message:
          type: string
      type: object
    common.Tweet:
      properties:
        bookmark_count:
          description: 推文被收藏的次数。
          example: 15
          type: integer
        conversation_id_str:
          description: 对话讨论串中根推文的 ID。
          example: '1782368585664626774'
          type: string
        created_at:
          description: 推文发布日期，采用 ISO 8601 格式。
          example: '2024-01-15T10:30:00Z'
          type: string
        entities:
          description: 推文附带的媒体、链接及其他内嵌实体。
          items:
            $ref: '#/components/schemas/common.TweetEntity'
          type: array
        full_text:
          description: 推文的完整文本内容。
          example: Hello world
          type: string
        id:
          description: 唯一推文 ID。
          example: '1782368585664626774'
          type: string
        in_reply_to_tweet_id:
          description: 此推文回复的推文 ID。非回复推文时为 null。
          example: '1782368585664626000'
          type: string
        in_reply_to_username:
          description: 此推文所回复账号的用户名。
          example: username
          type: string
        is_quote_status:
          description: 此推文是否引用另一条推文。
          example: false
          type: boolean
        is_replies_limited:
          description: 作者是否限制了此推文的回复。
          example: false
          type: boolean
        is_reply:
          description: 此推文是否为对另一条推文的回复。
          example: false
          type: boolean
        lang:
          description: 检测到的推文语言代码，例如 `en`、`es`。
          example: en
          type: string
        likes_count:
          description: 推文的点赞数。
          example: 200
          type: integer
        made_with_ai:
          description: 推文是否由 AI 制作。
          example: false
          type: boolean
        paid_partnership:
          description: 推文是否属于付费合作。
          example: false
          type: boolean
        quote_count:
          description: 引用推文数。
          example: 5
          type: integer
        quoted_status:
          allOf:
            - $ref: '#/components/schemas/common.Tweet'
          description: 被引用的原始推文。仅在 `is_quote_status` 为 true 时存在。
        reply_count:
          description: 推文的回复数。
          example: 10
          type: integer
        retweet_count:
          description: 转推数。
          example: 50
          type: integer
        retweeted_status:
          allOf:
            - $ref: '#/components/schemas/common.Tweet'
          description: 被转推的原始推文。仅在转推时存在。
        user:
          allOf:
            - $ref: '#/components/schemas/common.User'
          description: 推文作者。
        view_count:
          description: 浏览次数（展示次数）。
          example: 10000
          type: integer
      type: object
    common.TweetEntity:
      properties:
        link:
          description: 实体的直接 URL。
          example: https://t.co/example
          type: string
        preview:
          description: 实体的预览图或缩略图 URL。
          example: https://pbs.twimg.com/preview
          type: string
        type:
          description: 实体类型，例如 `photo`、`video`、`url`。
          example: photo
          type: string
      type: object
    common.User:
      properties:
        bio_urls:
          description: 用户简介中的 URL。
          items:
            type: string
          type: array
        can_dm:
          description: 账号是否接受私信。
          example: false
          type: boolean
        created_at:
          description: 账号创建日期，采用 ISO 8601 格式。
          example: '2009-06-02T20:12:29Z'
          type: string
        description:
          description: 个人资料简介文本。
          example: Bio text
          type: string
        display_name:
          description: 用户的显示名称。
          example: Elon Musk
          type: string
        favourites_count:
          description: 此用户点赞的推文总数。
          example: 1200
          type: integer
        followers_count:
          description: 关注此用户的账号数。
          example: 100000
          type: integer
        followings_count:
          description: 此用户关注的账号数。
          example: 500
          type: integer
        id:
          description: 唯一 Twitter/X 用户 ID。
          example: '44196397'
          type: string
        location:
          description: 用户资料中的所在地文本。
          example: Austin, TX
          type: string
        media_count:
          description: 此用户发布的媒体总数。
          example: 300
          type: integer
        pinned_tweet_ids:
          description: 用户置顶推文的 ID。
          items:
            type: string
          type: array
        possibly_sensitive:
          description: 账号是否被标记为可能包含敏感内容。
          example: false
          type: boolean
        profile_background_image_url:
          description: 用户个人资料背景图片的 URL。
          example: https://pbs.twimg.com/profile_banners/44196397/123
          type: string
        profile_image_url:
          description: 用户头像图片的 URL。
          example: https://pbs.twimg.com/profile_images/123/photo.jpg
          type: string
        protected:
          description: 账号的推文是否受保护（私密）。
          example: false
          type: boolean
        tweets_count:
          description: 此用户发布的推文总数。
          example: 5000
          type: integer
        username:
          description: 当前 Twitter/X 用户名（不含 @）。
          example: elonmusk
          type: string
        verified:
          description: 账号是否有认证徽章。
          example: true
          type: boolean
      type: object
  securitySchemes:
    ApiKeyAuth:
      in: header
      name: ApiKey
      type: apiKey

````