# Court Records (US only)

#### API Authentication

Before using the PEP trace API, you must authenticate by logging in and obtaining an access token. Include this token in the `Authorization` header of your request.

### Court Records

he Court Records API enables a comprehensive nationwide search across hundreds of millions of United States court cases, lawsuits, and patents. This endpoint provides unparalleled coverage, including **100x more cases than Google Scholar** and **10x more than PACER**, the federal judiciary’s official system.

#### Comprehensive Court and Patent Search

* **Court Records**: Access federal, state, and county-level civil and criminal cases.
* **U.S. Patents**: Full-text search of **8.1 million patents** filed between 1/1/1976 and 07/01/2022.
* **Extended Results**: Retrieve up to **500,000 results** per query instead of the standard 2,000.

#### Common Case Volumes

Example keyword searches return vast volumes, such as:

* **Murder**: 926K cases
* **Fraud**: 2.1 million cases
* **Burglary**: 3.7 million cases
* **Assault**: 8.2 million cases

#### Required Parameters

Include these parameters in your JSON request:

| Parameter   | Data Type | Required | Description                                                                                |
| ----------- | --------- | -------- | ------------------------------------------------------------------------------------------ |
| `key`       | string    | Yes      | Your API key.                                                                              |
| `lookupId`  | integer   | Yes      | Subscription-specific identifier. Retrieve valid IDs via `/request-monitor/lookupid-list`. |
| `keyphrase` | string    | Yes      | Search term (e.g., name, patent keyword, or case type).                                    |

#### Example Request

To execute the SSN trace method using cURL, use the sample request below. Replace the placeholder values as needed:

```bash
curl -X 'POST' \
  'https://irbis.espysys.com/api/developer/compliance_screening/court_records' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
    "key": "<Your_API_Key>",
    "lookupId": <Your_Lookup_ID>,
    "keyphrase": "Donald Trump"
  }'
```

#### Understanding the Response

After submitting a request, you’ll receive a response with a unique `id` to track progress:

```
{
  "id": 509123,
  "status": "progress",
  "message": "Results will be available soon. Use API to retrieve data."
}
```

## Request Response Data

<https://irbis.espysys.com/api/request-monitor/api-usage/{id}?key={API> key}

Request to get a lookup data of a request with an id.

"id" parameter has to be passed in the path of a request - ID of a request to get lookup data for.

#### Example Path Variables

* **id**: The unique identifier for the request you wish to look up.
* **API key**: Your specific API key for authentication purposes.

#### CURL Example

```bash
curl -X 'GET' \
'https://irbis.espysys.com/api/request-monitor/api-usage/<id>?key=<API_Key>' \
-H 'accept: application/json'
```

Replace `<id>` with the request ID you are querying and `<API_Key>` with your actual API key.

#### Notes

* **Lookup IDs**: Your subscription plan determines available `lookupId` values. Use the `/request-monitor/lookupid-list` endpoint to list valid IDs.
* **Rate Limits**: Large result sets may take time to process. Poll the `api-usage` endpoint periodically.

## Search Response Schema

```json
{
  "criteria": "string",
  "type": "court_records",
  "status": "finished",
  "sources": [
    {
      "name": "court_records"
    }
  ],
  "data": [
    {
      "case_style": {
        "plaintiff": {
          "first_name": "string",
          "middle_name": "string | null",
          "last_name": "string",
          "suffix": "string | null",
          "party_type": "string",
          "party_association": "string | null"
        },
        "defendants": [
          {
            "first_name": "string | null",
            "last_name": "string",
            "suffix": "string | null",
            "party_type": "string",
            "party_association": "string | null"
          }
        ]
      },
      "filing_date": "YYYY-MM-DD",
      "division_name": "string",
      "case_status": "string",
      "docket": [
        {
          "docket_number": "integer",
          "effective_date": "YYYY-MM-DD",
          "description": "string",
          "notes": "string [Sanitized]"
        }
      ],
      "type": "dict"
    },
    {
      "case_summary": {
        "case_no": "string",
        "style": "string [Redacted Names]",
        "case_type": "string",
        "date_filed": "YYYY-MM-DD",
        "location": "string",
        "party_information": {
          "petitioner": {
            "name": "string [Redacted]",
            "attorney": "string",
            "address": {
              "street": "string [Generic Placeholder]",
              "city": "string",
              "state": "ST",
              "zip_code": "XXXXX"
            }
          },
          "respondents": [
            {
              "name": "string [Redacted]",
              "address": {
                "street": "string [Generic Placeholder]",
                "city": "string",
                "state": "ST",
                "zip_code": "XXXXX"
              }
            }
          ]
        },
        "events_and_orders": [
          {
            "date": "YYYY-MM-DD",
            "event": "string",
            "filed_by": "string [Redacted]",
            "file_stamp": "YYYY-MM-DD"
          }
        ]
      },
      "type": "dict"
    },
    {
      "case_information": {
        "case_number": "string",
        "plaintiff": {
          "name": "string [Redacted]",
          "attorney": "string",
          "disposition": "string"
        },
        "defendant": {
          "name": "string [Redacted]",
          "attorney": "string",
          "disposition": "string"
        },
        "case_type": "string",
        "case_status": "string",
        "file_date": "YYYY-MM-DD"
      },
      "financial_information": {
        "total_financial_assessment": "number",
        "transactions": [
          {
            "date": "YYYY-MM-DD",
            "receipt_number": "RECEIPT-XXXX",
            "amount": "number"
          }
        ]
      },
      "type": "dict"
    }
  ]
}
```
