API reference
Credit balance
Read your search wallet: balance, what you can spend and the recent ledger.
GET/api/v1/search/credits
| Parameter | Description |
|---|---|
limit | Ledger rows to return. Default 20, at most 100. |
curl "https://legiscore.in/api/v1/search/credits?limit=20" \
-H "Authorization: Bearer lsk_your_api_key"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())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());{
"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" }
]
}
}Response fields
| Field | Meaning |
|---|---|
scope | organization for a workspace key, personal otherwise. |
balance | Credits in the wallet. |
spendable | What you can spend now, including any postpaid headroom. |
postpaid | Whether the workspace is billed after the fact, and its limit. |
ledger[] | Newest first. type is charge, refund, topup or adjust. |
This is the search wallet. It is separate from report credits and only pays for searches made through this API.