> ## 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 请求数与积分消耗，返回数据包含每日汇总时间序列以及按端点拆分的堆叠序列，便于绘制使用情况图表。



## OpenAPI

````yaml cn-openapi POST /api_keys/usage/daily
openapi: 3.0.0
info:
  description: Pubrio API 用于搜索、预览和增强联系人及账户信息。Pubrio 数据库提供丰富的 B2B 联系人和销售情报数据。
  version: 1.0.0
  title: Pubrio OpenAPI
  termsOfService: https://pubrio.com/zh-CN/terms-of-service
  contact:
    email: king.lai@pubrio.com
    name: King Lai
    url: https://pubrio.com/zh-CN/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/daily:
    post:
      tags:
        - API Keys
      summary: 获取每日 API 使用情况
      description: 按日期范围获取当前工作区每日的 API 请求数与积分消耗，返回数据包含每日汇总时间序列以及按端点拆分的堆叠序列，便于绘制使用情况图表。
      operationId: api_keys_get_usage_daily
      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: >-
                    可选。按日志类型 slug（如
                    `people_search`、`company_search`、`people_redeem`）筛选结果，将范围限定为指定的端点。
      responses:
        '200':
          description: 成功响应，返回每日使用量时间序列。
          content:
            application/json:
              schema:
                type: object
                properties:
                  metadata:
                    type: object
                    properties:
                      filters:
                        type: object
                        description: 本次响应所使用请求过滤条件的回显，已剔除空值。
                        additionalProperties: true
                  data:
                    type: object
                    properties:
                      series:
                        type: array
                        description: 所有端点的每日汇总，按日期升序排列。
                        items:
                          type: object
                          properties:
                            date:
                              type: string
                              description: 日期，格式为 `YYYY-MM-DD`。
                            credits:
                              type: number
                              description: 当天消耗的积分。
                            requests:
                              type: integer
                              description: 当天的 API 请求数。
                      by_log_type:
                        type: array
                        description: 按端点拆分的堆叠序列，按积分及请求数降序排列。
                        items:
                          type: object
                          properties:
                            slug:
                              type: string
                              description: 日志类型 slug。`__unknown__` 表示未对应到计费日志类型的请求。
                            name:
                              type: string
                              description: 可读的日志类型名称。
                            totals:
                              type: object
                              properties:
                                credits:
                                  type: number
                                requests:
                                  type: integer
                            series:
                              type: array
                              items:
                                type: object
                                properties:
                                  date:
                                    type: string
                                  credits:
                                    type: number
                                  requests:
                                    type: integer
                      totals:
                        type: object
                        properties:
                          credits:
                            type: number
                          requests:
                            type: integer
              example:
                metadata:
                  filters:
                    start_date: '2026-05-01'
                    end_date: '2026-05-14'
                data:
                  series:
                    - date: '2026-05-01'
                      credits: 26352
                      requests: 2827
                    - date: '2026-05-05'
                      credits: 798
                      requests: 402
                    - date: '2026-05-11'
                      credits: 187
                      requests: 187
                  by_log_type:
                    - slug: people_redeem
                      name: Redeem People
                      totals:
                        credits: 40835
                        requests: 4083
                      series:
                        - date: '2026-05-01'
                          credits: 26140
                          requests: 2614
                        - date: '2026-05-11'
                          credits: 185
                          requests: 15
                    - slug: people_search
                      name: People Search
                      totals:
                        credits: 633
                        requests: 212
                      series:
                        - date: '2026-05-05'
                          credits: 594
                          requests: 199
                  totals:
                    credits: 41892
                    requests: 4896
        '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 密钥已包含您的工作区信息，此参数不再是必填项。如果提供，该 ID
        有助于将查找与特定团队（工作区）关联，实现数据检索和额度追踪。


        更多信息请参见团队标签下的 `user details` 端点。
  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: 服务器在处理请求时遇到了未预料的异常。
                type: string
  securitySchemes:
    pubrio_api_key:
      type: apiKey
      name: pubrio-api-key
      description: >-
        一个唯一的 API 令牌，用于标识您通过 API 执行的操作以及相应的权限和操作。您可以在
        [设置](https://dashboard.pubrio.com/#/settings/) 部分创建该令牌。
      in: header

````