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

# Get Tweet Edit History

> Get the edit history of a tweet. Returns all versions of the tweet in chronological order, from the original to the most recent edit. Useful for tracking changes to tweet content over time.



## OpenAPI

````yaml get /v1/twitter/tweets/tweet/{tweet_id}/edit_history
openapi: 3.1.0
info:
  title: ScrapeBadger Twitter API
  description: >-
    The ScrapeBadger Twitter API provides programmatic access to Twitter/X data
    through a simple REST interface. Retrieve tweets, user profiles, followers,
    lists, communities, trends, and geographic data — all with a single API key.


    All endpoints require authentication via the `x-api-key` header. Each
    request consumes credits from your account balance. Paginated endpoints
    return a `next_cursor` field that you can pass to subsequent requests to
    retrieve additional pages of results.


    **Base URL:** `https://scrapebadger.com/v1/twitter`


    **Rate Limits:** Requests are rate-limited per API key. If you exceed your
    limit, you will receive a `429` response. Implement exponential backoff and
    retry logic for production use.


    **Credits:** Each successful API call deducts credits from your balance. If
    your balance reaches zero, subsequent requests will return `402 Payment
    Required`.
  version: 1.0.0
  contact:
    name: ScrapeBadger Support
    url: https://scrapebadger.com
    email: support@scrapebadger.com
servers:
  - url: https://scrapebadger.com
    description: Production
security:
  - apiKey: []
tags:
  - name: Tweets
    description: >-
      Retrieve tweets, search tweets, and access tweet metadata including
      replies, quotes, retweeters, favoriters, edit history, and community
      notes.
  - name: Users
    description: >-
      Retrieve user profiles, followers, following lists, mentions,
      subscriptions, and search for users.
  - name: Lists
    description: Access Twitter list details, list tweets, and search within lists.
  - name: Communities
    description: Retrieve community details, community tweets, and search for communities.
  - name: Trends
    description: Get trending topics globally or by location.
  - name: Geo
    description: Search for geographic places and retrieve place details.
  - name: Spaces
    description: Access Twitter Spaces and live broadcast details.
  - name: Stream Monitors
    description: >-
      Create and manage real-time stream monitors that track Twitter accounts
      and deliver new tweets via WebSocket or webhook.
  - name: Stream Webhooks
    description: >-
      Manage webhook endpoints for stream monitor delivery. Webhooks receive
      HMAC-SHA256 signed payloads when new tweets are detected.
  - name: Stream Logs
    description: >-
      Access delivery logs and billing logs for stream monitors. Track tweet
      detection latency, webhook delivery status, and credit consumption.
  - name: Filter Rules
    description: >-
      Create and manage filter rules that monitor Twitter using Advanced Search
      queries at configurable intervals. Delivered via WebSocket or webhook.
paths:
  /v1/twitter/tweets/tweet/{tweet_id}/edit_history:
    get:
      tags:
        - Tweets
      summary: Get tweet edit history
      description: >-
        Get the edit history of a tweet. Returns all versions of the tweet in
        chronological order, from the original to the most recent edit. Useful
        for tracking changes to tweet content over time.
      operationId: getTweetEditHistory
      parameters:
        - name: tweet_id
          in: path
          required: true
          description: The unique numeric ID of the tweet.
          schema:
            type: string
            example: '1234567890123456789'
      responses:
        '200':
          description: Successfully retrieved edit history.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TweetsResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '429':
          $ref: '#/components/responses/RateLimitExceeded'
