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

# X API

> 게시물, 사용자, Spaces, 리스트, DM, 트렌드를 위한 v2 REST 엔드포인트와 사용량 기반 가격 정책, 최신 SDK로 X에 프로그래밍 방식으로 액세스하세요.

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

X API는 X의 공개 대화에 대한 프로그래밍 방식의 액세스를 제공합니다. 유연한 사용량 기반 가격 정책과 최신 REST 엔드포인트를 통해 게시물을 읽고, 콘텐츠를 게시하고, 사용자를 관리하고, 트렌드를 분석할 수 있습니다.

<CardGroup cols={3}>
  <Card title="시작하기" icon="rocket" href="/x-api/getting-started/make-your-first-request">
    앱을 만들고 몇 분 안에 첫 요청을 보내세요.
  </Card>

  <Card title="API 레퍼런스" icon="code" href="/x-api/posts/create-post">
    사용 가능한 모든 엔드포인트를 살펴보세요.
  </Card>

  <Card title="SDK" icon="cube" href="/tools-and-libraries">
    공식 Python 및 TypeScript 라이브러리입니다.
  </Card>
</CardGroup>

***

## 무엇을 만들 수 있나요

<CardGroup cols={3}>
  <Card title="게시물" icon="message" href="/x-api/posts/lookup/introduction">
    게시물 검색, 조회, 게시. 타임라인, 스레드, 인용 게시물에 액세스합니다.
  </Card>

  <Card title="사용자" icon="user" href="/x-api/users/lookup/introduction">
    사용자를 조회하고 팔로우, 차단, 뮤트를 관리합니다.
  </Card>

  <Card title="Spaces" icon="microphone" href="/x-api/spaces/lookup/introduction">
    라이브 오디오 대화와 참여자를 찾으세요.
  </Card>

  <Card title="다이렉트 메시지" icon="envelope" href="/x-api/direct-messages/lookup/introduction">
    비공개 메시지를 송수신합니다.
  </Card>

  <Card title="리스트" icon="list" href="/x-api/lists/list-lookup/introduction">
    큐레이션된 계정 리스트를 만들고 관리합니다.
  </Card>

  <Card title="트렌드" icon="arrow-trend-up" href="/x-api/trends/trends-by-woeid/introduction">
    위치별 트렌드 주제에 액세스합니다.
  </Card>
</CardGroup>

***

## 가격

X API는 **사용량 기반** 가격을 사용합니다. 구독 없이 — 사용한 만큼만 지불합니다.

<CardGroup cols={2}>
  <Card title="유연한 확장" icon="chart-line">
    작게 시작하고 성장하세요. 비용은 실제 사용량에 따라 확장됩니다.
  </Card>

  <Card title="약정 없음" icon="unlock">
    계약이나 최소 지출 없음. 언제든지 중단할 수 있습니다.
  </Card>

  <Card title="실시간 추적" icon="gauge-high">
    Developer Console에서 사용량과 비용을 실시간으로 모니터링합니다.
  </Card>

  <Card title="크레딧 기반" icon="coins">
    크레딧을 미리 구매합니다. API 사용에 따라 차감됩니다.
  </Card>
</CardGroup>

