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

# 빠른 시작

> 특정 게시물의 인용 포스트 조회

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

이 가이드는 인용 포스트(다른 게시물을 인용하는 포스트)를 가져오는 방법을 단계별로 설명합니다.

<Note>
  **사전 준비 사항**

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

  * 승인이 완료된 App이 연결된 [개발자 계정](https://developer.x.com/en/portal/petition/essential/basic-info)
  * App의 Bearer 토큰
</Note>

***

<Steps>
  <Step title="게시물 ID 찾기" icon="message">
    인용 포스트를 조회하려는 대상 게시물의 ID를 가져옵니다. 이 ID는 게시물의 URL에서 확인할 수 있습니다.

    ```
    https://x.com/XDevelopers/status/1409931481552543749
                                    └── 여기가 게시물 ID입니다
    ```
  </Step>

  <Step title="인용 포스트 요청하기" icon="terminal">
    <CodeGroup dropdown>
      ```bash cURL theme={null}
      curl "https://api.x.com/2/tweets/1409931481552543749/quote_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 Python SDK theme={null}
      from xdk import Client

      client = Client(bearer_token="YOUR_BEARER_TOKEN")

      # 페이지네이션을 사용해 인용 포스트 가져오기
      for page in client.posts.get_quote_tweets(
          "1409931481552543749",
          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 JavaScript SDK theme={null}
      import { Client } from "@xdevplatform/xdk";

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

      // 페이지네이션을 사용해 인용 포스트 가져오기
      const paginator = client.posts.getQuoteTweets("1409931481552543749", {
        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": "1495979553889697792",
          "text": "Great thread on the new API features! https://t.co/...",
          "author_id": "29757971",
          "created_at": "2022-02-22T04:31:34.000Z",
          "public_metrics": {
            "retweet_count": 5,
            "reply_count": 2,
            "like_count": 42,
            "quote_count": 1
          },
          "edit_history_tweet_ids": ["1495979553889697792"]
        }
      ],
      "includes": {
        "users": [
          {
            "id": "29757971",
            "username": "developer",
            "verified": false
          }
        ]
      },
      "meta": {
        "result_count": 1,
        "next_token": "avdjwk0udyx6"
      }
    }
    ```
  </Step>

  <Step title="결과 페이지네이션 처리" icon="arrow-right">
    SDK는 페이지네이션을 자동으로 처리합니다. cURL을 사용할 때는 더 많은 인용 포스트를 가져오려면 `next_token`을 사용하세요.

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

***

<div id="next-steps">
  ## 다음 단계
</div>

<CardGroup cols={2}>
  <Card title="리트윗" icon="retweet" href="/ko/x-api/posts/retweets/introduction">
    리트윗 조회
  </Card>

  <Card title="포스트 조회" icon="magnifying-glass" href="/ko/x-api/posts/lookup/introduction">
    ID로 포스트 조회
  </Card>

  <Card title="API 참조 문서" icon="code" href="/ko/x-api/posts/get-quoted-posts">
    전체 엔드포인트 문서
  </Card>
</CardGroup>
