> ## 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.

# Pinned Lists 조회

> X API v2 pinned Lists lookup 엔드포인트를 사용하여 사용자의 고정된 X List를 조회하는 퀵스타트로, 인증 및 응답 예시를 포함합니다.

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>;
};

이 가이드는 사용자의 고정된 List를 조회하는 방법을 안내합니다.

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

  시작하기 전에 다음이 필요합니다:

  * 승인된 App이 포함된 [developer account](https://developer.x.com/en/portal/petition/essential/basic-info)
  * User Access Token (OAuth 1.0a 또는 OAuth 2.0 PKCE)
</Note>

***

## 고정된 List 가져오기

<Steps>
  <Step title="사용자 ID 가져오기">
    인증된 사용자의 ID가 필요합니다. [user lookup 엔드포인트](/x-api/users/lookup/introduction)를 사용하거나 Access Token(숫자 부분이 사용자 ID)에서 찾을 수 있습니다.
  </Step>

  <Step title="고정된 List 요청">
    <CodeGroup dropdown>
      ```bash cURL theme={null}
      curl "https://api.x.com/2/users/2244994945/pinned_lists?\
      list.fields=follower_count,member_count,owner_id&\
      expansions=owner_id&\
      user.fields=created_at,username" \
        -H "Authorization: Bearer $USER_ACCESS_TOKEN"
      ```

      ```python title="Python SDK" lines wrap icon="python" theme={null}
      from xdk import Client

      client = Client(bearer_token="YOUR_USER_ACCESS_TOKEN")

      # 고정된 List 가져오기
      response = client.lists.get_pinned(
          "2244994945",
          list_fields=["follower_count", "member_count", "owner_id"],
          expansions=["owner_id"],
          user_fields=["created_at", "username"]
      )

      for lst in response.data:
          print(f"{lst.name} - {lst.follower_count} followers")
      ```

      ```javascript title="JavaScript SDK" lines wrap icon="square-js" theme={null}
      import { Client } from "@xdevplatform/xdk";

      const client = new Client({ accessToken: "YOUR_USER_ACCESS_TOKEN" });

      // 고정된 List 가져오기
      const response = await client.lists.getPinned("2244994945", {
        listFields: ["follower_count", "member_count", "owner_id"],
        expansions: ["owner_id"],
        userFields: ["created_at", "username"],
      });

      response.data?.forEach((lst) => {
        console.log(`${lst.name} - ${lst.follower_count} followers`);
      });
      ```
    </CodeGroup>
  </Step>

  <Step title="응답 확인">
    ```json theme={null}
    {
      "data": [
        {
          "id": "1454155907651158017",
          "name": "Tech News",
          "follower_count": 150,
          "member_count": 25,
          "owner_id": "2244994945"
        }
      ],
      "includes": {
        "users": [
          {
            "id": "2244994945",
            "username": "XDevelopers",
            "name": "X Developers",
            "created_at": "2013-12-14T04:35:55.000Z"
          }
        ]
      },
      "meta": {
        "result_count": 1
      }
    }
    ```
  </Step>
</Steps>

***

## 사용 가능한 List 필드

| Field            | Description    |
| :--------------- | :------------- |
| `description`    | List 설명        |
| `owner_id`       | 소유자의 사용자 ID    |
| `private`        | List가 비공개인지 여부 |
| `member_count`   | 멤버 수           |
| `follower_count` | 팔로워 수          |
| `created_at`     | List 생성 날짜     |

***

## 다음 단계

<CardGroup cols={2}>
  <Card title="Pinned Lists 관리" icon="thumbtack" href="/x-api/lists/pinned-lists/quickstart/manage-pinned-lists">
    List 고정 및 고정 해제
  </Card>

  <Card title="List lookup" icon="https://mintcdn.com/x-preview/ygI6sSJPehlc0qNT/icons/xds/icon-bulleted-list.svg?fit=max&auto=format&n=ygI6sSJPehlc0qNT&q=85&s=b9bf8323233df59c682b0fec8e3f88d5" href="/x-api/lists/list-lookup/quickstart" width="24" height="24" data-path="icons/xds/icon-bulleted-list.svg">
    List 세부 정보 가져오기
  </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-pinned-lists" width="24" height="24" data-path="icons/xds/icon-code.svg">
    전체 엔드포인트 문서
  </Card>
</CardGroup>
