跳转到主要内容
GET
/
v1
/
twitter
/
screenname
cURL
curl --request GET \
  --url 'https://api.keyapi.ai/v1/twitter/screenname?screenname=elonmusk&rest_id=44196397' \
  --header 'Authorization: Bearer <YOUR_API_KEY>'
{
  "code": 0,
  "message": "success",
  "data": {
    "status": "active",
    "profile": "elonmusk",
    "rest_id": "44196397",
    "blue_verified": true,
    "verification_type": null,
    "affiliates": {
      "label": {
        "badge": {
          "url": "https://pbs.twimg.com/profile_images/1955359038532653056/OSHY3ewP_bigger.jpg"
        },
        "description": "X",
        "url": {
          "url": "https://twitter.com/X",
          "urlType": "DeepLink"
        },
        "userLabelDisplayType": "Badge",
        "userLabelType": "BusinessLabel"
      }
    },
    "business_account": [],
    "avatar": "https://pbs.twimg.com/profile_images/2053244804520427520/m8mdWZCG_normal.jpg",
    "header_image": "https://pbs.twimg.com/profile_banners/44196397/1774145451",
    "desc": "https://t.co/dDtDyVssfm",
    "name": "Elon Musk",
    "protected": false,
    "location": "",
    "friends": 1325,
    "sub_count": 239947098,
    "statuses_count": 102410,
    "media_count": 4487,
    "pinned_tweet_ids_str": null,
    "created_at": "Tue Jun 02 20:12:29 +0000 2009",
    "id": "44196397"
  },
  "requestId": "dbca9df7-d91b-4075-8d72-7bb4b062d01a"
}
🪙1 credit每次请求

Copy for AI

🤖 让 AI 帮你写调用代码

点击按钮复制一段结构化提示词,可直接交给 ChatGPT、Claude 或其他 AI 助手生成接口调用代码。

授权

Authorization
string
header
必填

接口鉴权凭证。请在请求 Header 中传入 Authorization: Bearer <YOUR_API_KEY>。 可在 Dashboard 获取你的 API Key。

查询参数

screenname
string
必填

Twitter / X 用户名,不包含 @。

示例:

"elonmusk"

rest_id
string

用户ID;传入后会优先使用该 ID 查询,并覆盖 screenname。

示例:

"44196397"

响应

请求成功

The response is of type object.