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

# Searches

## Submit

`POST /api/v1/search`

| Body field | Type | Required | Description |
| --- | --- | --- | --- |
| state | string | Yes | State key, for example telangana. |
| search_type | string | Yes | Search key, for example ec. |
| params | object | Yes | The search parameters. Each search page lists them. |
| label | string | No | Your own reference. |
| callback_url | string | No | HTTPS URL to receive the result. |
| searches | array | Batch | Up to 25 items of the same shape. |

Header Idempotency-Key (optional): a retry within 24 hours is free and returns the original. Returns 202 with data.searches[] and data.rejected[]; 200 when every item was an idempotent replay; 400 when nothing was accepted.

## Get / list / cancel / documents

- `GET /api/v1/search/{id}`: the search object (id like SRCH-2026-A1B2C3D4).
- `GET /api/v1/search?limit=50&offset=0&status=&batch_id=`: newest first, limit at most 200.
- `DELETE /api/v1/search/{id}`: cancel; 409 already_finished once done.
- `GET /api/v1/search/{id}/documents/{filename}`: 302 to a one-hour signed URL; 410 withheld on a failed integrity check.
- `POST /api/v1/search/{id}/otp` { "otp": "123456" }: only for a search awaiting an OTP sent to your own mobile.
- `POST /api/v1/search/{id}/recover`: AI Recovery; returns a new search with recovery_of set.
- `POST /api/v1/search/assist`: AI Assist; multipart state plus file (PDF or image, up to 20 MB) or text; proposes parameters, never submits.

See also: https://legiscore.in/docs/api/credits, https://legiscore.in/docs/api/catalog, https://legiscore.in/docs/api/lookups.
