> **For AI agents:** this page is a focused, LLM-optimized view of a
> single Fiber AI operation. Before calling it, fetch the routing
> instructions at [`https://api.fiber.ai/llms.txt`](https://api.fiber.ai/llms.txt) and the full operation
> index at [`https://api.fiber.ai/ai-docs/index.md`](https://api.fiber.ai/ai-docs/index.md).

# twitterUserTweets

`POST /v1/twitter/user-tweets`

**Tags:** `X`

Fetch Twitter/X user tweets

**Endpoint:** `https://api.fiber.ai/v1/twitter/user-tweets`

## Description

Fetches the latest tweets for a Twitter/X user. Returns a paginated list of tweets with engagement metrics. Use the `cursor` field from the response to retrieve subsequent pages.

⚡ Rate limit: 300 requests per 1 minute

💰 Cost: 2 credits per page of results ⓘ

## Request body (JSON Schema)

```json
{
  "type": "object",
  "properties": {
    "apiKey": {
      "type": "string",
      "description": "Your Fiber API key"
    },
    "handle": {
      "type": "string",
      "minLength": 1,
      "description": "Twitter/X handle to fetch tweets for. Accepts with or without a leading '@' (e.g. 'elonmusk' or '@elonmusk')."
    },
    "cursor": {
      "type": [
        "string",
        "null"
      ],
      "minLength": 1,
      "description": "Pagination cursor from a previous response to retrieve the next page of tweets. Omit for the first page."
    }
  },
  "required": [
    "apiKey",
    "handle"
  ]
}
```

## Response — success (JSON Schema)

```json
{
  "type": "object",
  "properties": {
    "output": {
      "type": "object",
      "properties": {
        "tweets": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Numeric tweet ID."
              },
              "text": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Full tweet text."
              },
              "authorId": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Numeric user ID of the tweet author."
              },
              "handle": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Twitter/X handle of the tweet author (without '@')."
              },
              "displayName": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Display name of the tweet author."
              },
              "createdAt": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "When the tweet was created."
              },
              "likeCount": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "Number of likes."
              },
              "replyCount": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "Number of replies."
              },
              "retweetCount": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "Number of retweets."
              },
              "quoteCount": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "Number of quote tweets."
              },
              "viewCount": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "Number of views."
              },
              "bookmarkCount": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "Number of bookmarks."
              },
              "isRetweet": {
                "type": [
                  "boolean",
                  "null"
                ],
                "description": "Whether this tweet is a retweet."
              },
              "isReply": {
                "type": [
                  "boolean",
                  "null"
                ],
                "description": "Whether this tweet is a reply to another tweet."
              },
              "lang": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "BCP-47 language code detected for the tweet (e.g. 'en' for English, 'es' for Spanish)."
              }
            }
          },
          "description": "List of tweets for this page."
        },
        "nextCursor": {
          "type": [
            "string",
            "null"
          ],
          "description": "Cursor to retrieve the next page of tweets. Pass as `cursor` in the next request. Null if there are no more pages."
        }
      },
      "required": [
        "tweets"
      ]
    },
    "chargeInfo": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "method": {
              "type": "string",
              "enum": [
                "charged-now"
              ]
            },
            "creditsCharged": {
              "type": "number"
            },
            "lowCreditAlert": {
              "type": [
                "object",
                "null"
              ],
              "properties": {
                "getMoreCreditsUrl": {
                  "type": "string",
                  "format": "uri",
                  "description": "URL to top up credits or restart billing cycle to get fresh credits."
                },
                "message": {
                  "type": "string",
                  "description": "Human-readable credits warning."
                },
                "availableCredits": {
                  "type": "number",
                  "description": "Number of credits remaining in the current billing period."
                }
              },
              "required": [
                "getMoreCreditsUrl",
                "message",
                "availableCredits"
              ],
              "description": "Contains a link to get more credits, a warning message, and the remaining credit count."
            }
          },
          "required": [
            "method",
            "creditsCharged"
          ],
          "description": "Credits were charged immediately for this operation"
        },
        {
          "type": "object",
          "properties": {
            "method": {
              "type": "string",
              "enum": [
                "charging-later"
              ]
            },
            "message": {
              "type": "string"
            },
            "lowCreditAlert": {
              "type": [
                "object",
                "null"
              ],
              "properties": {
                "getMoreCreditsUrl": {
                  "type": "string",
                  "format": "uri",
                  "description": "URL to top up credits or restart billing cycle to get fresh credits."
                },
                "message": {
                  "type": "string",
                  "description": "Human-readable credits warning."
                },
                "availableCredits": {
                  "type": "number",
                  "description": "Number of credits remaining in the current billing period."
                }
              },
              "required": [
                "getMoreCreditsUrl",
                "message",
                "availableCredits"
              ],
              "description": "Contains a link to get more credits, a warning message, and the remaining credit count."
            }
          },
          "required": [
            "method",
            "message"
          ],
          "description": "Credits will be charged after the operation completes"
        },
        {
          "type": "object",
          "properties": {
            "method": {
              "type": "string",
              "enum": [
                "charged-for-async-process"
              ]
            },
            "creditsCharged": {
              "type": "number"
            },
            "message": {
              "type": "string"
            },
            "lowCreditAlert": {
              "type": [
                "object",
                "null"
              ],
              "properties": {
                "getMoreCreditsUrl": {
                  "type": "string",
                  "format": "uri",
                  "description": "URL to top up credits or restart billing cycle to get fresh credits."
                },
                "message": {
                  "type": "string",
                  "description": "Human-readable credits warning."
                },
                "availableCredits": {
                  "type": "number",
                  "description": "Number of credits remaining in the current billing period."
                }
              },
              "required": [
                "getMoreCreditsUrl",
                "message",
                "availableCredits"
              ],
              "description": "Contains a link to get more credits, a warning message, and the remaining credit count."
            }
          },
          "required": [
            "method",
            "creditsCharged",
            "message"
          ],
          "description": "Credits that were charged for an asynchronous operation"
        },
        {
          "type": "object",
          "properties": {
            "method": {
              "type": "string",
              "enum": [
                "free"
              ]
            },
            "message": {
              "type": "string"
            },
            "lowCreditAlert": {
              "type": [
                "object",
                "null"
              ],
              "properties": {
                "getMoreCreditsUrl": {
                  "type": "string",
                  "format": "uri",
                  "description": "URL to top up credits or restart billing cycle to get fresh credits."
                },
                "message": {
                  "type": "string",
                  "description": "Human-readable credits warning."
                },
                "availableCredits": {
                  "type": "number",
                  "description": "Number of credits remaining in the current billing period."
                }
              },
              "required": [
                "getMoreCreditsUrl",
                "message",
                "availableCredits"
              ],
              "description": "Contains a link to get more credits, a warning message, and the remaining credit count."
            }
          },
          "required": [
            "method",
            "message"
          ],
          "description": "No credits were charged for this operation"
        },
        {
          "type": "object",
          "properties": {
            "method": {
              "type": "string",
              "enum": [
                "credits-refunded"
              ]
            },
            "creditsRefunded": {
              "type": "number"
            },
            "message": {
              "type": "string"
            },
            "lowCreditAlert": {
              "type": [
                "object",
                "null"
              ],
              "properties": {
                "getMoreCreditsUrl": {
                  "type": "string",
                  "format": "uri",
                  "description": "URL to top up credits or restart billing cycle to get fresh credits."
                },
                "message": {
                  "type": "string",
                  "description": "Human-readable credits warning."
                },
                "availableCredits": {
                  "type": "number",
                  "description": "Number of credits remaining in the current billing period."
                }
              },
              "required": [
                "getMoreCreditsUrl",
                "message",
                "availableCredits"
              ],
              "description": "Contains a link to get more credits, a warning message, and the remaining credit count."
            }
          },
          "required": [
            "method",
            "creditsRefunded",
            "message"
          ],
          "description": "Credits were refunded for this operation"
        }
      ]
    },
    "warnings": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string",
            "description": "Full path to extraneous field (e.g., 'searchParams.ExtraField')"
          },
          "message": {
            "type": "string",
            "description": "Warning message"
          }
        },
        "required": [
          "field",
          "message"
        ]
      },
      "description": "Warnings about extraneous fields in request"
    },
    "advice": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "default": [],
      "description": "Tips, recommendations, and suggestions for using this API effectively."
    }
  },
  "required": [
    "output",
    "chargeInfo",
    "advice"
  ],
  "additionalProperties": false
}
```

---

Canonical JSON: [`https://api.fiber.ai/openapi.json`](https://api.fiber.ai/openapi.json)
Operation index: [`https://api.fiber.ai/ai-docs/index.md`](https://api.fiber.ai/ai-docs/index.md)
