openapi: 3.2.0 info: title: CharitySense Usage API version: 3.0.0 description: Canonical CharitySense API for nonprofit research compiled from the canonical research overlay. contact: name: CharitySense email: mazhar@charitysense.com url: https://data.charitysense.com/contact servers: - url: https://data.charitysense.com security: [] tags: - name: Usage description: Authenticated token allowance and UTC-day usage. paths: /api/v2/usage: get: tags: - Usage operationId: getApiUsage summary: Get the active API key's current UTC-day data and Advanced usage description: This endpoint never consumes the data allowance. It returns only the allowance associated with the supplied active key; it does not reveal usage for another key or principal. security: - BearerAuth: [] - ApiKeyAuth: [] responses: '200': description: The active key's limits, current usage, remaining requests, and reset time. content: application/json: schema: $ref: '#/components/schemas/UsageSummary' '401': $ref: '#/components/responses/ErrorResponse' '503': $ref: '#/components/responses/ErrorResponse' components: responses: ErrorResponse: description: Request error in detail, with a stable ErrorCode when available. content: application/json: schema: $ref: '#/components/schemas/Error' schemas: Error: type: object required: - detail properties: detail: oneOf: - type: string - type: object properties: ErrorCode: type: string Message: type: string additionalProperties: true - type: array description: FastAPI request-validation errors. items: type: object additionalProperties: true additionalProperties: false UsageAllowance: type: object required: - Limit - Used - Remaining properties: Limit: oneOf: - type: integer minimum: 0 - type: string const: Unlimited Used: type: integer minimum: 0 Remaining: oneOf: - type: integer minimum: 0 - type: string const: Unlimited additionalProperties: false UsageSummary: type: object required: - Day - ResetAt - Tier - Data - Ai properties: Day: type: string format: date description: Current UTC calendar day. ResetAt: type: string format: date-time description: Beginning of the next UTC calendar day. Tier: type: string enum: - Paid - Site - Internal Data: $ref: '#/components/schemas/UsageAllowance' Advanced: $ref: '#/components/schemas/UsageAllowance' additionalProperties: false securitySchemes: BearerAuth: type: http scheme: bearer ApiKeyAuth: type: apiKey in: header name: X-CharitySense-API-Key externalDocs: description: Agent integration guide and recommended workflow. url: https://data.charitysense.com/agents