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

# Get Tweet Thread by ID

> Retrieve all tweets in a thread by tweet ID, sorted by latest.



## OpenAPI

````yaml /api-reference/openapi.json post /twitter/tweets/thread_by_id
openapi: 3.1.0
info:
  title: Twitter API Service
  description: |2-

            A comprehensive Twitter API service that provides various Twitter operations including:
            
            * **Search Operations**: Advanced search, hashtags, cashtags
            * **Tweet Operations**: Post, like, retweet, quote, bookmark, delete
            * **User Operations**: Batch user information retrieval
            * **Influencer Operations**: Get tweets from top influencers
            
            All endpoints return standardized responses in the format:
            ```json
            {
                "code": 200,
                "msg": "success", 
                "data": {...}
            }
            ```
            
            ## Authentication
            
            This API uses Bearer token authentication. Include your token in the Authorization header:
            ```
            Authorization: Bearer your_token_here
            ```
            
  contact:
    name: API Support
    email: support@twitterxapi.com
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.twexapi.io
    description: Development server
security: []
paths:
  /twitter/tweets/thread_by_id:
    post:
      tags:
        - Tweets Endpoints
      summary: Get Tweet Thread by ID
      description: Retrieve all tweets in a thread by tweet ID, sorted by latest.
      operationId: tweet_thread_by_id_twitter_tweets_thread_by_id_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TweetThreadByIdBody'
        required: true
      responses:
        '200':
          description: A list of tweets in the thread, sorted by latest.
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    TweetThreadByIdBody:
      properties:
        tweet_id:
          type: string
          title: Tweet Id
          description: The root tweet ID to fetch the thread for
        max_items:
          type: integer
          maximum: 200
          minimum: 1
          title: Max Items
          description: Max number of thread tweets to return
          default: 40
        fields:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Fields
          description: >-
            Fields to include in each tweet. If omitted, all fields are
            returned.
      type: object
      required:
        - tweet_id
      title: TweetThreadByIdBody
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````