Source: https://legiscore.in/docs/api/credits

# Credit balance

`GET /api/v1/search/credits?limit=20` (limit at most 100). Reads your search wallet.

**curl**

```bash
curl "https://legiscore.in/api/v1/search/credits?limit=20" \
  -H "Authorization: Bearer lsk_your_api_key"
```

**Python**

```python
import requests

resp = requests.get(
    "https://legiscore.in/api/v1/search/credits?limit=20",
    headers={"Authorization": "Bearer lsk_your_api_key"},
)
resp.raise_for_status()
print(resp.json())
```

**Node**

```js
const resp = await fetch("https://legiscore.in/api/v1/search/credits?limit=20", {
  method: "GET",
  headers: { Authorization: "Bearer lsk_your_api_key" },
});
if (!resp.ok) throw new Error(await resp.text());
console.log(await resp.json());
```

```json
{
  "data": {
    "scope": "organization",
    "balance": 1180,
    "spendable": 1180,
    "postpaid": {
      "enabled": false,
      "limit": 0
    },
    "ledger": [
      {
        "type": "charge",
        "balance_after": 1180,
        "cost_key": "search.andhra.rera",
        "note": null,
        "at": "2026-10-05T10:00:00Z"
      }
    ]
  }
}
```

| Field | Meaning |
| --- | --- |
| scope | organization for a workspace key, personal otherwise. |
| balance | Credits in the wallet. |
| spendable | What you can spend now, including postpaid headroom. |
| postpaid | Whether the workspace is billed after the fact, and its limit. |
| ledger[] | Newest first. type is charge, refund, topup or adjust. |
