> ## Documentation Index
> Fetch the complete documentation index at: https://firecrawl-fix-js-response-syntax-highlighting.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 历史积分用量

按月返回历史积分用量。该端点还可选按 API key 分解用量。

> 你是需要 Firecrawl API 密钥的 AI 代理吗？请参见 [firecrawl.dev/agent-onboarding/SKILL.md](https://www.firecrawl.dev/agent-onboarding/SKILL.md) 获取自动化引导说明。


## OpenAPI

````yaml /zh/api-reference/v2-openapi.json GET /team/credit-usage/historical
openapi: 3.0.0
info:
  contact:
    email: support@firecrawl.dev
    name: Firecrawl Support
    url: https://firecrawl.dev/support
  description: 用于与 Firecrawl 服务交互，执行网页抓取和爬取任务的 API。
  title: Firecrawl API
  version: v2
servers:
  - url: https://api.firecrawl.dev/v2
security:
  - bearerAuth: []
paths:
  /team/credit-usage/historical:
    get:
      tags:
        - Billing
      summary: 获取已认证团队的历史额度使用记录
      operationId: getHistoricalCreditUsage
      parameters:
        - description: 按 API 密钥查询历史额度用量
          in: query
          name: byApiKey
          required: false
          schema:
            default: false
            type: boolean
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  periods:
                    items:
                      properties:
                        apiKey:
                          description: 该计费周期中使用的 API 密钥名称。若 byApiKey 为 false（默认），则为 null
                          nullable: true
                          type: string
                        endDate:
                          description: 计费周期结束日期
                          example: '2025-01-31T23:59:59Z'
                          format: date-time
                          type: string
                        startDate:
                          description: 计费周期开始日期
                          example: '2025-01-01T00:00:00Z'
                          format: date-time
                          type: string
                        totalCredits:
                          description: 账单周期内使用的积分总数
                          example: 1000
                          type: integer
                      type: object
                    type: array
                  success:
                    example: true
                    type: boolean
                type: object
          description: 成功的响应
        '500':
          content:
            application/json:
              schema:
                properties:
                  error:
                    example: >-
                      Internal server error while fetching historical credit
                      usage
                    type: string
                  success:
                    example: false
                    type: boolean
                type: object
          description: 服务器错误
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````