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

# Retweets

<div className="inline-flex items-center gap-2 px-4 py-2 bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg">
  <span className="text-base">🪙</span>
  <span className="text-sm font-medium text-yellow-900 dark:text-yellow-100"><span className="font-semibold">1 credit</span><span className="text-yellow-700 dark:text-yellow-300 ml-1">per request</span></span>
</div>

## Copy for AI

<div className="my-6 rounded-xl border border-gray-200 bg-gray-50 p-5 dark:border-gray-800 dark:bg-gray-900/40">
  <div className="min-w-0">
    <p className="text-base font-semibold text-gray-900 dark:text-gray-100">🤖 Why Code When AI Can Do It For You?</p>
    <p className="mt-1 text-sm text-gray-700 dark:text-gray-300">Stop writing code like it's 1970! Let AI do the heavy lifting - click the sparkles to copy a perfectly formatted prompt for ChatGPT, Claude, or your favorite AI assistant.</p>
  </div>

  <div className="mt-4">
    <button
      type="button"
      className="inline-flex items-center gap-2 rounded-md border border-emerald-300 bg-emerald-50 px-3 py-2 text-sm font-medium text-emerald-800 hover:bg-emerald-100 dark:border-emerald-700 dark:bg-emerald-900/30 dark:text-emerald-100 dark:hover:bg-emerald-900/50"
      onClick={() => navigator.clipboard.writeText(`I want to make an API call to https://api.keyapi.ai/v1/twitter/retweets.

Please help me write code to make this API call and handle the response appropriately. Include error handling and best practices.

Here are the details:

Endpoint: GET https://api.keyapi.ai/v1/twitter/retweets

Description: Retweets

Required Headers:
--header 'Authorization: Bearer <YOUR_API_KEY>'

Parameters:
- id (Required): . Example: 1700199139470942473
- cursor (Optional): The value of the next_cursor field in the response. Example value: HBaE2pGdj9GLqjEAAA==

Example Response:
{
"code": 0,
"message": "success",
"data": {
"retweets": [
  {
    "user_id": "1206112927",
    "screen_name": "Altc0inDailyx",
    "description": "🎥 Follow our YouTube channel for DAILY news & opinion videos! Brothers Aaron & Austin. Crypto commentators. Bitcoin, Ethereum, Solana, & more! 🚀",
    "profile_image": null,
    "statuses_count": 205,
    "followers_count": 10,
    "friends_count": 63,
    "media_count": 0,
    "name": "Daily"
  },
  {
    "user_id": "1672344126174445569",
    "screen_name": "_Sherry85689",
    "description": "True friendship isn't about how long you've known each other, but about honesty, trust, respect, and remaining sincere even in life's difficult times. ❤️",
    "profile_image": null,
    "statuses_count": 503,
    "followers_count": 130,
    "friends_count": 296,
    "media_count": 93,
    "name": "Sherry"
  },
  {
    "user_id": "1623032018987585579",
    "screen_name": "TinaHuang811111",
    "description": "I'm only here to watch the daily happenings; I reject pornography, gift-giving scams, and fraudulent activities.",
    "profile_image": null,
    "statuses_count": 308,
    "followers_count": 34,
    "friends_count": 193,
    "media_count": 7,
    "name": "Tina Huang"
  },
  {
    "user_id": "2037995226531299328",
    "screen_name": "muskyofficial5",
    "description": "🚀🚀I SpaceX • CEO & CTO\n🚘🪐🚀| Tesla • CEO and Product architect\n🚄🪐🇺🇸| Hyperloop • Founder",
    "profile_image": null,
    "statuses_count": 218,
    "followers_count": 3,
    "friends_count": 111,
    "media_count": 0,
    "name": "Musky official"
  },
  {
    "user_id": "2030648213854941184",
    "screen_name": "MargaretPa23565",
    "description": "Executive consultant at X HQ | 12 years of Leadership in Digital Strategy & Innovation | Based in Menlo Park, Cal
... (truncated)`)}
    >
      <span>✨</span>
      <span>Copy for AI</span>
    </button>
  </div>
</div>


## OpenAPI

