# Litigation Check — Company Litigation History Screener (`zinin/litigation-check`) Actor

Review bounded US federal docket-party matches and Poland SAOS full-text mentions for submitted companies. Get cited source records, confidence, gaps, failure truth, billing metadata, and a manual verification action. Not legal advice, identity resolution, or litigation clearance.

- **URL**: https://apify.com/zinin/litigation-check.md
- **Developed by:** [Tim Zinin](https://apify.com/zinin) (community)
- **Categories:** Lead generation, Automation, Agents
- **Features:** Limited permissions
- **Stats:** 13 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $17.00 / 1,000 delivered litigation source observations

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Litigation Check — Company Legal-Record Evidence

Search bounded US PACER-party index records and Poland SAOS judgment text, then receive review-ready evidence with cited record links, confidence, explicit gaps, billing truth, and no automated legal verdict.
**Built for:** Compliance and procurement teams, small businesses, agencies, finance operators, onboarding teams, researchers, and due-diligence analysts who need a fast first-pass public-record review before qualified legal analysis.
**Commercial unit:** one completed, delivered company × jurisdiction source observation. **Live pricing contract:** $0.02 per delivered completed `result-found` source observation plus the configured start event (starting at $0.005). A valid bounded zero-match response is a completed observation; a source failure, unsupported scope, licence advisory, withheld row, or ambiguous delivery is not a newly paid result.

![Litigation Check — Company Legal-Record Evidence: legal-record evidence to human review](https://raw.githubusercontent.com/TimmyZinin/apify-actor-assets/835cb06dd010a2eb2708dcb632a5b61384e2b11c/commercial115/litigation-check/readme-hero.webp)

### What you get

Litigation screening is easy to oversell. A search box can return a company name, but the expensive work begins immediately afterward: is it the same legal entity, is the name a structural party or only a text mention, which court or source is missing, how current is the index, what procedural role does the company have, and can a downstream workflow prove what it observed?
This Actor sells a bounded source observation with the interpretation boundary attached. For the United States it searches federal PACER docket party names through CourtListener. For Poland it searches judgment full text through SAOS and labels the weaker signal explicitly. It returns cited source-record links, evidence confidence, data gaps, failure handling and billing truth. Neither index is labelled as the court itself. It does not sell “clean company,” “bad company,” liability, outcome, solvency, fraud, sanctions, creditworthiness, legal advice or a counterparty-risk score.
The decision product is a defensible review queue. A match routes a human to cited records, authoritative court verification and entity resolution. A no-match observation records the exact bounded scope and time without converting absence into a certificate. Every external action remains outside the Actor and `safeToAutomate` stays false.

#### Buyer-visible outcomes

- A stable company-plus-jurisdiction identity for warehouse and case-management joins.
- A completed match or bounded no-match observation separated from free advisories.
- US structural party-name evidence kept distinct from Poland full-text mentions.
- Primary source endpoints and record links retained beside the conclusion boundary.
- Evidence confidence separated from legal importance, liability, merit and business risk.
- Coverage, identity, recency, privacy and indexing gaps stored as data fields.
- A conservative human-review action with an explicit priority and reason.
- Machine-readable source, scope, budget and delivery failure handling.
- One KVS `OUTPUT` receipt reconciling request, delivery, billing, withholding and source failures.

### Who uses it

- A small business performing a documented first-pass review of a prospective supplier, distributor or enterprise customer.
- A procurement or onboarding team that needs public-record evidence before sending a case to compliance or counsel.
- An agency or research team building an evidence table with source links, observation times and explicit uncertainty.
- A finance or operations team triaging counterparties for deeper professional due diligence.
- A data team enriching an internal company record with bounded legal-source observations and machine-readable gaps.
- A scheduled workflow that archives point-in-time observations without pretending that the Actor already provides a stateful litigation diff.

### Not a fit

- Background screening of natural persons, employment decisions, tenant screening, consumer credit, insurance eligibility or any regulated adverse-action workflow.
- A complete multi-jurisdiction litigation search, direct PACER substitute, state-court aggregator, legal opinion, credit report or investigations platform.
- Automatic supplier rejection, account suspension, outreach, accusation, publication, enforcement, filing or escalation based on a name hit.
- Resolving corporate families, beneficial ownership, aliases, mergers, subsidiaries, successors, people, addresses or registered identifiers.
- Proving that a case is open, material, adverse, lost, collectible, relevant to the contract, or attributable to the submitted legal entity.
- UK computational analysis without a separate Find Case Law licence; the UK source is deliberately disabled in this public product.

### Evidence-to-decision workflow

![Litigation Check — Company Legal-Record Evidence: source evidence to human decision workflow](https://raw.githubusercontent.com/TimmyZinin/apify-actor-assets/835cb06dd010a2eb2708dcb632a5b61384e2b11c/commercial115/litigation-check/readme-workflow.webp)

1. Start with the exact registered company name and a documented due-diligence purpose.
2. Select US, PL, or both; do not assume that one source represents all courts or proceedings.
3. Bound the number of records returned in each row and keep the original input with the run.
4. Query the fixed source endpoint with bounded time, bytes, redirects and response-shape checks.
5. Classify US evidence as structural PACER docket party-name search and PL evidence as full-text mention search.
6. Return a match or bounded no-match observation only after the source response is classifiable.
7. Attach confidence, cited record links, source note, data gaps, failure diagnostics and an unsent review action.
8. Link a completed delivered observation to the `result-found` event; keep source and scope advisories free.
9. Read KVS `OUTPUT`, reconcile Dataset and billing state, then open cited records and verify authoritative court sources.
10. Resolve legal identity, aliases, role, posture, disposition, recency and materiality with qualified human review.

### Sources and rights

#### United States — CourtListener RECAP/PACER evidence

The US path calls CourtListener’s v4 search API with a structural `party:"Company name"` query and RECAP/PACER search type. CourtListener documents its API for programmatic access and describes the Search API as a way to automate its search engine. Deployed US use requires the buyer’s own CourtListener API token, submitted through the encrypted secret input field. The Actor uses it only in the `Authorization: Token` header and never writes it to Dataset, logs or KVS `OUTPUT`. Without a token, US returns a free `source_authentication_required` advisory.
The Actor retains CourtListener docket links when returned. CourtListener is a nonprofit legal-data service and an index of collected PACER-related data, not the court itself and not a complete substitute for direct court research. The source envelope must contain both a non-negative count and a results array, and the total cannot be smaller than the returned page. A malformed, truncated, contradictory, HTTP-error or timeout response becomes a free source advisory, never a paid “no litigation” result. CourtListener reports large search counts as estimates, so the source note marks that boundary.
Default authenticated API access is rate-limited and CourtListener offers memberships and commercial agreements for expanded access. The buyer is responsible for an account and access level appropriate to its run volume and downstream use. Operate at a responsible volume, preserve source attribution and primary links, and review current source terms before materially increasing traffic or building a bulk replica.

#### Poland — SAOS full-text judgment evidence

SAOS documents a public REST API for searching and retrieving Polish judgment data and explicitly describes using that API to enrich a website or application with dynamically updated case-law information. The runtime calls its judgment search endpoint with the company string in the full-text `all` query. The response must contain a valid items array and a non-negative source total.
This is not a structural company-party field. A result can contain the submitted string anywhere in judgment text. The company may be a party, a referenced customer, employer, product, witness context, related entity, quotation or passing mention. Every PL row therefore uses the full-text-mention boundary, lower evidence confidence and the action `REVIEW_MENTIONS_AND_VERIFY_PARTY_STATUS`.

#### United Kingdom — intentionally disabled

Find Case Law permits many forms of access and commercial reuse under the Open Justice Licence, but The National Archives separately states that programmatic searching in bulk to identify, extract or enrich records counts as computational analysis and requires a separate licence. This public Actor does not claim that licence. A UK request produces a free `source_licence_required` advisory and makes no Find Case Law request.
If a licensed UK product is required, obtain written scope appropriate to the intended computational analysis, attribution, traffic, retention and downstream use, then build and review that licensed source path as a separate controlled release. Do not remove the guard merely because the endpoint is technically reachable.

### Evidence and boundaries

| Observation | What is established | What is not established |
|---|---|---|
| US match | CourtListener returned one or more PACER/RECAP docket results for the structural party-name query at the observation time. | Same legal entity, adverse role, open status, merit, liability, loss, materiality or completeness. |
| US no match | CourtListener returned a classifiable zero-count response for that exact bounded query. | No litigation in the US, no state cases, no sealed/recent/unindexed matters, or low risk. |
| PL match | SAOS returned one or more full-text judgment records containing the submitted string. | That the company is a party or that the mention is adverse, current, material or correctly identity-resolved. |
| PL no match | SAOS returned a classifiable zero-count full-text response for that exact string. | No Polish proceedings, no alternate spelling, no ingestion lag or no relevant legal exposure. |
| Advisory | The requested source/scope/delivery could not produce a reusable completed observation. | Any positive or negative claim about litigation. |

#### Match handling

Open every retained source-record link, then verify material facts against the current authoritative court record where the decision requires it. Confirm the caption and party list, legal entity name, jurisdiction, court, docket number, filing date, party role, current posture, disposition and relationship to the business decision. Search aliases and registered identifiers separately. A name collision is evidence of a search hit, not evidence about the intended company.
Do not rank a counterparty by raw case count. Large companies, regulated industries, consumer-facing businesses and frequent filers can naturally appear often. One material proceeding can matter more than hundreds of routine dockets. The Actor deliberately does not calculate a legal-risk score from count.

#### No-match handling

Record the exact company string, jurisdiction, source, observation time, source status and gaps. If the decision is material, add direct court research, state or specialist courts, aliases, subsidiaries, local counsel and current registry checks. A bounded no-match is useful evidence of what was checked; it is not a reusable “clean” label that survives name changes, time or source expansion.

### How to run

Use **Try for free** or an authenticated Apify API call, submit exact company names, select only the
supported jurisdictions, and keep the run ID. After terminal completion, read current-run KVS
`OUTPUT` before consuming Dataset rows or starting another run.

### Input contract

Use **Try for free** on Apify Store or send the same JSON through API, Task, schedule, webhook, Make, n8n, Zapier, or a standard Apify MCP integration. The public example is PL-only so it needs no credential. Add the encrypted token field when selecting US.

```json
{
  "companies": [
    "PKO Bank Polski"
  ],
  "jurisdictions": [
    "PL"
  ],
  "maxCasesPerRow": 10,
  "maxConcurrency": 1
}
```

#### Input fields

| Field | How to use it safely |
|---|---|
| `companies` | One to twenty full legal company names. Remove empty and duplicate strings. Resolve identifiers, aliases and corporate family outside the Actor. |
| `jurisdictions` | `US` and/or `PL`. US requires `courtListenerApiToken`. `UK` returns a free licence advisory. Any other code returns a free unsupported-scope advisory. |
| `courtListenerApiToken` | Buyer-owned CourtListener token required for deployed US requests. Store it only through the encrypted secret editor. Never place it in public task JSON, logs, Dataset rows, screenshots or support messages. |
| `maxCasesPerRow` | One to fifty cited record-review pointers per row. The source total can exceed the returned list. A larger list increases review burden, not certainty. |
| `maxConcurrency` | One or two companies in parallel. Keep source traffic responsible and do not use many accounts to bypass source limits. |

#### Query preparation checklist

- Use the legal name from a current company registry or signed business document.
- Preserve punctuation and legal suffix when they help distinguish the entity.
- Search material aliases, previous names and local-language variants as separate documented inputs.
- Do not submit a person name or sensitive private note as a company query.
- Choose only jurisdictions relevant to the documented decision and interpret source coverage separately.
- Set a record limit your reviewer can actually inspect; more rows are not automatically better evidence.
- Keep the submitted input and observation time with every downstream review outcome.

### Output stores

The default Dataset holds one enriched observation per delivered company and jurisdiction plus free advisories when a source, scope, licence or run boundary prevents a completed paid result. The default Key-Value Store record `OUTPUT` is the run receipt. It records requested and source-supported pairs, attempted work, delivered rows, paid rows, local non-monetized rows, free rows, withheld rows, source failures, partial state, budget stop, replay safety and terminal status.
Do not infer success from process exit or Dataset length alone. Read `OUTPUT` first, verify `status`, `fatalError`, `replaySafe`, paid/free counts and withholding, then consume Dataset rows by `recordType`. A completed no-match observation can be paid because the source answered the bounded question. A source failure cannot be relabelled as a no-match.

#### Core fields

| Field | Meaning |
|---|---|
| `company / jurisdiction` | The exact submitted legal-name string and selected source scope. |
| `recordType` | Match observation, bounded no-match observation, or free advisory; never a legal verdict. |
| `found / caseCount / cases` | Whether the source check completed, the source-reported count, and a bounded list of review pointers. |
| `entityId / observedAt` | Stable company-plus-jurisdiction identity and point-in-time Actor observation. |
| `confidenceScore / confidenceBand` | Support for the evidence path, not probability of liability, loss, solvency, fraud, or business risk. |
| `sourceEvidence / freshness` | Public index endpoint and cited record-review links plus point-in-time freshness metadata; neither source is labelled as the court itself. |
| `change` | Explicitly unavailable in this point-in-time product; no hidden baseline or change claim. |
| `dataGaps / confidenceRisks` | Coverage, identity, indexing, privacy, and interpretation limits that constrain use. |
| `negativeSignals` | Machine-readable observations or failures, not adjudicated wrongdoing. |
| `recommendedAction / actionPriority` | Bounded human-review routing label, never approval, rejection, outreach, or legal advice. |
| `failureType / retryable / partial` | Machine-readable handling truth for source, scope, licence, budget, and delivery conditions. |
| `billing` | Whether this exact completed observation was linked to the paid result event. |
| `safeToAutomate` | Always false for external counterparty, employment, credit, legal, procurement, or enforcement action. |

### Field dictionary

#### `company / jurisdiction`

**Meaning:** The exact submitted legal-name string and selected source scope.
**Reviewer check:** Read it together with company, jurisdiction, source note, observation time, cited record links and data gaps. Verify material facts against the current authoritative court record, confirm that the submitted string is the intended entity and limit conclusions to what the record supports.
**Automation boundary:** Use this field to route or display evidence. Do not use it alone to approve, reject, accuse, contact, suspend, score credit, change employment, make a procurement award, publish allegations, file a claim or perform any other external action.

#### `recordType`

**Meaning:** Match observation, bounded no-match observation, or free advisory; never a legal verdict.
**Reviewer check:** Read it together with company, jurisdiction, source note, observation time, cited record links and data gaps. Verify material facts against the current authoritative court record, confirm that the submitted string is the intended entity and limit conclusions to what the record supports.
**Automation boundary:** Use this field to route or display evidence. Do not use it alone to approve, reject, accuse, contact, suspend, score credit, change employment, make a procurement award, publish allegations, file a claim or perform any other external action.

#### `found / caseCount / cases`

**Meaning:** Whether the source check completed, the source-reported count, and a bounded list of review pointers.
**Reviewer check:** Read it together with company, jurisdiction, source note, observation time, cited record links and data gaps. Verify material facts against the current authoritative court record, confirm that the submitted string is the intended entity and limit conclusions to what the record supports.
**Automation boundary:** Use this field to route or display evidence. Do not use it alone to approve, reject, accuse, contact, suspend, score credit, change employment, make a procurement award, publish allegations, file a claim or perform any other external action.

#### `entityId / observedAt`

**Meaning:** Stable company-plus-jurisdiction identity and point-in-time Actor observation.
**Reviewer check:** Read it together with company, jurisdiction, source note, observation time, cited record links and data gaps. Verify material facts against the current authoritative court record, confirm that the submitted string is the intended entity and limit conclusions to what the record supports.
**Automation boundary:** Use this field to route or display evidence. Do not use it alone to approve, reject, accuse, contact, suspend, score credit, change employment, make a procurement award, publish allegations, file a claim or perform any other external action.

#### `confidenceScore / confidenceBand`

**Meaning:** Support for the evidence path, not probability of liability, loss, solvency, fraud, or business risk.
**Reviewer check:** Read it together with company, jurisdiction, source note, observation time, cited record links and data gaps. Verify material facts against the current authoritative court record, confirm that the submitted string is the intended entity and limit conclusions to what the record supports.
**Automation boundary:** Use this field to route or display evidence. Do not use it alone to approve, reject, accuse, contact, suspend, score credit, change employment, make a procurement award, publish allegations, file a claim or perform any other external action.

#### `sourceEvidence / freshness`

**Meaning:** Public index endpoint and cited record-review links plus point-in-time freshness metadata; neither source is labelled as the court itself.
**Reviewer check:** Read it together with company, jurisdiction, source note, observation time, cited record links and data gaps. Verify material facts against the current authoritative court record, confirm that the submitted string is the intended entity and limit conclusions to what the record supports.
**Automation boundary:** Use this field to route or display evidence. Do not use it alone to approve, reject, accuse, contact, suspend, score credit, change employment, make a procurement award, publish allegations, file a claim or perform any other external action.

#### `change`

**Meaning:** Explicitly unavailable in this point-in-time product; no hidden baseline or change claim.
**Reviewer check:** Read it together with company, jurisdiction, source note, observation time, cited record links and data gaps. Verify material facts against the current authoritative court record, confirm that the submitted string is the intended entity and limit conclusions to what the record supports.
**Automation boundary:** Use this field to route or display evidence. Do not use it alone to approve, reject, accuse, contact, suspend, score credit, change employment, make a procurement award, publish allegations, file a claim or perform any other external action.

#### `dataGaps / confidenceRisks`

**Meaning:** Coverage, identity, indexing, privacy, and interpretation limits that constrain use.
**Reviewer check:** Read it together with company, jurisdiction, source note, observation time, cited record links and data gaps. Verify material facts against the current authoritative court record, confirm that the submitted string is the intended entity and limit conclusions to what the record supports.
**Automation boundary:** Use this field to route or display evidence. Do not use it alone to approve, reject, accuse, contact, suspend, score credit, change employment, make a procurement award, publish allegations, file a claim or perform any other external action.

#### `negativeSignals`

**Meaning:** Machine-readable observations or failures, not adjudicated wrongdoing.
**Reviewer check:** Read it together with company, jurisdiction, source note, observation time, cited record links and data gaps. Verify material facts against the current authoritative court record, confirm that the submitted string is the intended entity and limit conclusions to what the record supports.
**Automation boundary:** Use this field to route or display evidence. Do not use it alone to approve, reject, accuse, contact, suspend, score credit, change employment, make a procurement award, publish allegations, file a claim or perform any other external action.

#### `recommendedAction / actionPriority`

**Meaning:** Bounded human-review routing label, never approval, rejection, outreach, or legal advice.
**Reviewer check:** Read it together with company, jurisdiction, source note, observation time, cited record links and data gaps. Verify material facts against the current authoritative court record, confirm that the submitted string is the intended entity and limit conclusions to what the record supports.
**Automation boundary:** Use this field to route or display evidence. Do not use it alone to approve, reject, accuse, contact, suspend, score credit, change employment, make a procurement award, publish allegations, file a claim or perform any other external action.

#### `failureType / retryable / partial`

**Meaning:** Machine-readable handling truth for source, scope, licence, budget, and delivery conditions.
**Reviewer check:** Read it together with company, jurisdiction, source note, observation time, cited record links and data gaps. Verify material facts against the current authoritative court record, confirm that the submitted string is the intended entity and limit conclusions to what the record supports.
**Automation boundary:** Use this field to route or display evidence. Do not use it alone to approve, reject, accuse, contact, suspend, score credit, change employment, make a procurement award, publish allegations, file a claim or perform any other external action.

#### `billing`

**Meaning:** Whether this exact completed observation was linked to the paid result event.
**Reviewer check:** Read it together with company, jurisdiction, source note, observation time, cited record links and data gaps. Verify material facts against the current authoritative court record, confirm that the submitted string is the intended entity and limit conclusions to what the record supports.
**Automation boundary:** Use this field to route or display evidence. Do not use it alone to approve, reject, accuse, contact, suspend, score credit, change employment, make a procurement award, publish allegations, file a claim or perform any other external action.

#### `safeToAutomate`

**Meaning:** Always false for external counterparty, employment, credit, legal, procurement, or enforcement action.
**Reviewer check:** Read it together with company, jurisdiction, source note, observation time, cited record links and data gaps. Verify material facts against the current authoritative court record, confirm that the submitted string is the intended entity and limit conclusions to what the record supports.
**Automation boundary:** Use this field to route or display evidence. Do not use it alone to approve, reject, accuse, contact, suspend, score credit, change employment, make a procurement award, publish allegations, file a claim or perform any other external action.

### Happy, partial, and failure output

The two projections below come from retained Apify run, Dataset, KVS, and event-ledger records. They are not invented legal outcomes, accuracy claims, customer stories, or proof of wrongdoing. The first is the exact candidate canary that exposed the final-row budget-state bug fixed by the current local code. The second is a legacy production no-match observation. Both demonstrate the paid unit and its limits; neither replaces a future exact-build no-retry canary of the repaired source.

#### Candidate Polish full-text mention observation

Run `H0kM0pygu1SVRZrET` used candidate build `F0QrjfwmlNGIjg4jf` at 512 MB with a 180-second timeout, a `$0.03` maximum charge, and restart disabled. It completed `SUCCEEDED`, wrote one paid Dataset row to Dataset `Z99A8Ol57C4qb3g4f`, stored KVS `OUTPUT` in `yp5yjr8NrMUsebyym`, and the ledger recorded exactly one start plus one `result-found`. The requested pair was `PKO Bank Polski` / `PL`. The row correctly used low confidence, `safeToAutomate:false`, and `REVIEW_MENTIONS_AND_VERIFY_PARTY_STATUS`, because SAOS proves a full-text mention rather than a structural party role.

The candidate defect was in run-level completion truth, not the row or billing: every requested pair was attempted and delivered, no work was withheld, but `eventChargeLimitReached:true` was incorrectly converted to `PARTIAL`. The repaired code now derives `budgetStopped` from remaining work. The exact regression requires requested1/delivered1/withheld0 to finalize complete, while a genuinely omitted pair remains partial.

```json
{
  "evidenceAccepted": true,
  "runId": "H0kM0pygu1SVRZrET",
  "buildId": "F0QrjfwmlNGIjg4jf",
  "status": "SUCCEEDED",
  "memoryMbytes": 512,
  "timeoutSecs": 180,
  "maxTotalChargeUsd": 0.03,
  "restartOnError": false,
  "datasetId": "Z99A8Ol57C4qb3g4f",
  "keyValueStoreId": "yp5yjr8NrMUsebyym",
  "datasetRows": 1,
  "chargedEventCounts": {
    "apify-actor-start": 1,
    "result-found": 1
  },
  "row": {
    "entityId": "litigation-check:b2e82fa8b0509a18a5183782",
    "found": true,
    "partial": false,
    "confidenceBand": "low",
    "recommendedAction": "REVIEW_MENTIONS_AND_VERIFY_PARTY_STATUS",
    "failureType": null,
    "retryable": false,
    "safeToAutomate": false,
    "billable": true
  },
  "legacyCandidateOutput": {
    "status": "PARTIAL",
    "requestedPairCount": 1,
    "sourcePairCount": 1,
    "attemptedCount": 1,
    "deliveredRowCount": 1,
    "paidRowCount": 1,
    "freeRowCount": 0,
    "withheldRowCount": 0,
    "sourceFailureCount": 0,
    "partial": true,
    "budgetStopped": true,
    "fatalError": null,
    "replaySafe": true
  }
}
```

#### Production US structural no-match observation

Production run `l19Nc4isAay91qrFB` used build `lS84yYDFLLiPvmyqh`, completed `SUCCEEDED`, wrote one row to Dataset `PvwQgIv1p9PnWXZmM`, and used KVS `GL3vVm2T6C1EVXK6r`. The ledger recorded start1/result1 and platform runtime usage of `$0.00014071971470448709`; the retained remote gate calculated 168.775× gross charge-to-platform-runtime-usage coverage for that exact run. This is an execution-cost observation, not profit or demand evidence.

The input used the synthetic string `Zzqfakecorp Nonexistent 12345` for US only. CourtListener returned a completed bounded structural search with zero matching dockets. In the frozen legacy row, `found:true` means the source check completed; `caseCount:0` and the source note carry the no-match fact. That build predates the current decision and KVS `OUTPUT` contract: its `OUTPUT` key returned 404, and the missing receipt is disclosed rather than reconstructed.

```json
{
  "evidenceAccepted": true,
  "runId": "l19Nc4isAay91qrFB",
  "buildId": "lS84yYDFLLiPvmyqh",
  "status": "SUCCEEDED",
  "datasetId": "PvwQgIv1p9PnWXZmM",
  "keyValueStoreId": "GL3vVm2T6C1EVXK6r",
  "chargedEventCounts": {
    "apify-actor-start": 1,
    "result-found": 1
  },
  "usageTotalUsd": 0.00014071971470448709,
  "input": {
    "companies": ["Zzqfakecorp Nonexistent 12345"],
    "jurisdictions": ["US"],
    "maxConcurrency": 2
  },
  "dataset": {
    "rows": 1,
    "company": "Zzqfakecorp Nonexistent 12345",
    "jurisdiction": "US",
    "found": true,
    "caseCount": 0,
    "cases": [],
    "partial": false,
    "checkedAt": "2026-08-11T05:16:47.430Z"
  },
  "outputHttpStatus": 404
}
```

These examples show why downstream automation must read field semantics and contract version, not infer “a case exists” from `found:true` or infer completion from a process exit. The repaired candidate retains legacy row fields while adding explicit decision, failure, billing, and current-run reconciliation fields.

### Pricing

This Actor uses pay per event: $0.02 per delivered completed `result-found` source observation plus the configured start event (starting at $0.005). One result event represents one completed company × jurisdiction source observation that was actually delivered to the default Dataset. It does not represent one HTTP request, one returned case, one company, one legal conclusion, one failed attempt or one row merely calculated in memory.

1. Apify charges the configured start event according to allocated memory and buyer tier.
2. The Actor verifies that `result-found` is priced on a platform PPE run and refuses silent give-away.
3. It verifies that ordinary Dataset writes are not unexpectedly billable through the synthetic dataset-item event.
4. It checks the remaining buyer budget before a paid delivery and serializes every money-critical push.
5. The SDK-linked Dataset push and result event are treated as one delivery operation.
6. A completed local development row is marked non-monetized rather than falsely marked paid.
7. Source, unsupported-jurisdiction and licence-required advisories use no paid result event.
8. Ambiguous paid delivery makes the run fatal and replay-unsafe; blind retry is forbidden.
9. KVS `OUTPUT` reconciles Dataset delivery and billing counts before downstream work.
   A buyer budget can stop the run before every pair is delivered. Read `withheldRowCount` and the free halt advisory. Raising a budget can permit more source observations, but it cannot fix an unsupported jurisdiction, licence requirement, source outage, malformed response or identity ambiguity.

### Integration recipes

Keep `APIFY_TOKEN` in a secret manager or environment variable. Never put it in Actor input, a Dataset, source query, issue, screenshot or README.

#### cURL

```bash
curl -sS -X POST \
  "https://api.apify.com/v2/acts/zinin~litigation-check/runs?waitForFinish=180" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  --data-binary @public-task.json
```

After terminal completion, read KVS `OUTPUT` through `defaultKeyValueStoreId`, then fetch Dataset rows through `defaultDatasetId`.

#### JavaScript

```javascript
import { ApifyClient } from 'apify-client';
import input from './public-task.json' with { type: 'json' };

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('zinin/litigation-check').call(input);
const receipt = await client.keyValueStore(run.defaultKeyValueStoreId).getRecord('OUTPUT');
if (!receipt?.value) throw new Error('Missing OUTPUT receipt');
if (receipt.value.replaySafe === false) throw new Error('Manual delivery reconciliation required');
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log({ receipt: receipt.value, observations: items });
```

#### Python

```python
import json
import os
from apify_client import ApifyClient

client = ApifyClient(os.environ['APIFY_TOKEN'])
with open('public-task.json', encoding='utf-8') as handle:
    actor_input = json.load(handle)
run = client.actor('zinin/litigation-check').call(run_input=actor_input)
receipt = client.key_value_store(run['defaultKeyValueStoreId']).get_record('OUTPUT')
if not receipt: raise RuntimeError('Missing OUTPUT receipt')
if not receipt['value']['replaySafe']: raise RuntimeError('Manual delivery reconciliation required')
rows = list(client.dataset(run['defaultDatasetId']).iterate_items())
print({'receipt': receipt['value'], 'observations': rows})
```

### Decision routing

Every useful observation routes to a human review or a documented bounded no-match record. A source
failure, licence advisory, withheld operation, or ambiguous delivery routes to reconciliation rather
than a counterparty conclusion. The following playbooks preserve that distinction.

### Commercial playbooks

#### Supplier onboarding

Create a review case only after terminal completion and receipt reconciliation. Attach the raw observation, source links, data gaps and exact query. A match can raise review priority but cannot reject the supplier. A no-match can close this one bounded source step but cannot certify the supplier. Record the reviewer, entity-resolution evidence, authoritative verification, disposition, rationale and expiry date separately.

#### CRM or counterparty enrichment

Upsert the latest observation by `entityId`, but archive every raw row by run and `observedAt`. Keep source evidence separate from internal opinion. Do not overwrite a human legal status with a new name-search result, and do not expose allegations broadly inside a CRM without role-based access and a documented need.

#### Scheduled monitoring

This version has no stored compatible litigation baseline and `change.available` is false. Scheduling produces independent point-in-time observations. If you calculate downstream changes, preserve both raw observations, normalize source identity carefully, distinguish source deletion from case change, and require human review before escalation.

#### n8n, Make or Zapier

Wait for terminal completion, read `OUTPUT`, stop on replay-unsafe state, route retryable source failures through a bounded policy, route licence and unsupported-scope advisories to configuration review, and send match observations only to a private human review queue. Never map `caseCount > 0` directly to reject or `caseCount = 0` directly to approve.

#### Agent or MCP workflow

Expose the Actor through the standard Apify API or MCP server. Require the agent to cite the public index record, distinguish it from an authoritative court source, name the jurisdiction and signal type, state that the search is bounded, enumerate identity and source gaps, and ask for human approval before any communication or business decision.

### Sources, privacy, and rights

The runtime uses a fixed allowlist of source hosts. Company strings enter query parameters only and cannot choose a hostname or network destination. Redirects are rechecked, response time and bytes are bounded, and malformed source envelopes fail closed. PL needs no login. US requires a buyer-owned CourtListener token through an encrypted input field; the runtime does not log or persist it. The Actor uses no browser session, company account credential or private legal document.
Public court records can still contain names, addresses, allegations, health information, financial details, criminal context, witnesses and other sensitive material. Public accessibility is not unlimited permission for every downstream purpose. Minimize the company inputs and returned fields, restrict Dataset and export access, configure retention, document lawful purpose, provide correction and appeal paths, and obtain qualified privacy and legal review for material use.
Do not submit person names, national identifiers, customer secrets, private notes, accusations, litigation strategy, credentials or confidential transaction details as company values. Use encrypted Apify inputs or secrets for tokens and keep them out of downstream exports. Treat source links and Dataset IDs as potentially sensitive operational evidence even when the underlying judgment is public.

### Honest limitations

- US coverage is the CourtListener RECAP/PACER index, not every US court, filing, sealed matter, document, state docket, or real-time PACER event.
- A CourtListener party-name match does not resolve corporate identity, aliases, subsidiaries, successors, similarly named entities, role, posture, merit, or outcome.
- Poland SAOS uses full-text judgment search. A hit can be a passing mention, cited third party, counsel, product name, or true litigant; verify party status manually.
- A zero-match observation is not a certificate of no litigation, no liability, no enforcement exposure, no insolvency, or low counterparty risk.
- Source indexes can lag, omit, correct, redact, seal, unpublish, or reclassify records after the run.
- This version is point-in-time screening only; it does not store a compatible baseline or claim litigation-change detection.
- UK search is disabled because Find Case Law requires a separate computational-analysis licence for programmatic identification and extraction use.
- Public court material can contain personal data and sensitive allegations; downstream purpose, access, retention, correction, and human review remain the buyer's responsibility.
- A successful process exit is insufficient for automation; reconcile KVS `OUTPUT`, Dataset rows, and PPE delivery state.
  Additional interpretation rules:
- Evidence confidence describes support for the source observation, not severity, merit, outcome or probability of loss.
- A high-confidence name match can still be the wrong entity; structural search does not perform legal-entity resolution.
- A low-confidence full-text mention can still point to an important matter; low confidence means weaker linkage, not low business importance.
- Case count is not a risk score and must not be compared across companies without coverage, size, industry, role and time normalization.
- The recommended action is a routing label, never proof that review or external action occurred.
- The primary court or current official record controls when any source index or Actor field conflicts with it.

### Operating guide

- \[ ] The submitted string is the intended current legal entity name.
- \[ ] Material aliases, previous names, subsidiaries and local spellings are reviewed separately.
- \[ ] Jurisdiction and source coverage match the documented due-diligence purpose.
- \[ ] UK requests remain blocked unless a separately reviewed computational-analysis licence exists.
- \[ ] US party matches and PL full-text mentions stay distinct downstream.
- \[ ] Every material hit is opened and identity, role, posture and disposition are verified.
- \[ ] Zero matches remain bounded observations and never become “clean company” labels.
- \[ ] Dataset rows reconcile with KVS `OUTPUT` and paid/free event counts.
- \[ ] Replay-unsafe runs go to manual reconciliation, not automatic retry.
- \[ ] `safeToAutomate=false` survives every mapping and export.
- \[ ] Human disposition, rationale, reviewer, correction path and expiry are recorded separately.
- \[ ] Privacy, retention, access and applicable legal requirements are reviewed for downstream use.

### Troubleshooting

#### A company returned hundreds of US matches

Do not interpret count as risk. Narrow identity using registered name, aliases and external identifiers, inspect representative and recent dockets, determine party role, and use qualified review. CourtListener can estimate very large totals; the row notes this boundary.

#### A Poland record looks unrelated

Expected for some full-text searches. SAOS can return any judgment containing the submitted string. Open the record, locate the mention, resolve whether the company is a party, and record false-positive disposition outside the source observation.

#### UK returned an advisory

This is the intended safety behavior. The National Archives requires a separate computational-analysis licence for the programmatic use this feature would perform. Do not retry; obtain appropriate permission or remove UK from input.

#### A zero-match row is missing expected litigation

Review spelling, punctuation, aliases, jurisdiction, source coverage, sealed or recent matters, CourtListener/SAOS ingestion and direct court sources. The Actor promises only the recorded bounded query.

#### Dataset and OUTPUT disagree

Stop automated processing. Preserve the original run, inspect Dataset, `OUTPUT`, logs and settled events. If `replaySafe` is false, do not retry until delivery and billing are reconciled.

#### The run stopped on budget

Read the halt advisory and `withheldRowCount`. Raising the run cap can permit remaining supported pairs, but a larger budget does not expand jurisdiction coverage or improve identity resolution.

### FAQ

#### Does a match mean the company did something wrong?

No. It means the selected source returned a name match or text mention. Open the primary record, resolve identity and role, review posture and disposition, and obtain qualified advice.

#### Does zero matches mean the company is clean?

No. It means no match was observed inside one bounded source query at one recorded time. Courts, source coverage, spelling, aliases, sealed matters, indexing and recency all limit that statement.

#### Why is Poland lower confidence?

SAOS is queried by full text rather than a structural company-party field. The name may appear anywhere in a judgment, so every hit requires party-status verification.

#### Why is UK disabled?

The National Archives states that programmatic searching to identify or extract Find Case Law records as computational analysis requires a separate licence. This public product does not pretend otherwise.

#### Can I reject a supplier automatically from this output?

No. `safeToAutomate` is false. Identity, relevance, procedural posture, materiality, current status, proportionality, applicable law and human review must be handled outside the Actor.

#### Can I schedule it?

Yes, but this version returns point-in-time observations rather than a stored diff. Upsert by `entityId`, retain each `observedAt`, and build a separately reviewed change policy if monitoring is required.

#### What should I keep for audit?

Keep sanitized input, source scope, run and Dataset IDs, KVS `OUTPUT`, raw row, primary links, observation time, gaps, human disposition, retention policy and any correction or appeal.

#### What am I paying for?

One completed and delivered source observation per company and jurisdiction, including a valid bounded zero-match response. Source failures, unsupported scope and licence advisories are not linked to the paid result event.

### Support

For a reproducible issue provide the run ID, Actor version, sanitized company string, jurisdictions, record limit, Dataset row count, KVS `OUTPUT` status, source/failure type, and whether the condition is match, bounded no-match, advisory, withheld or reconciliation. Never send an API token, person identifier, private legal document or confidential allegation.
Litigation Check — Company Legal-Record Evidence is deliberately conservative: it sells traceable public-source evidence and a route to qualified review. It does not sell a legal conclusion about a company.

# Actor input Schema

## `companies` (type: `array`):

Full legal names of companies or counterparties to search. One evidence row is produced per company and jurisdiction, subject to the run budget. Use the registered legal name and resolve aliases or similarly named entities outside this Actor.

## `jurisdictions` (type: `array`):

Use US and/or PL. US searches federal PACER docket parties through CourtListener and requires a CourtListener API token. PL searches full judgment text in SAOS, so a hit may only mention the name. UK returns a free licence-required advisory and is not searched.

## `courtListenerApiToken` (type: `string`):

Bring your own CourtListener token for deployed US API use. Create it in your CourtListener profile. The field is secret, is used only as the Token authorization header, and is never written to Dataset, logs or OUTPUT. Leave empty for PL-only runs.

## `maxCasesPerRow` (type: `integer`):

How many individual records to include per company and jurisdiction row. caseCount keeps the source total where available, while cases is bounded to this limit. CourtListener counts above about 2,000 are source estimates.

## `maxConcurrency` (type: `integer`):

How many companies to check in parallel. Each company's selected jurisdictions are always fetched in parallel with each other regardless of this setting.

## Actor input object example

```json
{
  "companies": [
    "Tesla"
  ],
  "jurisdictions": [
    "PL"
  ],
  "maxCasesPerRow": 10,
  "maxConcurrency": 2
}
```

# Actor output Schema

## `results` (type: `string`):

API URL for the default dataset items produced by this run.

## `output` (type: `string`):

Terminal status and reconciliation counts for requested, attempted, delivered, paid, free, withheld and failed source observations.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "companies": [
        "Tesla"
    ],
    "jurisdictions": [
        "PL"
    ],
    "maxCasesPerRow": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("zinin/litigation-check").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "companies": ["Tesla"],
    "jurisdictions": ["PL"],
    "maxCasesPerRow": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("zinin/litigation-check").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "companies": [
    "Tesla"
  ],
  "jurisdictions": [
    "PL"
  ],
  "maxCasesPerRow": 10
}' |
apify call zinin/litigation-check --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,zinin/litigation-check"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/ybyRD5b0ztnevr87N/builds/5uRGfkPmqSfBZffRG/openapi.json
