> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pubrio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# API使用状況内訳

> 指定した期間内のAPIリクエスト数とクレジット消費量を、APIキー単位（`by_key`）とエンドポイント単位（`by_endpoint`）に分けて取得します。トラフィックの多いキーやクレジット消費量の大きいエンドポイントを把握するのに役立ちます。



## OpenAPI

````yaml jp-openapi POST /api_keys/usage/breakdown
openapi: 3.0.0
info:
  description: >-
    Pubrio API は、コンタクトおよびアカウント情報の検索・プレビュー・エンリッチメントに利用できます。Pubrio データベースは、豊富な B2B
    連絡先データとセールスインテリジェンスを提供します。
  version: 1.0.0
  title: Pubrio OpenAPI
  termsOfService: https://pubrio.com/ja/terms-of-service
  contact:
    email: king.lai@pubrio.com
    name: King Lai
    url: https://pubrio.com/ja/get-in-touch
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://api.pubrio.com
security:
  - pubrio_api_key: []
tags:
  - name: Profile
    description: ワークスペースプロフィール情報と使用統計
  - name: Enrichment
    description: 詳細なB2Bデータで人物・企業レコードをエンリッチメント
  - name: Lookalike
    description: 指定した企業に類似する企業を検索
  - name: Search
    description: フィルターを使用して人物、企業、求人、ニュース、広告を検索
  - name: Lookup
    description: 特定の人物、企業、求人、ニュース、広告、テクノロジーの詳細情報を検索
  - name: LinkedIn
    description: LinkedInプロフィールURLから人物・企業データを検索
  - name: Redeem
    description: クレジットを消費して人物の連絡先情報をアンロック（単件・バッチ）
  - name: Channels
    description: アウトリーチチャネルテンプレートの管理（作成・更新・削除・一覧）
  - name: Monitor
    description: Webhook、統計、処理を含むデータモニターの作成と管理
  - name: Filters
    description: 検索パラメータで使用可能なフィルター値を取得（テクノロジー、地域、バーティカルなど）
  - name: API Keys
    description: APIキーのリクエストログと使用状況分析を表示
externalDocs:
  description: >-
    Pubrio API は、コンタクトおよびアカウント情報の検索・プレビュー・エンリッチメントに利用できます。Pubrio データベースは、豊富な B2B
    連絡先データとセールスインテリジェンスを提供します。
  url: https://docs.pubrio.com
