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

# User Lookup

> User lookup 엔드포인트를 사용하면 한 명 이상의 사용자에 대한 프로필 정보를 조회할 수 있습니다. Lookup을 다루는 X API v2 standard 티어 레퍼런스입니다.

export const Button = ({href, children}) => {
  return <div className="not-prose">
    <a href={href}>
      <button className="x-btn">
        <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 엔드포인트를 사용하면 한 명 이상의 사용자에 대한 프로필 정보를 조회할 수 있습니다. ID나 username으로 사용자를 조회하거나, 현재 인증된 사용자의 세부 정보를 가져올 수 있습니다.

## 개요

<CardGroup cols={2}>
  <Card title="ID로 조회" icon="fingerprint">
    고유한 사용자 ID로 사용자 조회
  </Card>

  <Card title="username으로 조회" icon="at">
    @handle로 사용자 조회
  </Card>

  <Card title="여러 사용자" icon="https://mintcdn.com/x-preview/SxzTbJaLjs3MidH1/icons/xds/icon-people.svg?fit=max&auto=format&n=SxzTbJaLjs3MidH1&q=85&s=9d5f3f82edcd2a4070364193436e7980" width="24" height="24" data-path="icons/xds/icon-people.svg">
    요청당 최대 100명의 사용자 조회
  </Card>

  <Card title="인증된 사용자" icon="user-check">
    현재 사용자의 세부 정보 가져오기
  </Card>
</CardGroup>

***

## 엔드포인트

| Method | Endpoint                                                              | Description                   |
| :----- | :-------------------------------------------------------------------- | :---------------------------- |
| GET    | [`/2/users/:id`](/x-api/users/get-user-by-id)                         | ID로 사용자 가져오기                  |
| GET    | [`/2/users`](/x-api/users/get-users-by-ids)                           | ID로 사용자 가져오기 (최대 100명)        |
| GET    | [`/2/users/by/username/:username`](/x-api/users/get-user-by-username) | username으로 사용자 가져오기           |
| GET    | [`/2/users/by`](/x-api/users/get-users-by-usernames)                  | username으로 사용자 가져오기 (최대 100명) |
| GET    | [`/2/users/me`](/x-api/users/get-my-user)                             | 인증된 사용자 가져오기                  |

***

## 요청 예시

```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"
```

## 응답 예시

```json title="응답 예시" lines wrap icon="https://mintcdn.com/x-preview/Vn2KEkZaPF9LiPi3/icons/xds/icon-brackets.svg?fit=max&auto=format&n=Vn2KEkZaPF9LiPi3&q=85&s=ed2428e77bab43e57800e1a590e982fa" 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
    }
  }
}
```

***

## 시작하기

<Note>
  **사전 요구사항**

  * 승인된 [developer account](https://developer.x.com/en/portal/petition/essential/basic-info)
  * Developer Console 내의 [Project와 App](/resources/fundamentals/developer-apps)
  * App의 [key와 token](/resources/fundamentals/authentication)
</Note>

<CardGroup cols={2}>
  <Card title="User lookup 퀵스타트" icon="https://mintcdn.com/x-preview/oR-aRNyj1BKPJtxM/icons/xds/icon-rocket.svg?fit=max&auto=format&n=oR-aRNyj1BKPJtxM&q=85&s=b978d7a9225de31709efbbed5b84e92d" href="/x-api/users/lookup/quickstart/user-lookup" width="24" height="24" data-path="icons/xds/icon-rocket.svg">
    ID나 username으로 사용자 조회
  </Card>

  <Card title="인증된 사용자 퀵스타트" icon="https://mintcdn.com/x-preview/SxzTbJaLjs3MidH1/icons/xds/icon-person.svg?fit=max&auto=format&n=SxzTbJaLjs3MidH1&q=85&s=507a4bbcdcf5744bd18781508002e305" href="/x-api/users/lookup/quickstart/authenticated-lookup" width="24" height="24" data-path="icons/xds/icon-person.svg">
    현재 사용자의 프로필 가져오기
  </Card>

  <Card title="통합 가이드" icon="https://mintcdn.com/x-preview/Vn2KEkZaPF9LiPi3/icons/xds/icon-book.svg?fit=max&auto=format&n=Vn2KEkZaPF9LiPi3&q=85&s=22ac564792481d14ae36a941546039c8" href="/x-api/users/lookup/integrate" width="24" height="24" data-path="icons/xds/icon-book.svg">
    핵심 개념 및 모범 사례
  </Card>

  <Card title="API 레퍼런스" icon="https://mintcdn.com/x-preview/ygI6sSJPehlc0qNT/icons/xds/icon-code.svg?fit=max&auto=format&n=ygI6sSJPehlc0qNT&q=85&s=488e23401b19225b89acc0136d242219" href="/x-api/users/get-user-by-id" width="24" height="24" data-path="icons/xds/icon-code.svg">
    전체 엔드포인트 문서
  </Card>
</CardGroup>
