# Iapps Courts State — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Search New York State court cases by docket ID to retrieve case details and view all associated documents filed in NYSCEF. Get instant access to case information and document lists without navigating the court system directly.

**Category:** Government & Public Data | **Website:** [iapps.courts.state.ny.us/nyscef/HomePage](https://iapps.courts.state.ny.us/nyscef/HomePage) | **Docs:** [parse.bot/marketplace/86a166b7-f261-4e3f-b918-528655592294/iapps-courts-state-ny-us-api](https://parse.bot/marketplace/86a166b7-f261-4e3f-b918-528655592294/iapps-courts-state-ny-us-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-iapps-courts-state-ny-us-api-86a166b7/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_case_details

Get detailed case information including full caption, case type, status, and all parties (plaintiffs/petitioners and defendants/respondents) with their attorney representation. Use the same docket_id as get_case_documents.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `docket_id` | string | Yes | The NYSCEF docket identifier for the case, a Base64-encoded string (e.g. 'xhwNitK4b0a7bpiT40gnwg=='). Found in NYSCEF case URLs as the docketId parameter. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-iapps-courts-state-ny-us-api-86a166b7/get_case_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"docket_id":"<string>"}'
```

### get_case_documents

Get the list of documents filed in a NYSCEF case. Returns case metadata (caption, type, status) and all documents with their filing information including document name, filer, dates, and processing status. Paginated when the case has many filings. Each document carries a doc_index identifier referencing the specific filing.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `court_type` | string | No | The court name (e.g. 'Livingston County Supreme Court', 'Nassau County Supreme Court'). Optional but may improve result accuracy. |
| `docket_id` | string | Yes | The NYSCEF docket identifier for the case, a Base64-encoded string (e.g. 'xhwNitK4b0a7bpiT40gnwg=='). Found in NYSCEF case URLs as the docketId parameter. |
| `page` | integer | No | Page number for paginated document lists. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-iapps-courts-state-ny-us-api-86a166b7/get_case_documents \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"court_type":"<string>","docket_id":"<string>","page":"<integer>"}'
```
