CasePrimus.aiby Attestr
Documentation menu
GET/historical-search/{searchId}/results

Next page of a search

Returns the next 100 cases after `pageToken`.

Overview

Returns the next 100 cases after pageToken. Without a pageToken it returns the first page again, so a search's first page can be read at any time while the search is kept (7 days) - it is the same page the start call returned, with no new fetch and no new charge. Exactly 100, except the last page; a short or empty page is never returned while more exist. A case is never returned twice. Repeating a call with the same token returns the same page again with no new fetch and no new charge, so it is safe to retry.

The end is nextPageToken: null with status: COMPLETE. If the page cannot be assembled within 60 seconds the call returns 503 with Retry-After and nothing changes: retry with the same token. Another request already running on this search returns 409.

An asynchronous search can be read only once it is COMPLETE (409 before that); reading its pages is free. Expired searches (older than 7 days) return 410. Requires historicalSearch.read.

Auth API key
Send your API key in the X-CasePrimus-Api-Key header. See Authentication for how to create a key, and Rate limits & errors for how requests are counted.

Parameters

NameInDescription
searchId
string
Required
pathThe id returned when the resource was created.
pageToken
string
Optional
queryThe `nextPageToken` of the previous page. Leave it out to get the FIRST page again (the page the start call returned has no token of its own).

Example request

Replace CASEPRIMUS_API_KEY with your key.

Request
BASE="https://api.caseprimus.ai/api/caseprimus/v1"

curl "$BASE/historical-search/SEARCH_ID/results" \
  -H "X-CasePrimus-Api-Key: $CASEPRIMUS_API_KEY"

Responses

200The page.
FieldDescription
searchId
string
mode
enum

ASYNC: collected in the background (see POST /historical-search).

SYNCASYNC
status
enum

SYNC searches are ACTIVE, COMPLETE or EXPIRED. ASYNC searches are RUNNING, COMPLETE, FAILED or EXPIRED.

ACTIVECOMPLETEEXPIREDRUNNINGFAILED
name
string
partyType
enum
PETITIONERRESPONDENTBOTH
filters
object
clientReference
string or null
delivered
integer

Results delivered so far. For a COMPLETE asynchronous search: all of them (reading its pages is free and repeatable).

collected
integer

ASYNC only. Results stored so far; final once COMPLETE.

completedAt
integer or null

ASYNC only. Epoch ms the search finished (COMPLETE or FAILED); null while RUNNING.

failureReason
string

ASYNC only, present when FAILED: why, in words for a person. Nothing was charged.

warnings
array of object
code
enum
RESULT_CAP_REACHEDSOURCE_UNAVAILABLE
message
string
createdAt
integer

Epoch ms.

expiresAt
integer

Epoch ms. Results are deleted at this time.

pageSize
integer
results
array of object
caseRef
string

Stable id of the case: the same case has the same caseRef in every search.

caseIdentifier
object or null

What identifies the case for a live lookup. Null when it cannot be established without a live check.

identifierStatus
enum
CONFIRMEDNEEDS_CONFIRMATION
courtType
string

DC, HC, SC, CC, NCLT, NCLAT, CESTAT, DRT, DRAT, GSTAT, ITAT, APTEL, NGT, SAT or OTHER.

court
string or null
state
string or null
district
string or null
bench
string or null
caseType
string or null
caseTypeName
string or null
caseNature
string or null
caseNumber
string or null
cnrNumber
string or null

Null when the case has no customer-visible CNR.

filingNumber
string or null
registrationNumber
string or null
filingDate
string or null

YYYY-MM-DD.

filingYear
integer or null
registrationDate
string or null
caseStatus
string or null
nextHearingDate
string or null
decisionDate
string or null
natureOfDisposal
string or null
petitioner
string or null
respondent
string or null
partyRole
enum or null

The side the searched company is on.

PETITIONERRESPONDENTBOTH
matchedParty
string or null

The party that made this case match: the first party, on the side(s) searched, that carries the company's name or one of its variations, as the court wrote it (for example 'Acme Logistics Pvt. Ltd' when it is respondent 6 of 8). `petitioner` and `respondent` above are only the parties on the case's title line, so they may not include it.

petitioners
array of string

Every petitioner, each once, in the court's order (placeholder entries such as 'Respondent' are left out). At most 25 - see `partyCountTruncated`.

respondents
array of string

Every respondent, each once, in the court's order. At most 25 - see `partyCountTruncated`.

partyCountTruncated
boolean

True when either list was cut at 25. `matchedParty` is still named.

nextPageToken
string or null

Pass it to get the next page. Null when there is nothing more.

