/historical-search/{searchId}/resultsNext 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.
X-CasePrimus-Api-Key header. See Authentication for how to create a key, and Rate limits & errors for how requests are counted.Parameters
| Name | In | Description |
|---|---|---|
searchIdstring Required | path | The id returned when the resource was created. |
pageTokenstring Optional | query | The `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.
BASE="https://api.caseprimus.ai/api/caseprimus/v1" curl "$BASE/historical-search/SEARCH_ID/results" \ -H "X-CasePrimus-Api-Key: $CASEPRIMUS_API_KEY"
const BASE = "https://api.caseprimus.ai/api/caseprimus/v1"; const res = await fetch(BASE + "/historical-search/SEARCH_ID/results", { method: "GET", headers: { "X-CasePrimus-Api-Key": process.env.CASEPRIMUS_API_KEY, }, }); const data = await res.json();
import os import requests BASE = "https://api.caseprimus.ai/api/caseprimus/v1" res = requests.request( "GET", BASE + "/historical-search/SEARCH_ID/results", headers={"X-CasePrimus-Api-Key": os.environ["CASEPRIMUS_API_KEY"]}, ) data = res.json()
Responses
| Field | Description |
|---|---|
searchIdstring | |
modeenum | ASYNC: collected in the background (see POST /historical-search). SYNCASYNC |
statusenum | SYNC searches are ACTIVE, COMPLETE or EXPIRED. ASYNC searches are RUNNING, COMPLETE, FAILED or EXPIRED. ACTIVECOMPLETEEXPIREDRUNNINGFAILED |
namestring | |
partyTypeenum | PETITIONERRESPONDENTBOTH |
filtersobject | |
clientReferencestring or null | |
deliveredinteger | Results delivered so far. For a COMPLETE asynchronous search: all of them (reading its pages is free and repeatable). |
collectedinteger | ASYNC only. Results stored so far; final once COMPLETE. |
completedAtinteger or null | ASYNC only. Epoch ms the search finished (COMPLETE or FAILED); null while RUNNING. |
failureReasonstring | ASYNC only, present when FAILED: why, in words for a person. Nothing was charged. |
warningsarray of object | |
codeenum | RESULT_CAP_REACHEDSOURCE_UNAVAILABLE |
messagestring | |
createdAtinteger | Epoch ms. |
expiresAtinteger | Epoch ms. Results are deleted at this time. |
pageSizeinteger | |
resultsarray of object | |
caseRefstring | Stable id of the case: the same case has the same caseRef in every search. |
caseIdentifierobject or null | What identifies the case for a live lookup. Null when it cannot be established without a live check. |
identifierStatusenum | CONFIRMEDNEEDS_CONFIRMATION |
courtTypestring | DC, HC, SC, CC, NCLT, NCLAT, CESTAT, DRT, DRAT, GSTAT, ITAT, APTEL, NGT, SAT or OTHER. |
courtstring or null | |
statestring or null | |
districtstring or null | |
benchstring or null | |
caseTypestring or null | |
caseTypeNamestring or null | |
caseNaturestring or null | |
caseNumberstring or null | |
cnrNumberstring or null | Null when the case has no customer-visible CNR. |
filingNumberstring or null | |
registrationNumberstring or null | |
filingDatestring or null | YYYY-MM-DD. |
filingYearinteger or null | |
registrationDatestring or null | |
caseStatusstring or null | |
nextHearingDatestring or null | |
decisionDatestring or null | |
natureOfDisposalstring or null | |
petitionerstring or null | |
respondentstring or null | |
partyRoleenum or null | The side the searched company is on. PETITIONERRESPONDENTBOTH |
matchedPartystring 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. |
petitionersarray of string | Every petitioner, each once, in the court's order (placeholder entries such as 'Respondent' are left out). At most 25 - see `partyCountTruncated`. |
respondentsarray of string | Every respondent, each once, in the court's order. At most 25 - see `partyCountTruncated`. |
partyCountTruncatedboolean | True when either list was cut at 25. `matchedParty` is still named. |
nextPageTokenstring or null | Pass it to get the next page. Null when there is nothing more. |
{
"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"
}{
"searchId": "CPHS0exampledemo0001",
"mode": "SYNC",
"status": "ACTIVE",
"name": "Acme Logistics Private Limited",
"partyType": "BOTH",
"filters": {
"caseStatus": "ALL"
},
"clientReference": "vendor-onboarding-4821",
"delivered": 200,
"warnings": [],
"createdAt": 1791600000000,
"expiresAt": 1792204800000,
"pageSize": 100,
"results": [
{
"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
},
{
"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
}
],
"nextPageToken": "eyJzIjoiQ1BIUzBzYW5kYm94ZGVtbzAwMDEiLCJwIjoyMDB9.Hs7d2Qe9Lm4TzYk1"
}{
"searchId": "CPHS0exampledemo0001",
"mode": "SYNC",
"status": "COMPLETE",
"name": "Acme Logistics Private Limited",
"partyType": "BOTH",
"filters": {
"caseStatus": "ALL"
},
"clientReference": "vendor-onboarding-4821",
"delivered": 137,
"warnings": [],
"createdAt": 1791600000000,
"expiresAt": 1792204800000,
"pageSize": 100,
"results": [
{
"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": null
}{
"httpStatusCode": 400,
"code": 61453,
"message": "The page token is not valid for this search",
"appError": true
}{
"httpStatusCode": 402,
"code": 61455,
"message": "Your plan's search allowance has been used up",
"appError": true
}{
"httpStatusCode": 404,
"code": 61449,
"message": "This search was not found",
"appError": true
}{
"httpStatusCode": 409,
"code": 61451,
"message": "Another request on this search is still running. Wait for it to finish, then retry",
"appError": true
}{
"httpStatusCode": 409,
"code": 61467,
"message": "This search is still being collected. Its results can be read once its status is COMPLETE",
"appError": true,
"details": {
"status": "RUNNING"
}
}{
"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
}{
"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.