<Tip>
  X API 크레딧을 구매하면 무료 [xAI API](https://docs.x.ai) 크레딧을 받을 수 있습니다 — 지출 금액에 따라 최대 20% 적립. [자세히 알아보기](/x-api/getting-started/pricing#free-xai-api-credits)
</Tip>

<div className="mt-6 flex gap-4">
  <Button href="/x-api/getting-started/pricing">가격 세부 정보</Button>
  <Button href="https://console.x.com">크레딧 구매</Button>
</div>

***

## 주요 기능

<Tabs>
  <Tab title="데이터 액세스">
    ### 풍부한 데이터 객체

    게시물, 사용자, 미디어 등에 대한 상세하고 구조화된 데이터에 액세스합니다:

    * **게시물**: 전체 텍스트, 지표, 엔티티, 주석, 대화 스레드
    * **사용자**: 프로필, 팔로워 수, 인증 상태
    * **미디어**: 이미지, 비디오, 메타데이터가 있는 GIF
    * **설문조사**: 옵션 및 투표 수

    [fields](/x-api/fundamentals/fields) 및 [expansions](/x-api/fundamentals/expansions)로 응답을 맞춤 설정하여 필요한 데이터만 정확하게 받으세요.
  </Tab>

  <Tab title="거의 실시간 스트리밍">
    ### Filtered stream

    게시물이 게시되는 대로 거의 실시간으로 전달받으세요. 최대 1,000개의 필터링 규칙을 정의하여 일치하는 게시물만 수신할 수 있습니다.

    ```bash theme={null}
    # Add a rule
    curl -X POST "https://api.x.com/2/tweets/search/stream/rules" \
      -H "Authorization: Bearer $TOKEN" \
      -d '{"add": [{"value": "from:xdevelopers"}]}'

    # Connect to stream
    curl "https://api.x.com/2/tweets/search/stream" \
      -H "Authorization: Bearer $TOKEN"
    ```

    [filtered stream에 대해 자세히 알아보기 →](/x-api/posts/filtered-stream/introduction)
  </Tab>

  <Tab title="검색 & 분석">
    ### Full-archive search

    공개 게시물의 전체 기록을 검색하세요 — 2006년까지. 사용자, 키워드, 날짜 등에 대한 연산자로 쿼리를 빌드하세요.

    ```bash theme={null}
    curl "https://api.x.com/2/tweets/search/all?query=AI%20lang:en" \
      -H "Authorization: Bearer $TOKEN"
    ```

    ### 지표

    노출수, 좋아요, 리포스트, 답글, 비디오 조회수 등의 참여도 지표에 액세스합니다.

    [검색에 대해 자세히 알아보기 →](/x-api/posts/search/introduction)
  </Tab>
</Tabs>

***

## 빠른 시작

<Steps>
  <Step title="개발자 계정 만들기">
    [console.x.com](https://console.x.com)에서 가입하고 앱을 만드세요.
  </Step>

  <Step title="자격 증명 받기">
    앱 전용 요청을 위한 Bearer Token을 생성하세요.
  </Step>

  <Step title="요청 보내기">
    사용자 조회를 시도해 보세요:

    ```bash theme={null}
    curl "https://api.x.com/2/users/by/username/xdevelopers" \
      -H "Authorization: Bearer $BEARER_TOKEN"
    ```
  </Step>
</Steps>

<Button href="/x-api/getting-started/make-your-first-request">전체 빠른 시작 가이드</Button>

***

## 도구 & 라이브러리

<CardGroup cols={3}>
  <Card title="Python SDK" icon="python" href="/xdks/python/overview">
    비동기 지원이 있는 공식 Python 라이브러리입니다.
  </Card>

  <Card title="TypeScript SDK" icon="js" href="/xdks/typescript/overview">
    공식 TypeScript/JavaScript 라이브러리입니다.
  </Card>

  <Card title="Postman" icon="server" href="https://www.postman.com/xapidevelopers/x-api-public-workspace/collection/34902927-2efc5689-99c6-4ab6-8091-996f35c2fd80">
    대화형 API 탐색기입니다.
  </Card>
</CardGroup>

[모든 라이브러리 둘러보기 →](/tools-and-libraries)

***

## 지원

<CardGroup cols={2}>
  <Card title="Developer Forum" icon="comments" href="https://devcommunity.x.com">
    커뮤니티와 X 팀의 도움을 받으세요.
  </Card>

  <Card title="Support Hub" icon="circle-question" href="https://developer.x.com/en/support/twitter-api.html">
    FAQ 및 문제 해결 가이드입니다.
  </Card>
</CardGroup>