components:
  schemas:
    TweetsResponse:
      type: object
      description: Paginated list of tweets.
      properties:
        data:
          type:
            - array
            - 'null'
          description: Array of tweet objects.
          items:
            $ref: '#/components/schemas/TweetData'
        next_cursor:
          type:
            - string
            - 'null'
          description: Cursor for fetching the next page. Null if no more results.
    TweetData:
      type: object
      description: >-
        Comprehensive tweet data including text, author info, engagement
        metrics, media, and metadata.
      required:
        - id
        - text
        - created_at
      properties:
        id:
          type: string
          description: Unique tweet identifier.
          example: '1234567890123456789'
        text:
          type: string
          description: The tweet text content.
          example: Hello, world! This is a tweet.
        full_text:
          type:
            - string
            - 'null'
          description: >-
            Full text of the tweet, including extended content beyond 280
            characters.
        created_at:
          type: string
          description: Timestamp when the tweet was created.
          example: Wed Oct 10 20:19:24 +0000 2018
        lang:
          type:
            - string
            - 'null'
          description: BCP 47 language tag of the tweet content.
          example: en
        user_id:
          type:
            - string
            - 'null'
          description: Numeric ID of the tweet author.
          example: '44196397'
        username:
          type:
            - string
            - 'null'
          description: Username (screen name) of the tweet author.
          example: elonmusk
        user_name:
          type:
            - string
            - 'null'
          description: Display name of the tweet author.
          example: Elon Musk
        favorite_count:
          type: integer
          description: Number of times this tweet has been liked.
          default: 0
        retweet_count:
          type: integer
          description: Number of times this tweet has been retweeted.
          default: 0
        reply_count:
          type: integer
          description: Number of replies to this tweet.
          default: 0
        quote_count:
          type: integer
          description: Number of times this tweet has been quoted.
          default: 0
        view_count:
          type:
            - integer
            - 'null'
          description: Number of times this tweet has been viewed.
        bookmark_count:
          type:
            - integer
            - 'null'
          description: Number of times this tweet has been bookmarked.
        favorited:
          type: boolean
          description: Whether the authenticated user has liked this tweet.
          default: false
        retweeted:
          type: boolean
          description: Whether the authenticated user has retweeted this tweet.
          default: false
        bookmarked:
          type: boolean
          description: Whether the authenticated user has bookmarked this tweet.
          default: false
        possibly_sensitive:
          type: boolean
          description: >-
            Whether the tweet is flagged as possibly containing sensitive
            content.
          default: false
        is_quote_status:
          type: boolean
          description: Whether the tweet is a quote tweet.
          default: false
        is_retweet:
          type: boolean
          description: Whether the tweet is a retweet.
          default: false
        conversation_id:
          type:
            - string
            - 'null'
          description: ID of the conversation thread this tweet belongs to.
        in_reply_to_status_id:
          type:
            - string
            - 'null'
          description: ID of the tweet this is a reply to, if applicable.
        in_reply_to_user_id:
          type:
            - string
            - 'null'
          description: ID of the user this tweet is replying to.
        media:
          type: array
          description: Media attachments (photos, videos, GIFs).
          items:
            $ref: '#/components/schemas/Media'
        urls:
          type: array
          description: URLs mentioned in the tweet.
          items:
            $ref: '#/components/schemas/URL'
        hashtags:
          type: array
          description: Hashtags in the tweet.
          items:
            $ref: '#/components/schemas/Hashtag'
        user_mentions:
          type: array
          description: Users mentioned in the tweet.
          items:
            $ref: '#/components/schemas/UserMention'
        poll:
          oneOf:
            - $ref: '#/components/schemas/Poll'
            - type: 'null'
          description: Poll data if the tweet contains a poll.
        place:
          oneOf:
            - $ref: '#/components/schemas/Place'
            - type: 'null'
          description: Geographic place associated with the tweet.
        quoted_status_id:
          type:
            - string
            - 'null'
          description: ID of the quoted tweet, if this is a quote tweet.
        retweeted_status_id:
          type:
            - string
            - 'null'
          description: ID of the original tweet, if this is a retweet.
        edit_tweet_ids:
          type:
            - array
            - 'null'
          description: List of tweet IDs in the edit chain.
          items:
            type: string
        editable_until_msecs:
          type:
            - integer
            - 'null'
          description: Timestamp (milliseconds) until the tweet can be edited.
        edits_remaining:
          type:
            - integer
            - 'null'
          description: Number of remaining edits allowed.
        is_edit_eligible:
          type:
            - boolean
            - 'null'
          description: Whether the tweet is eligible for editing.
        has_card:
          type:
            - boolean
            - 'null'
          description: Whether the tweet has a link preview card.
        thumbnail_url:
          type:
            - string
            - 'null'
          description: URL of the link preview thumbnail.
        thumbnail_title:
          type:
            - string
            - 'null'
          description: Title of the link preview card.
        has_community_notes:
          type:
            - boolean
            - 'null'
          description: Whether the tweet has community notes attached.
        source:
          type:
            - string
            - 'null'
          description: Client application used to post the tweet.
          example: Twitter Web App
    ErrorResponse:
      type: object
      description: Error response returned for failed requests.
      required:
        - error
      properties:
        error:
          type: string
          description: Human-readable error message describing what went wrong.
    Media:
      type: object
      description: Media attachment in a tweet (photo, video, or animated GIF).
      properties:
        media_key:
          type:
            - string
            - 'null'
          description: Unique identifier for the media.
        type:
          type:
            - string
            - 'null'
          description: Type of media.
          enum:
            - photo
            - video
            - animated_gif
        url:
          type:
            - string
            - 'null'
          description: URL of the media resource.
        preview_image_url:
          type:
            - string
            - 'null'
          description: URL of the preview/thumbnail image.
        width:
          type:
            - integer
            - 'null'
          description: Width of the media in pixels.
        height:
          type:
            - integer
            - 'null'
          description: Height of the media in pixels.
        duration_ms:
          type:
            - integer
            - 'null'
          description: Duration in milliseconds (for video/GIF).
        view_count:
          type:
            - integer
            - 'null'
          description: Number of views (for video).
        alt_text:
          type:
            - string
            - 'null'
          description: Alt text description of the media.
    URL:
      type: object
      description: URL entity in a tweet or user profile.
      required:
        - url
      properties:
        url:
          type: string
          description: The shortened t.co URL.
        expanded_url:
          type:
            - string
            - 'null'
          description: The fully expanded URL.
        display_url:
          type:
            - string
            - 'null'
          description: Display-friendly version of the URL.
        unwound_url:
          type:
            - string
            - 'null'
          description: Fully resolved URL after following redirects.
    Hashtag:
      type: object
      description: Hashtag entity in a tweet.
      required:
        - text
      properties:
        text:
          type: string
          description: 'The hashtag text (without the # symbol).'
          example: AI
        indices:
          type:
            - array
            - 'null'
          description: Start and end positions of the hashtag in the tweet text.
          items:
            type: integer
    UserMention:
      type: object
      description: User mention entity in a tweet.
      properties:
        id:
          type:
            - string
            - 'null'
          description: Numeric ID of the mentioned user.
        username:
          type:
            - string
            - 'null'
          description: Username of the mentioned user.
        name:
          type:
            - string
            - 'null'
          description: Display name of the mentioned user.
        indices:
          type:
            - array
            - 'null'
          description: Start and end positions of the mention in the tweet text.
          items:
            type: integer
    Poll:
      type: object
      description: Poll data in a tweet.
      properties:
        id:
          type:
            - string
            - 'null'
          description: Unique poll identifier.
        voting_status:
          type:
            - string
            - 'null'
          description: Current voting status.
          enum:
            - open
            - closed
        end_datetime:
          type:
            - string
            - 'null'
          description: When the poll ends or ended.
        duration_minutes:
          type:
            - integer
            - 'null'
          description: Total duration of the poll in minutes.
        options:
          type: array
          description: Poll options with vote counts.
          items:
            $ref: '#/components/schemas/PollOption'
    Place:
      type: object
      description: Geographic place information attached to a tweet.
      properties:
        id:
          type:
            - string
            - 'null'
          description: Unique place identifier.
        full_name:
          type:
            - string
            - 'null'
          description: Full human-readable place name.
          example: San Francisco, CA
        name:
          type:
            - string
            - 'null'
          description: Short place name.
          example: San Francisco
        country:
          type:
            - string
            - 'null'
          description: Country name.
          example: United States
        country_code:
          type:
            - string
            - 'null'
          description: ISO country code.
          example: US
        place_type:
          type:
            - string
            - 'null'
          description: Type of place.
          enum:
            - city
            - country
            - admin
            - poi
            - neighborhood
    PollOption:
      type: object
      description: A single poll option with its vote count.
      required:
        - position
        - label
        - votes
      properties:
        position:
          type: integer
          description: Position of the option (1-indexed).
        label:
          type: string
          description: Text label of the poll option.
        votes:
          type: integer
          description: Number of votes for this option.
  responses:
    Unauthorized:
      description: Authentication failed. The API key is missing, invalid, or expired.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Invalid or missing API key
    PaymentRequired:
      description: >-
        Insufficient credits. Your account balance has been exhausted. Purchase
        more credits at https://scrapebadger.com/dashboard/billing.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Insufficient credits
    RateLimitExceeded:
      description: >-
        Rate limit exceeded. Too many requests in a given time period. Implement
        exponential backoff and retry.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Rate limit exceeded. Please retry after a short delay.
  securitySchemes:
    apiKey:
      type: apiKey
      name: x-api-key
      in: header
      description: >-
        Your ScrapeBadger API key. You can find this in your dashboard at
        https://scrapebadger.com/dashboard/api-keys.

````