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

# 퀵스타트

> 이 가이드는 List 타임라인에서 Post를 조회하는 방법을 안내합니다. List tweets를 다루는 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>;
};

이 가이드는 List 타임라인에서 Post를 조회하는 방법을 안내합니다.

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

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

  * 승인된 App이 포함된 [developer account](https://developer.x.com/en/portal/petition/essential/basic-info)
  * App의 Bearer Token
</Note>

***

<Steps>
  <Step title="List ID 찾기" icon="https://mintcdn.com/x-preview/ygI6sSJPehlc0qNT/icons/xds/icon-bulleted-list.svg?fit=max&auto=format&n=ygI6sSJPehlc0qNT&q=85&s=b9bf8323233df59c682b0fec8e3f88d5" width="24" height="24" data-path="icons/xds/icon-bulleted-list.svg">
    x.com에서 List를 볼 때 URL에서 List ID를 찾을 수 있습니다:

    ```
    https://x.com/i/lists/84839422
                          └── 이 부분이 List ID
    ```
  </Step>

  <Step title="List 타임라인 요청" icon="terminal">
    <CodeGroup dropdown>
      ```bash cURL theme={null}
      curl "https://api.x.com/2/lists/84839422/tweets?\
      tweet.fields=created_at,public_metrics,author_id&\
      expansions=author_id&\
      user.fields=username,verified&\
      max_results=10" \
        -H "Authorization: Bearer $BEARER_TOKEN"
      ```

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

      client = Client(bearer_token="YOUR_BEARER_TOKEN")

      # 페이지네이션으로 List에서 Post 가져오기
      for page in client.lists.get_tweets(
          "84839422",
          tweet_fields=["created_at", "public_metrics", "author_id"],
          expansions=["author_id"],
          user_fields=["username", "verified"],
          max_results=10
      ):
          for post in page.data:
              print(f"{post.text[:50]}... - Likes: {post.public_metrics.like_count}")
      ```

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

      const client = new Client({ bearerToken: "YOUR_BEARER_TOKEN" });

      // 페이지네이션으로 List에서 Post 가져오기
      const paginator = client.lists.getTweets("84839422", {
        tweetFields: ["created_at", "public_metrics", "author_id"],
        expansions: ["author_id"],
        userFields: ["username", "verified"],
        maxResults: 10,
      });

      for await (const page of paginator) {
        page.data?.forEach((post) => {
          console.log(`${post.text?.slice(0, 50)}... - Likes: ${post.public_metrics?.like_count}`);
        });
      }
      ```
    </CodeGroup>
  </Step>

  <Step title="응답 확인" icon="eye">
    ```json theme={null}
    {
      "data": [
        {
          "id": "1458172421115101189",
          "text": "Check out our latest announcement...",
          "author_id": "4172587277",
          "created_at": "2024-01-15T10:30:00.000Z",
          "public_metrics": {
            "retweet_count": 42,
            "reply_count": 5,
            "like_count": 156,
            "quote_count": 3
          },
          "edit_history_tweet_ids": ["1458172421115101189"]
        }
      ],
      "includes": {
        "users": [
          {
            "id": "4172587277",
            "username": "TechNews",
            "verified": true
          }
        ]
      },
      "meta": {
        "result_count": 1,
        "next_token": "7140dibdnow9c7btw3z2vwioavpvutgzrzm9icis4ndix"
      }
    }
    ```
  </Step>

  <Step title="결과 페이지네이션" icon="https://mintcdn.com/x-preview/Vn2KEkZaPF9LiPi3/icons/xds/icon-arrow-right.svg?fit=max&auto=format&n=Vn2KEkZaPF9LiPi3&q=85&s=88e933002782dbdeb204043cedef033e" width="24" height="24" data-path="icons/xds/icon-arrow-right.svg">
    SDK는 페이지네이션을 자동으로 처리합니다. cURL의 경우 응답에서 `next_token`을 사용하여 더 많은 Post를 가져옵니다:

    ```bash theme={null}
    curl "https://api.x.com/2/lists/84839422/tweets?\
    max_results=10&\
    pagination_token=7140dibdnow9c7btw3z2vwioavpvutgzrzm9icis4ndix" \
      -H "Authorization: Bearer $BEARER_TOKEN"
    ```
  </Step>
</Steps>

<Note>
  이 엔드포인트는 List의 가장 최근 Post를 최대 800개까지 반환합니다.
</Note>

***

## 다음 단계

<CardGroup cols={2}>
  <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="List 멤버" icon="https://mintcdn.com/x-preview/SxzTbJaLjs3MidH1/icons/xds/icon-people.svg?fit=max&auto=format&n=SxzTbJaLjs3MidH1&q=85&s=9d5f3f82edcd2a4070364193436e7980" href="/x-api/lists/list-members/introduction" width="24" height="24" data-path="icons/xds/icon-people.svg">
    List 멤버 가져오기
  </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/lists/list-tweets/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/lists/get-list-posts" width="24" height="24" data-path="icons/xds/icon-code.svg">
    전체 엔드포인트 문서
  </Card>
</CardGroup>
