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

# ユーザー検索

> id、ユーザー名、または認証済みユーザー自身についてユーザープロフィールを取得します

export const Button = ({href, children}) => {
  return <div className="not-prose group">
    <a href={href}>
      <button className="flex items-center space-x-2.5 py-1 px-4 bg-primary-dark dark:bg-white text-white dark:text-gray-950 rounded-full group-hover:opacity-[0.9] font-medium">
        <span>
          {children}
        </span>
        <svg width="3" height="24" viewBox="0 -9 3 24" class="h-6 rotate-0 overflow-visible"><path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path></svg>
      </button>
    </a>
  </div>;
};

User lookup エンドポイントを使用すると、1人または複数のユーザーのプロフィール情報を取得できます。ユーザーを id やユーザー名で検索したり、現在認証されているユーザーの詳細を取得したりできます。

<div id="overview">
  ## 概要
</div>

<CardGroup cols={2}>
  <Card title="ユーザーIDで" icon="fingerprint">
    一意のユーザーIDでユーザーを取得します
  </Card>

  <Card title="ユーザー名で" icon="at">
    @handle (ユーザー名) でユーザーを取得します
  </Card>

  <Card title="複数ユーザー" icon="users">
    1 回のリクエストで最大 100 人のユーザーを取得します
  </Card>

  <Card title="認証済みユーザー" icon="user-check">
    認証中のユーザーの詳細を取得します
  </Card>
</CardGroup>

***

<div id="endpoints">
  ## エンドポイント
</div>

| Method | Endpoint                                                                 | Description            |
| :----- | :----------------------------------------------------------------------- | :--------------------- |
| GET    | [`/2/users/:id`](/ja/x-api/users/get-user-by-id)                         | ID でユーザーを取得            |
| GET    | [`/2/users`](/ja/x-api/users/get-users-by-ids)                           | ID で最大 100 件のユーザーを取得   |
| GET    | [`/2/users/by/username/:username`](/ja/x-api/users/get-user-by-username) | ユーザー名でユーザーを取得          |
| GET    | [`/2/users/by`](/ja/x-api/users/get-users-by-usernames)                  | ユーザー名で最大 100 件のユーザーを取得 |
| GET    | [`/2/users/me`](/ja/x-api/users/get-my-user)                             | 認証済みのユーザーを取得           |

***

<div id="example-request">
  ## リクエスト例
</div>

```bash theme={null}
curl "https://api.x.com/2/users/by/username/XDevelopers?\
user.fields=created_at,description,public_metrics,verified" \
  -H "Authorization: Bearer $BEARER_TOKEN"
```

<div id="example-response">
  ## レスポンスの例
</div>

```json theme={null}
{
  "data": {
    "id": "2244994945",
    "name": "X Developers",
    "username": "XDevelopers",
    "created_at": "2013-12-14T04:35:55.000Z",
    "description": "The voice of the X developer community",
    "verified": true,
    "public_metrics": {
      "followers_count": 583423,
      "following_count": 2048,
      "tweet_count": 14052,
      "listed_count": 1672
    }
  }
}
```

***

<div id="getting-started">
  ## はじめに
</div>

<Note>
  **前提条件**

  * 承認済みの[開発者アカウント](https://developer.x.com/en/portal/petition/essential/basic-info)
  * 開発者コンソール内の [Project と App](/ja/resources/fundamentals/developer-apps)
  * 自分の App の [キーとトークン](/ja/resources/fundamentals/authentication)
</Note>

<CardGroup cols={2}>
  <Card title="ユーザー検索クイックスタート" icon="rocket" href="/ja/x-api/users/lookup/quickstart/user-lookup">
    ID またはユーザー名でユーザーを検索します
  </Card>

  <Card title="認証済みユーザークイックスタート" icon="user" href="/ja/x-api/users/lookup/quickstart/authenticated-lookup">
    現在のユーザーのプロフィールを取得します
  </Card>

  <Card title="連携ガイド" icon="book" href="/ja/x-api/users/lookup/integrate">
    基本概念とベストプラクティス
  </Card>

  <Card title="APIリファレンス" icon="code" href="/ja/x-api/users/get-user-by-id">
    エンドポイントの詳細ドキュメント
  </Card>
</CardGroup>
