---
title: "Get Daily Credit Usage"
method: GET
path: "/v0/teams/credits_consumption"
tags: ["Credit Consumption"]
---

# Get Daily Credit Usage

`GET /v0/teams/credits_consumption`

## Request

- Base URL: `https://api.theirstack.com`
- URL: `https://api.theirstack.com/v0/teams/credits_consumption`
- Auth: HTTP bearer

Retrieve daily API and UI credit consumption for your team, by charge date. Set group_by=search_pattern to group each day's credits by search patterns with the same stable filters. Charges without a search pattern appear as Other usage. Filter by types, exact endpoint path, origin, API key or search_pattern_key. Each group includes observed endpoints and origins. Choose exactly one group_by dimension: search_pattern, endpoint or origin. Omit it for daily totals. endpoints and origins are independent multiselect filters (OR within each, AND between them). Unfiltered grouped totals include all credits.

## Query parameters

- `start_datetime` string, date-time, nullable: Start datetime in ISO format (e.g., 2023-01-01T00:00:00)
- `end_datetime` string, date-time, nullable: End datetime in ISO format (e.g., 2023-01-01T23:59:59)
- `group_by` 'search_pattern' | 'endpoint' | 'origin', nullable
- `search_pattern_key` string, nullable: Only charges associated with this canonical search pattern.
- `is_origin_app` boolean, nullable
- `origin` 'api' | 'app' | 'web' | 'mcp' | 'admin_mcp'
- `api_key_id` string, uuid, nullable
- `types` RequestType[], nullable: Filter by search type.
- `endpoints` string[], nullable: Match any exact request URL path; unassigned selects charges without a recorded endpoint. Intersects the singular endpoint filter.
- `status_codes` integer[], nullable: Match any HTTP response status code.
- `origins` UsageOrigin[], nullable: Match any recorded origin; webhook requires a linked webhook event and unassigned selects missing attribution. Intersects the singular origin filter.
  - union
    - 'api' | 'app' | 'web' | 'mcp' | 'admin_mcp'
    - 'unassigned' | 'webhook'
- `endpoint` string, nullable: Exact request URL path, e.g. /v1/jobs/search; host and query string are ignored.
- `timezone` string: IANA timezone, such as Europe/Madrid.

## Response `200`

Successful Response

- CreditsConsumption[]
  - `group_key` string, nullable: Key of the selected grouping dimension: search pattern hash, endpoint path or origin.
  - `group_name` string, nullable: Display name for the selected grouping dimension.
  - `search_pattern_filters` object, nullable: Canonical identity filters when grouped by search pattern.
  - `endpoints` string[]: Distinct request URL paths without host/query; unassigned marks missing paths.
  - `origins` string[]: Recorded request origins, webhook only when a webhook event is linked, or unassigned when attribution is missing.
  - `period_start` string, date-time, required: Start of the period.
  - `api_credits_consumed` integer, required: Number of API credits consumed.
  - `ui_credits_consumed` integer, required: Number of UI credits consumed.
  - `search_type` 'jobs' | 'companies' | 'technologies', nullable: Search type when grouped by search pattern; null for other usage.
  - `search_pattern_key` string, nullable: Stable search pattern key when grouped by search pattern.
  - `search_pattern_name` string, nullable: Search summary naming this search pattern.

## Other responses

- `400`: Bad Request
- `402`: Payment Required
- `422`: Unprocessable Content
- `500`: Internal Server Error

## Changes

- **2026-09-11** `16937613a4ec`: 1 breaking, 4 warning, 5 info
  - removed the enum value `campaign` from the property `anyOf[subschema #1]/` of the `query` request parameter `group_by`
  - deleted the `query` request parameter `campaign_key`
  - removed the optional property `items/campaign_filters` from the response with the `200` status
  - removed the optional property `items/campaign_key` from the response with the `200` status
  - …6 more
- **2026-09-10** `6862391ec53d`: 18 info
  - added the new optional `query` request parameter `api_key_id`
  - added the new optional `query` request parameter `campaign_key`
  - added the new optional `query` request parameter `endpoint`
  - added the new optional `query` request parameter `endpoints`
  - …14 more
- **2026-01-14** `ecd1eb029865`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/theirstack/apis/theirstack-api-reference/changes/v0/teams/credits_consumption/get.md)

---

[API](https://skmtc.dev/theirstack/apis/theirstack-api-reference.md) - [All operations](https://skmtc.dev/theirstack/apis/theirstack-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/theirstack/apis/theirstack-api-reference/revisions/4f3da5ce4026?raw)
