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

# 사용량

> Usage 엔드포인트로 소비된 Post 수를 포함하여 API 사용량을 모니터링할 수 있습니다. usage를 다루는 X API v2 표준 계층에 대한 참고 자료입니다.

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

Usage 엔드포인트로 소비된 Post 수를 포함하여 API 사용량을 모니터링할 수 있습니다. 비용을 관리하고 한도 내에서 유지하기 위해 프로그래밍 방식으로 사용량을 추적하세요.

<Note>
  Pay-per-usage 플랜은 월 2백만 Post 읽기의 월간 상한이 적용됩니다. 더 많은 볼륨이 필요한 경우 [Enterprise 플랜](/forms/enterprise-api-interest)을 고려하세요.
</Note>

## 개요

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

  <Card title="일일 세부 정보" icon="calendar-days">
    일별 사용량 보기
  </Card>

  <Card title="App 수준" icon="gauge">
    App 전반의 사용량 모니터링
  </Card>
</CardGroup>

***

## 엔드포인트

| Method | Endpoint                                    | 설명                |
| :----- | :------------------------------------------ | :---------------- |
| GET    | [`/2/usage/tweets`](/x-api/usage/get-usage) | Post 사용량 데이터 가져오기 |

***

## 응답 데이터

응답에는 일일 Post 소비 수가 포함됩니다:

```json title="예시 응답" lines wrap icon="https://mintcdn.com/x-preview/Vn2KEkZaPF9LiPi3/icons/xds/icon-brackets.svg?fit=max&auto=format&n=Vn2KEkZaPF9LiPi3&q=85&s=ed2428e77bab43e57800e1a590e982fa" theme={null}
{
  "data": {
    "daily_project_usage": [
      {
        "date": "2024-01-15",
        "usage": [
          {
            "app_id": "12345678",
            "tweets_consumed": 15420
          }
        ]
      }
    ],
    "project_id": "1234567890",
    "project_cap": 10000000
  }
}
```

### 필드

| 필드                    | 설명               |
| :-------------------- | :--------------- |
| `daily_project_usage` | 일일 사용량 데이터 배열    |
| `date`                | YYYY-MM-DD 형식 날짜 |
| `app_id`              | App의 ID          |
| `tweets_consumed`     | 해당 일 소비된 Post    |
| `project_cap`         | 월별 Post 한도       |

***

## 예제 요청

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

***

## 사용 사례

* **비용 모니터링** — 예산 대비 소비량 추적
* **알림** — 한도에 근접했을 때 알림 설정
* **최적화** — 소비가 높은 엔드포인트 식별
* **보고** — 사용량 보고서 생성

<Tip>
  리소스는 24시간 UTC 기간 내에서 중복 제거되므로, 하루에 동일한 리소스를 여러 번 요청해도 단일 청구로 계산됩니다. [가격 정책에 대해 자세히 알아보기 →](/x-api/getting-started/pricing)
</Tip>

***

## 시작하기

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

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

<CardGroup cols={2}>
  <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/usage/post-usage" width="24" height="24" data-path="icons/xds/icon-code.svg">
    전체 엔드포인트 문서
  </Card>

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