# 取得使用者最新推文

**API:** Data API

**Endpoint:** `GET /v1/beta/twitter/user/last_tweets`

**Tags:** Twitter / X

取得使用者的最新推文，可接受 `userName`（@handle）或 `userId`——在尚未將 handle 解析為 ID 時很有用。可選擇包含回覆。以游標分頁。推文位於 `data` 之下，並附有 `has_next_page` 與 `next_cursor`。若已有數字 ID，且想要附有父推文展開的完整個人檔案順序時間軸，請改用 `get_twitter_user_tweet_timeline`。

### 計費參考

- 計量方式：依結果筆數計量。
- 參考請求估算：0.003 美元。
- 最低成本基礎：0.00015 美元。
- 參考客戶乘數：1.0。不得再次套用於已結算的客戶金額。
- 成本基礎不構成最終客戶價格，即使為零亦同。

僅供參考的中繼資料，並非帳戶報價、保證價格或消費上限。資源額度並非 Felo 額度。最終費用依 Felo 計費記錄為準。

## Base URL

- `https://openapi.felo.ai`

## Authentication

- `FeloBearerAuth` (http bearer, bearer format Felo API Key)
- `FeloApiKey` (apiKey in header `X-API-Key`)

## Parameters

| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `count` | query | no | string |  |
| `cursor` | query | no | string |  |
| `includeReplies` | query | no | string |  |
| `userId` | query | no | string |  |
| `userName` | query | no | string | X username (the part after @), for example OpenAI. |

## Responses

### 200 — 使用者推文

Headers:
- `X-Request-Id` (string) — 聯絡 Felo 支援時需提供的請求識別碼。

**application/json**

Schema: `ResponseAd3D19335Ae4_UserTweetsResponse` (`#/components/schemas/ResponseAd3D19335Ae4_UserTweetsResponse`)

### 400 — 無法處理該要求。請檢查請求參數。

### 401 — 需要有效的 Felo API 金鑰。

### 402 — 由於未符合計費要求，要求無法繼續。

### 403 — 該帳戶無權執行此操作。

### 429 — 已達到要求或支出上限。

### 502 — 服務無法完成該要求。

### 503 — API 或計費服務暫時無法使用。

### 504 — 服務在處理要求時逾時。

### default — 錯誤回應；上游透傳回應可能採用供應商格式

**application/json**

Schema:

```json
{}
```

## Schema definitions

### ResponseAd3D19335Ae4_UserTweetsResponse

`#/components/schemas/ResponseAd3D19335Ae4_UserTweetsResponse`

```json
{
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "enum": [
        "success",
        "error"
      ]
    },
    "code": {
      "type": "integer",
      "description": "提供者狀態碼。"
    },
    "msg": {
      "type": "string"
    },
    "data": {
      "type": "object",
      "properties": {
        "tweets": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": true,
            "description": "X 傳回的推文物件。"
          }
        },
        "pin_tweet": {
          "type": [
            "object",
            "null"
          ],
          "additionalProperties": true
        }
      },
      "additionalProperties": true
    },
    "has_next_page": {
      "type": "boolean"
    },
    "next_cursor": {
      "type": [
        "string",
        "null"
      ]
    }
  }
}
```
