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

# Get Tweet Thread Context

> Get the thread context of a tweet.Suppose a tweet thread consists of t1, t2 (replying to t1), t3 (replying to t2), and t4, t5, t6 (all replying to t3). If we provide an API where you input t3 and receive t1, t2, t3, t4, t5, t6.Pagination is supported.The pagination size cannot be set (due to Twitter's limitations), and the data returned per page is not fixed.



## OpenAPI

````yaml GET /twitter/tweet/thread_context
openapi: 3.0.1
info:
  title: TwitterAPI.io the most stable/fastest/cheapest twitter api.
  description: Provide the most stable/fastest/cheapest twitter api.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.twitterapi.io
security:
  - ApiKeyAuth: []
paths:
  /twitter/tweet/thread_context:
    get:
      description: >-
        Get the thread context of a tweet.Suppose a tweet thread consists of t1,
        t2 (replying to t1), t3 (replying to t2), and t4, t5, t6 (all replying
        to t3). If we provide an API where you input t3 and receive t1, t2, t3,
        t4, t5, t6.Pagination is supported.The pagination size cannot be set
        (due to Twitter's limitations), and the data returned per page is not
        fixed.
      parameters:
        - name: tweetId
          in: query
          description: The tweet ID to get. Can be a reply tweet or a original tweet.
          required: true
          schema:
            type: string
            format: string
        - name: cursor
          in: query
          description: The cursor to paginate through the results. First page is "".
          schema:
            type: string
            format: string
      responses:
        '200':
          description: Tweet replies response
          content:
            application/json:
              schema:
                type: object
                properties:
                  replies:
                    type: array
                    items:
                      $ref: '#/components/schemas/Tweet'
                    description: Array of tweets
                  has_next_page:
                    type: boolean
                    description: >-
                      Indicates if there are more results available. If true,
                      use next_cursor to fetch the next page. Warning: Due to
                      Twitter API inconsistency, has_more might return true even
                      when no additional data exists. In such cases, subsequent
                      requests will return empty results - this is a known
                      platform limitation.
                  next_cursor:
                    type: string
                    description: Cursor for fetching the next page of results
                  status:
                    type: string
                    description: Status of the request.success or error
                    enum:
                      - success
                      - error
                  message:
                    type: string
                    description: Message of the request.error message
        '400':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Tweet:
      type: object
      properties:
        type:
          type: string
          enum:
            - tweet
        id:
          type: string
          description: The ID of the tweet
        url:
          type: string
          description: The URL of the tweet
        text:
          type: string
          description: The text of the tweet
        source:
          type: string
          description: The source of the tweet.eg. "Twitter for iPhone"
        retweetCount:
          type: integer
          description: The number of times the tweet has been retweeted
        replyCount:
          type: integer
          description: The number of times the tweet has been replied to
        likeCount:
          type: integer
          description: The number of times the tweet has been liked
        quoteCount:
          type: integer
          description: The number of times the tweet has been quoted
        viewCount:
          type: integer
          description: The number of times the tweet has been viewed
        createdAt:
          type: string
          description: >-
            The date and time the tweet was created.eg. Tue Dec 10 07:00:30
            +0000 2024
        lang:
          type: string
          description: The language of the tweet.eg. "en".may be empty
        bookmarkCount:
          type: integer
          description: The number of times the tweet has been bookmarked
        isReply:
          type: boolean
          description: Indicates if the tweet is a reply
        inReplyToId:
          type: string
          description: The ID of the tweet being replied to.may be empty
        conversationId:
          type: string
          description: The ID of the conversation the tweet is part of.may be empty
        displayTextRange:
          type: array
          description: >-
            specifies the UTF-16 code unit indices in full_text that define the
            visible portion of a Tweet.eg"@jack Thanks for the
            update!",display_text_range is [6, 28]
          items:
            type: integer
        inReplyToUserId:
          type: string
          description: The ID of the user being replied to.may be empty
        inReplyToUsername:
          type: string
          description: The username of the user being replied to.may be empty
        author:
          $ref: '#/components/schemas/UserInfo'
          description: The user who posted the tweet
        entities:
          $ref: '#/components/schemas/TweetEntities'
          description: The entities in the tweet.eg. hashtags,urls,mentions
        quoted_tweet:
          $ref: '#/components/schemas/Tweet'
          description: The tweet being quoted.may be null
        retweeted_tweet:
          $ref: '#/components/schemas/Tweet'
          description: The tweet being retweeted.may be null
        isLimitedReply:
          type: boolean
          description: >-
            Whether the tweet is a limited reply. Possible restrictions: only
            mentioned users, verified users, or followed accounts can reply
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
    UserInfo:
      type: object
      properties:
        type:
          type: string
          enum:
            - user
        userName:
          type: string
          description: The username of the Twitter user
        url:
          type: string
          description: The x.com URL of the user's profile
        id:
          type: string
          description: The unique identifier of the user
        name:
          type: string
          description: The display name of the user
        isBlueVerified:
          type: boolean
          description: Whether the user has Twitter Blue verification
        verifiedType:
          type: string
          description: The type of verification. eg. "government" ,can be empty
        profilePicture:
          type: string
          description: URL of the user's profile picture
        coverPicture:
          type: string
          description: URL of the user's cover picture
        description:
          type: string
          description: The user's profile description
        location:
          type: string
          description: 'The user''s location.for example: 東京の端っこ . may be empty'
        followers:
          type: integer
          description: Number of followers
        following:
          type: integer
          description: Number of accounts following
        canDm:
          type: boolean
          description: Whether the user can receive DMs
        createdAt:
          type: string
          description: >-
            When the account was created.for example: Thu Dec 13 08:41:26 +0000
            2007
        favouritesCount:
          type: integer
          description: Number of favorites
        hasCustomTimelines:
          type: boolean
          description: Whether the user has custom timelines
        isTranslator:
          type: boolean
          description: Whether the user is a translator
        mediaCount:
          type: integer
          description: Number of media posts
        statusesCount:
          type: integer
          description: Number of status updates
        withheldInCountries:
          type: array
          items:
            type: string
          description: Countries where the account is withheld
        affiliatesHighlightedLabel:
          type: object
        possiblySensitive:
          type: boolean
          description: Whether the account may contain sensitive content
        pinnedTweetIds:
          type: array
          items:
            type: string
          description: IDs of pinned tweets
        isAutomated:
          type: boolean
          description: Whether the account is automated
        automatedBy:
          type: string
          description: The account that automated the account
        unavailable:
          type: boolean
          description: Whether the account is unavailable
        message:
          type: string
          description: >-
            The message of the account.eg. "This account is unavailable" or
            "This account is suspended"
        unavailableReason:
          type: string
          description: 'The reason the account is unavailable.eg. "suspended" '
        profile_bio:
          type: object
          properties:
            description:
              type: string
            entities:
              type: object
              properties:
                description:
                  type: object
                  properties:
                    urls:
                      type: array
                      items:
                        type: object
                        properties:
                          display_url:
                            type: string
                          expanded_url:
                            type: string
                          indices:
                            type: array
                            items:
                              type: integer
                          url:
                            type: string
                url:
                  type: object
                  properties:
                    urls:
                      type: array
                      items:
                        type: object
                        properties:
                          display_url:
                            type: string
                          expanded_url:
                            type: string
                          indices:
                            type: array
                            items:
                              type: integer
                          url:
                            type: string
    TweetEntities:
      type: object
      properties:
        hashtags:
          type: array
          items:
            type: object
            properties:
              indices:
                type: array
                items:
                  type: integer
              text:
                type: string
        urls:
          type: array
          items:
            type: object
            properties:
              display_url:
                type: string
              expanded_url:
                type: string
              indices:
                type: array
                items:
                  type: integer
              url:
                type: string
        user_mentions:
          type: array
          items:
            type: object
            properties:
              id_str:
                type: string
                description: The ID of the user being mentioned
              name:
                type: string
                description: The name of the user being mentioned
              screen_name:
                type: string
                description: The screen name of the user being mentioned
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````