# Get credits

> The credit balance

`GET https://api.signalvan.com/v1/credits`

**Available at any step: the credit balance.**

Needs `leads:read` · Uses no credits · 300 a minute · Web page: https://www.signalvan.com/developers/reference/get-credits

The account's credit balance, the same one the app shows. `available` is what a new lead search
can use: the balance less the credits held by work still running. `low` is true under 100 available credits.

**Credits:** none. Credits are added in the SignalVan app (Account, Billing).

## Headers

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Authorization` | `string` | Yes | Bearer and your API key. Keys are made in SignalVan: Account, API keys. Example: `Bearer sv_live_...`. |

## Response · 200 (application/json)

- `credits` (Credits, required): The credit balance
  - `available` (integer): Credits a new lead search can use now: the balance less the credits held by work still running
  - `balance` (integer): Credits on the account
  - `held` (integer): Credits set aside for work still running
  - `low` (boolean): true when fewer than 100 credits are available

## Responses

- `200`: The credit balance
- `400` `invalid`: A field is not valid (the detail names it)
- `401` `unauthorized`: No API key, or the key is not valid
- `403` `scope_missing`: The key lacks the permission (scope_missing)
- `404` `not_found`: Not found, or not yours
- `429` `rate_limited`: Too many requests: wait Retry-After seconds
- `503` `unavailable`: Temporarily unavailable: retry with backoff

## Request

Every request below is complete and runs as copied (set SIGNALVAN_API_KEY first). website_id is needed when your key opens several websites; it takes the website's id or its domain.

### Request

cURL:

```bash
curl "https://api.signalvan.com/v1/credits" \
  -H "Authorization: Bearer $SIGNALVAN_API_KEY"
```

Python:

```python
import os, requests

r = requests.get(
    "https://api.signalvan.com/v1/credits",
    headers={"Authorization": f"Bearer {os.environ['SIGNALVAN_API_KEY']}"},
    timeout=70,
)
r.raise_for_status()
print(r.json())
```

Node.js:

```javascript
const r = await fetch("https://api.signalvan.com/v1/credits", {
  headers: {
    Authorization: `Bearer ${process.env.SIGNALVAN_API_KEY}`,
  },
})
if (!r.ok) throw new Error((await r.json()).detail)
console.log(await r.json())
```

## Response example · 200

```json
{
  "credits": {
    "available": 2350,
    "balance": 2500,
    "held": 150,
    "low": false
  }
}
```
