メインコンテンツへスキップ
User Search エンドポイントを使用すると、キーワードでユーザーを検索できます。名前、ユーザー名、または自己紹介文の内容によってユーザーを見つけることができます。

概要

キーワード検索

名前、ユーザー名、自己紹介で検索

ユーザーを見つける

関連性の高いアカウントを見つける

エンドポイント

MethodEndpoint説明
GET/2/users/searchユーザーを検索する

リクエストの例

curl "https://api.x.com/2/users/search?\
query=python%20developer&\
user.fields=description,verified,public_metrics" \
  -H "Authorization: Bearer $BEARER_TOKEN"

レスポンス例

{
  "data": [
    {
      "id": "1234567890",
      "name": "Python Developer",
      "username": "pythondev",
      "description": "Building cool things with Python",
      "verified": false,
      "public_metrics": {
        "followers_count": 5000,
        "following_count": 200,
        "tweet_count": 1500
      }
    }
  ],
  "meta": {
    "result_count": 1
  }
}

はじめに

前提条件

ユーザー検索

ユーザーを ID またはユーザー名で検索

APIリファレンス

エンドポイントの完全なドキュメント