LLegiScoreSearch API
Get an API key
Get started
IntroductionAuthenticationQuickstartSearch lifecycleErrorsWebhooksCreditsGet an API key
API reference
Credit balancegetCataloggetLookupsgetSearchespost
States
All states
View as Markdownllms-full.txt

API reference

Credit balance

Read your search wallet: balance, what you can spend and the recent ledger.

GET/api/v1/search/credits
ParameterDescription
limitLedger 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());
200 response
{
  "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

FieldMeaning
scopeorganization for a workspace key, personal otherwise.
balanceCredits in the wallet.
spendableWhat you can spend now, including any postpaid headroom.
postpaidWhether 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.

PreviousGet an API keyNextCatalog