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

# 사용량

> API 사용량과 게시물 사용량을 모니터링하고 추적하세요

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

Usage 엔드포인트는 소비된 포스트 수를 포함한 API 사용량을 모니터링할 수 있게 해줍니다. 사용량을 프로그램적으로 추적하여 비용을 관리하고 한도 내에서 사용량을 유지하세요.

<div id="overview">
  ## 개요
</div>

<CardGroup cols={2}>
  <Card title="포스트 사용량" icon="chart-simple">
    소비된 포스트를 추적
  </Card>

  <Card title="일별 분석" icon="calendar-days">
    일별 사용량을 확인
  </Card>

  <Card title="App 단위" icon="gauge">
    App 전체 사용량을 모니터링
  </Card>
</CardGroup>

***

<div id="endpoint">
  ## 엔드포인트
</div>

| 메서드 | 엔드포인트                                          | 설명                 |
| :-- | :--------------------------------------------- | :----------------- |
| GET | [`/2/usage/tweets`](/ko/x-api/usage/get-usage) | 게시물 사용량 데이터를 조회합니다 |

***

<div id="response-data">
  ## 응답 데이터
</div>

응답에는 게시물의 일별 소비 건수가 포함됩니다:

```json theme={null}
{
  "data": {
    "daily_project_usage": [
      {
        "date": "2024-01-15",
        "usage": [
          {
            "app_id": "12345678",
            "tweets_consumed": 15420
          }
        ]
      }
    ],
    "project_id": "1234567890",
    "project_cap": 10000000
  }
}
```

<div id="fields">
  ### 필드
</div>

| Field                 | Description       |
| :-------------------- | :---------------- |
| `daily_project_usage` | 일별 사용량 데이터의 배열    |
| `date`                | YYYY-MM-DD 형식의 날짜 |
| `app_id`              | 사용 중인 App의 ID     |
| `tweets_consumed`     | 해당 일자에 소모된 포스트 수  |
| `project_cap`         | 월간 포스트 사용 한도      |

***

<div id="example-request">
  ## 요청 예시
</div>

```bash theme={null}
curl "https://api.x.com/2/usage/tweets" \
  -H "Authorization: Bearer $BEARER_TOKEN"
```

***

<div id="use-cases">
  ## 사용 사례
</div>

* **비용 모니터링** — 요금제 한도 대비 사용량 추적
* **알림 설정** — 한도에 가까워질 때 알림 설정
* **최적화** — 사용량이 많은 엔드포인트 파악
* **보고** — 사용량 보고서 생성

<Tip>
  리소스는 24시간(UTC 기준) 기간 내에서 중복 제거되므로, 같은 리소스를 하루에 여러 번 요청해도 하루에 한 번만 과금됩니다. [요금에 대해 더 알아보기 →](/ko/x-api/getting-started/pricing)
</Tip>

***

<div id="getting-started">
  ## 시작하기
</div>

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

  * 승인된 [개발자 계정](https://developer.x.com/en/portal/petition/essential/basic-info)
  * 개발자 콘솔의 [프로젝트 및 App](/ko/resources/fundamentals/developer-apps)
  * App의 [Bearer 토큰](/ko/resources/fundamentals/authentication)
</Note>

<CardGroup cols={2}>
  <Card title="API 참조 문서" icon="code" href="/ko/x-api/usage/post-usage">
    전체 엔드포인트에 대한 문서
  </Card>

  <Card title="개발자 콘솔" icon="gauge" href="https://developer.x.com/en/portal/dashboard">
    대시보드에서 사용량 보기
  </Card>
</CardGroup>