Response 200
{
  "searchId": "CPHS0exampledemo0001",
  "mode": "SYNC",
  "status": "ACTIVE",
  "name": "Acme Logistics Private Limited",
  "partyType": "BOTH",
  "filters": {
    "caseStatus": "ALL"
  },
  "clientReference": "vendor-onboarding-4821",
  "delivered": 100,
  "warnings": [],
  "createdAt": 1791600000000,
  "expiresAt": 1792204800000,
  "pageSize": 100,
  "results": [
    {
      "caseRef": "CR0hc7f3a91e",
      "caseIdentifier": {
        "courtType": "HC",
        "cnr": "KAHC010123452024"
      },
      "identifierStatus": "CONFIRMED",
      "courtType": "HC",
      "court": "High Court of Karnataka",
      "state": "Karnataka",
      "district": null,
      "bench": "Bengaluru",
      "caseType": "WP",
      "caseTypeName": "Writ Petition",
      "caseNature": "Civil",
      "caseNumber": "WP/12345/2024",
      "cnrNumber": "KAHC010123452024",
      "filingNumber": "WP/45120/2024",
      "registrationNumber": "WP/12345/2024",
      "filingDate": "2024-03-18",
      "filingYear": 2024,
      "registrationDate": "2024-03-21",
      "caseStatus": "PENDING",
      "nextHearingDate": "2026-11-04",
      "decisionDate": null,
      "natureOfDisposal": null,
      "petitioner": "K. Ramesh Babu",
      "respondent": "The State of Karnataka",
      "partyRole": "RESPONDENT",
      "matchedParty": "Acme Logistics Pvt. Ltd",
      "petitioners": [
        "K. Ramesh Babu"
      ],
      "respondents": [
        "The State of Karnataka",
        "The Principal Secretary, Revenue Department",
        "The Deputy Commissioner",
        "Acme Logistics Pvt. Ltd",
        "Indian Oil Corporation Ltd"
      ],
      "partyCountTruncated": false
    },
    {
      "caseRef": "CR0dc21b5c07",
      "caseIdentifier": {
        "courtType": "DC",
        "cnr": "DLST010012342023"
      },
      "identifierStatus": "CONFIRMED",
      "courtType": "DC",
      "court": "Saket District Court, Delhi",
      "state": "Delhi",
      "district": "South Delhi",
      "bench": null,
      "caseType": "CS",
      "caseTypeName": "Civil Suit (Commercial)",
      "caseNature": "Civil",
      "caseNumber": "CS/1234/2023",
      "cnrNumber": "DLST010012342023",
      "filingNumber": "1234/2023",
      "registrationNumber": "CS/1234/2023",
      "filingDate": "2023-06-02",
      "filingYear": 2023,
      "registrationDate": "2023-06-05",
      "caseStatus": "DISPOSED",
      "nextHearingDate": null,
      "decisionDate": "2025-01-29",
      "natureOfDisposal": "Decreed",
      "petitioner": "BLUELINE FREIGHT SERVICES",
      "respondent": "ACME LOGISTICS PRIVATE LIMITED",
      "partyRole": "RESPONDENT",
      "matchedParty": "ACME LOGISTICS PRIVATE LIMITED",
      "petitioners": [
        "BLUELINE FREIGHT SERVICES"
      ],
      "respondents": [
        "ACME LOGISTICS PRIVATE LIMITED"
      ],
      "partyCountTruncated": false
    },
    {
      "caseRef": "CR0it88e0d412",
      "caseIdentifier": null,
      "identifierStatus": "NEEDS_CONFIRMATION",
      "courtType": "ITAT",
      "court": "Income Tax Appellate Tribunal, Mumbai",
      "state": "Maharashtra",
      "district": null,
      "bench": "Mumbai",
      "caseType": "ITA",
      "caseTypeName": "Income Tax Appeal",
      "caseNature": "Tax",
      "caseNumber": "ITA/2210/MUM/2022",
      "cnrNumber": null,
      "filingNumber": null,
      "registrationNumber": null,
      "filingDate": "2022-09-14",
      "filingYear": 2022,
      "registrationDate": null,
      "caseStatus": "PENDING",
      "nextHearingDate": null,
      "decisionDate": null,
      "natureOfDisposal": null,
      "petitioner": "ACME LOGISTICS PRIVATE LIMITED",
      "respondent": "DCIT CIRCLE 4(1)",
      "partyRole": "PETITIONER",
      "matchedParty": "ACME LOGISTICS PRIVATE LIMITED",
      "petitioners": [
        "ACME LOGISTICS PRIVATE LIMITED"
      ],
      "respondents": [
        "DCIT CIRCLE 4(1)"
      ],
      "partyCountTruncated": false
    }
  ],
  "nextPageToken": "eyJzIjoiQ1BIUzBzYW5kYm94ZGVtbzAwMDEiLCJwIjoxMDB9.Qk3x9Wf2mT8aYb1c"
}
400Invalid page token (a token from another search, altered, or beyond what has been delivered).
Response 400
{
  "httpStatusCode": 400,
  "code": 61453,
  "message": "The page token is not valid for this search",
  "appError": true
}
402The plan's search allowance is used up.
Response 402
{
  "httpStatusCode": 402,
  "code": 61455,
  "message": "Your plan's search allowance has been used up",
  "appError": true
}
404Unknown or deleted search.
Response 404
{
  "httpStatusCode": 404,
  "code": 61449,
  "message": "This search was not found",
  "appError": true
}
409Another request on this search is still running.
Response 409
{
  "httpStatusCode": 409,
  "code": 61451,
  "message": "Another request on this search is still running. Wait for it to finish, then retry",
  "appError": true
}
410The search has expired and its results were deleted.
Response 410
{
  "httpStatusCode": 410,
  "code": 61450,
  "message": "This search is older than its retention period and its results have been deleted. Start a new search",
  "appError": true
}
429Too many requests for this account. See `Retry-After`.
503The page could not be assembled in time. Retry with the same token.
Response 503
{
  "httpStatusCode": 503,
  "code": 61452,
  "message": "This page could not be assembled in time. Nothing was delivered or charged - retry with the same page token",
  "appError": true,
  "details": {
    "retryAfterSeconds": 3,
    "heldForNextPage": false
  }
}

Error responses share one shape, listed on Rate limits & errors.