paths:
  /api_keys/usage/breakdown:
    post:
      tags:
        - API Keys
      summary: APIキー別・エンドポイント別の使用状況内訳
      description: >-
        指定した期間内のAPIリクエスト数とクレジット消費量を、APIキー単位（`by_key`）とエンドポイント単位（`by_endpoint`）に分けて取得します。トラフィックの多いキーやクレジット消費量の大きいエンドポイントを把握するのに役立ちます。
      operationId: api_keys_get_usage_breakdown
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - start_date
                - end_date
              properties:
                profile_id:
                  $ref: '#/components/schemas/profile_id'
                start_date:
                  type: string
                  example: '2026-05-01'
                  description: 期間の開始日（`YYYY-MM-DD` 形式、ワークスペースのタイムゾーンで解釈されます）。
                end_date:
                  type: string
                  example: '2026-05-14'
                  description: 期間の終了日(`YYYY-MM-DD` 形式、ワークスペースのタイムゾーンで解釈されます)。
                keys:
                  type: array
                  items:
                    type: string
                  description: >-
                    省略可。マスク済みAPIキー識別子（例:
                    `0••••••••••••••••f39`）で結果を絞り込みます。`/api_keys` のレスポンスやログエントリの
                    `masked_authentication` フィールドの値を指定できます。
                log_type_slugs:
                  type: array
                  items:
                    type: string
                  description: >-
                    省略可。ログタイプスラッグ（例:
                    `people_search`、`company_search`、`people_redeem`）で結果を絞り込み、特定エンドポイントに限定します。
      responses:
        '200':
          description: API使用状況の内訳を返す成功レスポンス。
          content:
            application/json:
              schema:
                type: object
                properties:
                  metadata:
                    type: object
                    properties:
                      filters:
                        type: object
                        description: 本レスポンスの生成に使用したリクエストフィルターのエコー（空値は除外）。
                        additionalProperties: true
                  data:
                    type: object
                    properties:
                      by_key:
                        type: array
                        description: APIキー単位の使用状況（上位100件、クレジット・リクエスト数の順で降順）。
                        items:
                          type: object
                          properties:
                            name:
                              type: string
                              description: マスク済みAPIキー識別子。
                            requests:
                              type: integer
                              description: このキーで実行されたリクエスト数。
                            credits:
                              type: number
                              description: このキーで消費されたクレジット。
                            last_used:
                              type: string
                              nullable: true
                              description: このキーの最終リクエスト時刻。期間内に未使用の場合は `null`。
                            percent_of_requests:
                              type: number
                              description: 総リクエストに占める割合（パーセント）。
                            percent_of_credits:
                              type: number
                              description: 総クレジットに占める割合（パーセント）。
                      by_endpoint:
                        type: array
                        description: エンドポイント単位の使用状況（上位100件、クレジット・リクエスト数の順で降順）。
                        items:
                          type: object
                          properties:
                            slug:
                              type: string
                              nullable: true
                              description: ログタイプスラッグ。請求対象のログタイプに紐付かないリクエストは `null`。
                            name:
                              type: string
                              description: 人間が読めるログタイプ名。
                            requests:
                              type: integer
                            credits:
                              type: number
                            cost_per_call:
                              type: number
                              description: このエンドポイントの1リクエストあたり平均クレジット。
                            percent_of_requests:
                              type: number
                              description: 総リクエストに占める割合（パーセント）。
                            percent_of_credits:
                              type: number
                              description: 総クレジットに占める割合（パーセント）。
                      totals:
                        type: object
                        properties:
                          credits:
                            type: number
                          requests:
                            type: integer
              example:
                metadata:
                  filters:
                    start_date: '2026-04-01'
                    end_date: '2026-05-14'
                data:
                  by_key:
                    - name: 2••••••••••••••••a37
                      requests: 929
                      credits: 42766
                      last_used: '2026-05-05 11:09:42.508'
                      percent_of_requests: 17.892
                      percent_of_credits: 99.425
                    - name: 0••••••••••••••••f39
                      requests: 175
                      credits: 187
                      last_used: '2026-05-14 12:04:21.651'
                      percent_of_requests: 3.37
                      percent_of_credits: 0.434
                  by_endpoint:
                    - slug: people_redeem
                      name: Redeem People
                      requests: 4088
                      credits: 41215
                      cost_per_call: 10.08
                      percent_of_requests: 78.73
                      percent_of_credits: 95.82
                    - slug: people_search
                      name: People Search
                      requests: 368
                      credits: 1101
                      cost_per_call: 2.99
                      percent_of_requests: 7.08
                      percent_of_credits: 2.55
                  totals:
                    credits: 43013
                    requests: 5192
        '400':
          $ref: '#/components/responses/general_error'
        '429':
          $ref: '#/components/responses/rate_limit_error'
        '500':
          $ref: '#/components/responses/server_error'
components:
  schemas:
    profile_id:
      type: integer
      description: >-
        オプション。リクエストを送信するチームを表す識別子です。API
        キーにワークスペース情報が既に含まれているため、このパラメータは必須ではなくなりました。指定した場合、検索結果が特定のチーム（ワークスペース）に紐づけられ、データ取得およびクレジット利用状況の追跡が可能になります。詳しくは、チーム関連の「ユーザー詳細」エンドポイントを参照してください。
  responses:
    general_error:
      description: リクエストエラー。リクエストの形式が不正であるか、無効なパラメータが含まれています。エラーコードとメッセージを確認してください。
      content:
        application/json:
          schema:
            required:
              - code
              - message
              - details
            type: object
            properties:
              code:
                example: 40001
                type: integer
              message:
                example: エラーの背景やフィールド単位の情報などを含む追加データオブジェクトです。
                type: string
              details:
                type: object
    rate_limit_error:
      description: レート制限超過。一定期間内に多すぎるリクエストが送信されました。レート制限ウィンドウがリセットされた後に再試行してください。
      content:
        application/json:
          schema:
            required:
              - error
            type: object
            properties:
              error:
                example: クライアントはしばらく待ってから再試行することが推奨されます。
                type: string
    server_error:
      description: 内部サーバーエラー。サーバーで予期しないエラーが発生しました。エラーが続く場合はサポートにお問い合わせください。
      content:
        application/json:
          schema:
            required:
              - error
            type: object
            properties:
              error:
                example: レスポンスボディには `error` フィールドが含まれ、問題の概要がメッセージとして記載されます。
                type: string
  securitySchemes:
    pubrio_api_key:
      type: apiKey
      name: pubrio-api-key
      description: >-
        API で実行する操作内容と、その操作に付与された権限を識別するための一意の API トークンです。このトークンはダッシュボードの
        [設定](https://dashboard.pubrio.com/#/settings/) 画面から発行できます。
      in: header

````