````yaml en/twitter.openapi.json GET /v1/twitter/retweets
openapi: 3.0.1
info:
  title: Twitter/X API english documentation
  description: >-
    The english reference documentation of the Twitter/X API includes the
    interface's purpose, parameter description, response status, and sample
    structure.
  version: 1.0.0
servers:
  - url: https://api.keyapi.ai
    description: Twitter/X
security:
  - JWT Bearer: []
tags: []
paths:
  /v1/twitter/retweets:
    get:
      tags: []
      summary: Retweets
      parameters:
        - name: id
          in: query
          description: ''
          required: true
          example: '1700199139470942473'
          schema:
            type: string
            example: '1700199139470942473'
        - name: cursor
          in: query
          description: >-
            The value of the next_cursor field in the response. Example value:
            HBaE2pGdj9GLqjEAAA==
          required: false
          schema:
            type: string
            example: HBaE2pGdj9GLqjEAAA==
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties: {}
              example:
                code: 0
                message: success
                data:
                  retweets:
                    - user_id: '1206112927'
                      screen_name: Altc0inDailyx
                      description: >-
                        🎥 Follow our YouTube channel for DAILY news & opinion
                        videos! Brothers Aaron & Austin. Crypto commentators.
                        Bitcoin, Ethereum, Solana, & more! 🚀
                      profile_image: null
                      statuses_count: 205
                      followers_count: 10
                      friends_count: 63
                      media_count: 0
                      name: Daily
                    - user_id: '1672344126174445569'
                      screen_name: _Sherry85689
                      description: >-
                        True friendship isn't about how long you've known each
                        other, but about honesty, trust, respect, and remaining
                        sincere even in life's difficult times. ❤️
                      profile_image: null
                      statuses_count: 503
                      followers_count: 130
                      friends_count: 296
                      media_count: 93
                      name: Sherry
                    - user_id: '1623032018987585579'
                      screen_name: TinaHuang811111
                      description: >-
                        I'm only here to watch the daily happenings; I reject
                        pornography, gift-giving scams, and fraudulent
                        activities.
                      profile_image: null
                      statuses_count: 308
                      followers_count: 34
                      friends_count: 193
                      media_count: 7
                      name: Tina Huang
                    - user_id: '2037995226531299328'
                      screen_name: muskyofficial5
                      description: |-
                        🚀🚀I SpaceX • CEO & CTO
                        🚘🪐🚀| Tesla • CEO and Product architect
                        🚄🪐🇺🇸| Hyperloop • Founder
                      profile_image: null
                      statuses_count: 218
                      followers_count: 3
                      friends_count: 111
                      media_count: 0
                      name: Musky official
                    - user_id: '2030648213854941184'
                      screen_name: MargaretPa23565
                      description: >-
                        Executive consultant at X HQ | 12 years of Leadership in
                        Digital Strategy & Innovation | Based in Menlo Park,
                        California, USA United States..
                      profile_image: null
                      statuses_count: 862
                      followers_count: 12
                      friends_count: 484
                      media_count: 12
                      name: Margaret Patricia
                    - user_id: '1594644463430909952'
                      screen_name: laylagodify
                      description: >-
                        I'm Layla from Elon Musk management. If I reached out to
                        you, that means you're a lucky fan and you stand a
                        chance to be part of our community ❤️🚀
                      profile_image: null
                      statuses_count: 1069
                      followers_count: 14
                      friends_count: 0
                      media_count: 0
                      name: layla🚀📊
                    - user_id: null
                      screen_name: null
                      description: null
                      profile_image: null
                      statuses_count: null
                      followers_count: null
                      friends_count: null
                      media_count: null
                      name: null
                    - user_id: '1409106180'
                      screen_name: dianitaharianti
                      description: ''
                      profile_image: null
                      statuses_count: 693
                      followers_count: 3
                      friends_count: 8
                      media_count: 0
                      name: dianita
                    - user_id: '1720362217'
                      screen_name: Judy8zii
                      description: >-
                        Passionate about golf, skiing, and diving. You’ll find
                        me traveling in my RV, hiking new trails, or casting a
                        line in peaceful waters. Let’s explore together!
                      profile_image: null
                      statuses_count: 3356
                      followers_count: 90
                      friends_count: 112
                      media_count: 169
                      name: Judy🍁
                    - user_id: '1996699778697379840'
                      screen_name: ElonReachout67
                      description: |-
                        | Spacex • CEO & CTO
                        I Tesla • CEO and Product architect
                        •| Hyperloop • Founder🚀🚀
                      profile_image: null
                      statuses_count: 177
                      followers_count: 4
                      friends_count: 93
                      media_count: 0
                      name: Elon reachout
                    - user_id: '1524555075057762304'
                      screen_name: Gabriel34220545
                      description: >-
                        Mother of wonderful autistic son + 2 older beloved sons,
                        treasure true friends, human + animal rights, nature,
                        truth&freedom, art, music, science, Holy Things
                      profile_image: null
                      statuses_count: 8974
                      followers_count: 275
                      friends_count: 373
                      media_count: 329
                      name: Gabrielle Angelina Ryan
                    - user_id: '1961767507879960577'
                      screen_name: drlucasmason93
                      description: >-
                        I'm dedicated and loyal to the woman my heart craves
                        ❤️🥰
                      profile_image: null
                      statuses_count: 1513
                      followers_count: 54
                      friends_count: 1322
                      media_count: 0
                      name: Dr Lucas Mason✪
                    - user_id: '1195582958075367424'
                      screen_name: RomelBonilla6
                      description: cazador de tus besos
                      profile_image: null
                      statuses_count: 1871
                      followers_count: 214
                      friends_count: 274
                      media_count: 243
                      name: Romel Bonilla
                    - user_id: '1554462862734954496'
                      screen_name: Sophiainthesun
                      description: |-
                        Lost once   Rebuilt everything

                        Money is a tool  
                        Freedom is the goal 

                        If you think long  term  we’ll get along
                      profile_image: null
                      statuses_count: 1365
                      followers_count: 784
                      friends_count: 581
                      media_count: 32
                      name: Sophia
                    - user_id: '1870698860'
                      screen_name: Violetlove82
                      description: ''
                      profile_image: null
                      statuses_count: 778
                      followers_count: 2
                      friends_count: 3
                      media_count: 0
                      name: Violet love
                  next_cursor: HBaS8s+1yb/1hTMAAA==
                requestId: bff960c9-d8d1-4447-b884-af40bd330a7e
          headers: {}
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                example:
                  code: 400
                  data: null
                  message: Missing required parameter
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                example:
                  code: 401
                  data: null
                  message: apiKey is null
        '402':
          description: Payment Required
          content:
            application/json:
              schema:
                type: object
                example:
                  code: 402
                  data: null
                  message: apiKey quota is not enough
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                type: object
                example:
                  code: 429
                  data: null
                  message: qps limit exceeded
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                example:
                  code: 500
                  data: null
                  message: Internal server error
      deprecated: false
      security:
        - JWT Bearer: []
      x-codeSamples:
        - lang: curl
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.keyapi.ai/v1/twitter/retweets?id=1700199139470942473' \
              --header 'Authorization: Bearer <YOUR_API_KEY>'
        - lang: python
          label: Python
          source: |-
            import requests

            response = requests.get(
                'https://api.keyapi.ai/v1/twitter/retweets',
                params={"id": "1700199139470942473"},
                headers={'Authorization': 'Bearer <YOUR_API_KEY>'}
            )
            print(response.json())
        - lang: javascript
          label: JavaScript
          source: >-
            const params = new URLSearchParams({"id": "1700199139470942473"});


            const response = await
            fetch(`https://api.keyapi.ai/v1/twitter/retweets?${params}`, {
              method: 'GET',
              headers: { 'Authorization': 'Bearer <YOUR_API_KEY>' }
            });

            const data = await response.json();

            console.log(data);
components:
  securitySchemes:
    JWT Bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: |-
        API key for authentication. Format: `sk_live_xxxxxxxxxxxxx`
        Get your API key from the [Dashboard](http://keyapi.ai/app/dashboard).

````