Use this endpoint to retrieve your team’s current billing period credit usage. The API identifies your team from the API key, fetches the meter usage for the active billing period, and returns the number of credits already consumed.
How API calls are counted
Not every request consumes credits. Use this to plan your usage against your monthly quota (1,000,000 credits per month on the Premium plan).
| Operation | Counts against quota? | Notes |
|---|
| Search calls (profiles, companies) | No | Search requests are free, regardless of how many IDs are returned. |
| Fetch profile / fetch company | Yes | Each profile or company returned counts as 1 credit. |
| Bulk fetch | Yes | A single bulk fetch of up to 1000 IDs counts as up to 1000 credits (1 per returned item). |
| Network Mapper | Yes | See the endpoint documentation for credit behavior. |
A common pattern is to issue one search call to discover IDs, then a fetch call for those IDs. Only the fetch step consumes credits.
Endpoint
To use it, send a GET request to:
GET https://bee.theswarm.com/credits/usage/
Authentication
Pass your API key in the x-api-key header.
| Header | Value | Description |
|---|
| x-api-key | “ | Your team’s API key. |
Query parameters
None.
Response
A successful request returns 200 OK with the following body:
| Field | Type | Description |
|---|
| usage | integer | Number of credits already consumed in the current billing period |
Errors
If authentication fails or usage cannot be retrieved, the endpoint returns the corresponding error status. See Errors for details.\
Example request
bash cURL curl -X GET "https://bee.theswarm.com/credits/usage/" \ -H "x-api-key: <your_api_key>"