# US Federal Court Corporate Parties & Law Firm Finder (`afkdigital/newapi09-federal-litigation-firm-finder`) Actor

Find corporate parties in GovInfo federal opinions. Firm matching supports unambiguous singular captions in the Federal and Sixth Circuits, with a legal-form marker or explicit law-firm wording. Export case metadata and source evidence at $0.006 per case, including cases without firm matches.

- **URL**: https://apify.com/afkdigital/newapi09-federal-litigation-firm-finder.md
- **Developed by:** [AFK Digital](https://apify.com/afkdigital) (community)
- **Categories:** Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$6.00 / 1,000 unique docket records

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## US Federal Court Corporate Parties & Law Firm Finder

Find corporate parties and explicitly recorded law firms in published U.S. federal court opinions on GovInfo. The Actor produces one structured record per unique case package, with corporate party names, Nature of Suit, opinion dates, source links, and page references for supported firm relationships. Download JSON for detailed evidence or CSV for a research table, Clay, or an n8n workflow.

The source is GovInfo's USCOURTS collection. Access uses public sitemaps, MODS metadata, and opinion PDFs. No GovInfo API key, source account, proxy, or LLM is required.

**Automatic firm extraction currently supports recognized Federal Circuit and Sixth Circuit counsel layouts with an unambiguous singular caption party.** The recorded firm name must have a legal-form marker, such as LLP, or an explicit law-firm designation. Other courts, plural or ambiguous caption groups, and unsupported layouts can produce corporate-case metadata with empty firm arrays. An empty firm list does not establish that a party has no counsel.

**Price: $0.006 per unique GovInfo case package returned — $6 per 1,000 result rows.** One case remains one billed row when several matching opinions are inspected. A valid corporate-party case record is billable even when its firm list is empty; check the extraction status and evidence fields before treating a row as a company-to-firm match.

### What a result means

Each `docket_id` is a GovInfo case-package ID such as `USCOURTS-ca13-23-01048`. GovInfo groups published opinions for the case under this package; each individual opinion has a granule ID. The record combines metadata with explicit counsel evidence from the matching opinions selected for inspection.

The Actor selects up to `maxOpinionsPerDocket` matching opinions per case, with a default of three. It attempts to read the first three PDF pages of each selected opinion. Within the supported Federal and Sixth Circuit layouts, a firm link requires an unambiguous singular caption role and a firm name with a legal-form marker or explicit law-firm designation. The output records the opinion, PDF URL, and one-based PDF page for each supported link. Ambiguous suffixless names and group-caption associations are omitted.

Corporate names are selected using legal-form markers recorded in the source party names. This is a practical filter for corporate parties, not company-registry verification. A metadata role such as Appellee is preserved as recorded. A more specific role such as Defendant-Appellee is supplied only when supported by the opinion text.

`representation_current_status` is always `not_asserted`. The observations describe the cited documents and do not establish that any law firm is currently retained. `filing_date` is always `null`: the workflow supplies opinion dates and does not establish the date the underlying case was filed.

### Quick start

Use the default sitemap input to explore Patent opinions from the Federal Circuit in January 2024:

```json
{
  "sourceMode": "sitemap",
  "court": "ca13",
  "nature_of_suit": "830",
  "sitemapYears": [2024],
  "opinion_date_from": "2024-01-01",
  "opinion_date_to": "2024-01-31",
  "maxResults": 3,
  "maxCostUsd": 0.018,
  "maxSourceRequests": 60,
  "maxRunSeconds": 240,
  "requestIntervalSeconds": 1,
  "maxOpinionsPerDocket": 3,
  "maxPdfBytes": 8388608
}
```

Open the run's **Case results** output to review records. Use **Download JSON** to preserve arrays and detailed representation links, or **Download CSV** for the scalar text companions. The result limit is a ceiling; the source filters and processing budgets can produce fewer than three rows.

#### Inspect known cases directly

Choose `packages` when you already have GovInfo case-package IDs. This avoids sitemap discovery and is useful for inspecting a specific case or a small research list:

```json
{
  "sourceMode": "packages",
  "court": "",
  "nature_of_suit": "",
  "opinion_date_from": "2024-01-01",
  "opinion_date_to": "2024-12-31",
  "packageIds": [
    "USCOURTS-ca13-23-01048",
    "USCOURTS-ca6-23-05456"
  ],
  "maxResults": 2,
  "maxCostUsd": 0.012,
  "maxOpinionsPerDocket": 3
}
```

An empty `court` accepts supported federal courts in packages mode. An empty `nature_of_suit` accepts any Nature of Suit. Opinion-date filters still apply. Supply case-package IDs, not PDF URLs, individual opinion IDs, or identifiers from another source.

### Discovery and coverage

In sitemap mode, the Actor visits the requested court and publication-year partitions, follows their case-package entries, and checks the source metadata. `sitemapYears` controls GovInfo publication-year discovery. It does not select case filing years, and it is not a guarantee that every opinion dated in the requested range appears in those partitions. The opinion date, court, and Nature of Suit are checked again against package metadata before a case is returned.

Discovery and document inspection are bounded by result, charge, request, runtime, opinion-count, and PDF-size limits. A run can finish after producing useful partial results. Review `RUN_SUMMARY` to understand the stopping condition, and compare `matching_opinions_available`, `source_opinion_ids`, and `opinions_inspected` to assess each case's inspection coverage.

GovInfo describes USCOURTS as opinions from selected federal appellate, district, bankruptcy, and certain national courts, generally from 2004 onward, with gaps and some earlier material. It is not a complete docket database. Missing opinions, unavailable party metadata, image-only or unreadable PDFs, and counsel information outside the inspected pages can all reduce coverage. Corporate-party metadata coverage is broader than automatic firm extraction: firm links currently require the supported Federal or Sixth Circuit singular-caption layouts and explicit firm markers. A valid corporate-case record can still be returned and billed when its PDF is unavailable or its counsel layout is unsupported. Source: [GovInfo USCOURTS collection help](https://www.govinfo.gov/help/uscourts).

The Actor uses documented sitemap and content access rather than GovInfo's API. See [GovInfo sitemaps](https://www.govinfo.gov/sitemaps) and the [GovInfo Developer Hub](https://www.govinfo.gov/developers) for the source's public data-access methods.

### Input reference

| Field | Default | Accepted values and meaning |
| --- | --- | --- |
| `sourceMode` | `"sitemap"` | `"sitemap"` discovers court/year partitions; `"packages"` inspects the supplied case-package IDs. |
| `court` | `"ca13"` | GovInfo court code. Required and nonblank in sitemap mode. Empty is allowed in packages mode. A supplied value must match source metadata. |
| `nature_of_suit` | `"830"` | Three-digit federal Nature of Suit code; `830` means Patent and `840` means Trademark. Empty accepts any Nature of Suit. The code is checked through metadata and the Actor's code-to-label mapping. |
| `sitemapYears` | `[2024]` | One to three integer publication-year partitions for sitemap discovery. Packages mode uses `packageIds` instead. |
| `opinion_date_from` | `"2024-01-01"` | Inclusive earliest opinion date, as a valid `YYYY-MM-DD` calendar date. |
| `opinion_date_to` | `"2024-01-31"` | Inclusive latest opinion date. Must be on or after the beginning date. |
| `packageIds` | `[]` | Nonempty array of GovInfo case-package IDs in packages mode. Duplicate IDs do not create additional rows within the run. |
| `maxResults` | `3` | Integer from 1 to 1,000. Maximum unique case-package rows. |
| `maxCostUsd` | `0.018` | Number from 0 to 100. Application ceiling for result charges at $0.006 per case. Zero permits no output rows. |
| `maxSourceRequests` | `60` | Integer from 1 to 3,000. Maximum source requests, including discovery, metadata, PDF downloads, and retries. |
| `maxRunSeconds` | `240` | Integer from 30 to 3,600. Maximum processing time, including request spacing and backoff. |
| `requestIntervalSeconds` | `1` | Number from 1 to 60. Minimum interval between source requests. A longer source-requested retry delay takes precedence. |
| `maxOpinionsPerDocket` | `3` | Integer from 1 to 10. Maximum matching opinions selected per case. Only the first three PDF pages of each selected opinion are inspected. |
| `maxPdfBytes` | `8388608` | Integer from 1,048,576 to 16,777,216 bytes, or 1–16 MiB. Maximum size of each downloaded PDF. |

The form supplies these defaults. In JSON input, use an empty string explicitly to clear the optional court or Nature of Suit filter; omitting the field retains its default.

### Output reference

#### Case and source fields

| Field | Type | Meaning |
| --- | --- | --- |
| `docket_id` | string | Unique GovInfo case-package ID and within-run billing key. |
| `docket_number` | string | Source case number. |
| `case_name` | string | Case caption from GovInfo metadata. |
| `filing_date` | null | Always null; the case filing date is not established. |
| `court_id` | string | GovInfo federal court code. |
| `nature_of_suit` | string or null | Resolved Nature of Suit code, or null when unavailable. |
| `nature_of_suit_label` | string or null | Source Nature of Suit label, or null when unavailable. |
| `source` | string | Always `govinfo_uscourts`. |
| `record_scope` | string | Always `case_with_published_opinions`. |
| `source_docket_url` | string | Official GovInfo case-details URL. |
| `observed_at` | string | UTC observation timestamp in ISO 8601 format. |

#### Opinion coverage and firm evidence

| Field | Type | Meaning |
| --- | --- | --- |
| `corporate_party_names` | array of strings | Corporate party names supported by source metadata and the legal-form filter. |
| `attorney_firm_names` | array of strings | Firms with explicit legal-form markers or law-firm designations, linked through recognized Federal/Sixth Circuit singular-caption layouts. Other courts and unsupported or ambiguous layouts can yield an empty array. |
| `opinion_dates` | array of strings | Unique sorted dates of selected matching opinions. These dates remain present when a selected PDF cannot be read. |
| `source_opinion_ids` | array of strings | Selected GovInfo opinion granule IDs, limited by `maxOpinionsPerDocket`. |
| `source_opinion_urls` | array of strings | Official opinion-details URLs corresponding to the selected IDs. |
| `matching_opinions_available` | integer | Total metadata-verified opinions in the package that match the date filters, before the per-case selection limit. |
| `opinions_inspected` | integer | Selected opinions whose first three PDF pages were successfully parsed. |
| `corporate_party_roles` | array of objects | Each object preserves `party_name` and `metadata_party_role`. |
| `recorded_representation_links` | array of objects | Supported singular-party/firm links from recognized Federal/Sixth Circuit counsel layouts, with opinion and page provenance. Unsupported courts/layouts and ambiguous or plural groups yield no links. |
| `firm_extraction_status` | string | Inspection and matching outcome, from the status table below. |
| `representation_current_status` | string | Always `not_asserted`. |

Every representation-link object contains `party_name`, `metadata_party_role`, `recorded_party_role`, `attorney_firm_names`, `source_opinion_id`, `source_document_url`, `evidence_page`, `evidence_type`, and `representation_current_status`. `evidence_page` uses one-based PDF pages. Metadata and document roles are preserved separately so an appellate role is not silently converted into a trial-court role.

The flat firm list is convenient for case-level research. Use `recorded_representation_links` when assigning a particular firm to a particular corporation. A case can have several corporate parties on opposing sides; joining every corporate name to every firm in the flat lists would invent relationships.

| `firm_extraction_status` | Interpretation |
| --- | --- |
| `firms_found` | All selected PDFs were inspected and at least one explicit representation link was found. |
| `no_explicit_firm_match` | All selected PDFs were read, but no supported link was found. This can mean an unsupported court or layout, an ambiguous or plural caption, or no qualifying firm name; it does not establish that the source lacks counsel information. |
| `partial_opinion_inspection` | Some selected PDFs could not be read, regardless of whether other selected opinions supplied firm evidence. |
| `pdf_unavailable_or_unsupported` | None of the selected PDFs could be read. |

Even `firms_found` describes the selected opinions and inspected pages, not complete case history. `opinion_dates` is a unique date list and should not be paired positionally with `source_opinion_ids`; several opinions may share a date.

#### CSV companions

`corporate_party_names_text`, `attorney_firm_names_text`, and `opinion_dates_text` join their corresponding arrays with `; `. They make CSV rows easier to import without flattening nested evidence. The JSON export retains the full arrays and representation-link objects.

### Examples from public opinions

These public source examples illustrate the firm evidence covered by the supported layouts. The page references below count from the first PDF page.

| Opinion | Corporation and recorded role | Firm covered by automatic extraction | Source |
| --- | --- | --- | --- |
| Plotagraph, Inc. v. Lightricks, Ltd.; Federal Circuit, January 22, 2024 | Lightricks, Ltd.; Defendant-Appellee in the caption | Norton Rose Fulbright US LLP is associated with the defendant-appellee in the counsel paragraph. | [Official opinion, page 1](https://www.govinfo.gov/content/pkg/USCOURTS-ca13-23-01048/pdf/USCOURTS-ca13-23-01048-0.pdf#page=1) |
| FedEx Ground Package System, Inc. v. Route Consultant, Inc.; Sixth Circuit, April 1, 2024 | Route Consultant, Inc.; Defendant-Appellee in the caption | BURR & FORMAN LLP appears for the appellee in the counsel section. | [Official opinion, page 1](https://www.govinfo.gov/content/pkg/USCOURTS-ca6-23-05456/pdf/USCOURTS-ca6-23-05456-0.pdf#page=1) |

The Plotagraph plaintiff side is a plural caption group. Its corporate-party metadata can be retained, but automatic extraction omits that group's firm associations. The singular Lightricks defendant association shown above is within the supported scope.

The FedEx opinion also names LEWIS THOMASON for the appellee. Version 0.2 omits ambiguous firm names without a legal-form marker or explicit law-firm designation, so this name is not included in the automatic firm list.

The corresponding case packages are [USCOURTS-ca13-23-01048](https://www.govinfo.gov/app/details/USCOURTS-ca13-23-01048) and [USCOURTS-ca6-23-05456](https://www.govinfo.gov/app/details/USCOURTS-ca6-23-05456). The packages-mode example above selects both. The opinions document historical representation; the Actor does not assert a present relationship.

### Pricing and budget behavior

The billing unit is one unique GovInfo case package saved as one dataset row. At $0.006 per row, the result-event totals are:

| Returned unique cases | Result-event charge |
| ---: | ---: |
| 1 | $0.006 |
| 3 | $0.018 |
| 100 | $0.60 |
| 1,000 | $6.00 |

The Actor uses Apify's single automatic default-dataset-item event. There is no Actor-start charge or separate charge for each selected opinion. Operational summaries and source errors are stored outside the result dataset and do not create paid result rows. See [Apify's pay-per-event documentation](https://docs.apify.com/actors/publishing/monetize/pay-per-event) for platform event behavior.

`maxCostUsd` controls the application's result allowance. Apify's **maximum total charge** is a separate run setting, available through `maxTotalChargeUsd` when using its API. The lower applicable allowance limits the number of rows. A budget that cannot afford the next whole $0.006 row produces no further row; for example, $0.010 permits at most one result. Setting a larger result budget does not expand the request, time, or source-coverage limits automatically.

Deduplication is scoped to one run. Starting a new run can return and bill a case that appeared in an earlier run. The key-value store contains `CHECKPOINT` for internal run progress and `RUN_SUMMARY` for processing counts and stopping information. These records are separate from the downloadable case dataset.

### JSON and CSV exports

The output tab supplies **Download JSON**, **Download CSV**, and **Run summary** links. For direct integration, obtain the run's `defaultDatasetId` and use Apify's official dataset endpoint:

```text
GET https://api.apify.com/v2/datasets/DATASET_ID/items?format=json&clean=true
```

For a compact CSV that preserves the intended case-level columns:

```text
GET https://api.apify.com/v2/datasets/DATASET_ID/items?format=csv&clean=true&attachment=true&fields=docket_id,case_name,court_id,nature_of_suit,opinion_dates_text,corporate_party_names_text,attorney_firm_names_text,matching_opinions_available,opinions_inspected,firm_extraction_status,source_docket_url
```

Dataset access follows your Apify storage permissions. Use your Apify credential through an `Authorization: Bearer ...` header when required; GovInfo source credentials are not part of this workflow. Apify supports JSON/CSV export, field selection, and pagination with `offset` and `limit`. See [Get dataset items](https://docs.apify.com/api/v2/dataset-items-get).

#### Clay

Download CSV and import it into a new or existing Clay table using Clay's CSV source. Preserve `docket_id` as the case identifier and map the `_text` fields as text columns. Keep the source URL and extraction status visible for review. If you need one corporation per row, expand the structured JSON carefully and use the representation links for any company-to-firm assignments. See [Clay's CSV import guide](https://university.clay.com/docs/csv-import-overview).

#### n8n

After the Actor run finishes, use an HTTP Request node with method `GET` and the dataset JSON URL above. Select a JSON response and configure an Apify credential if the dataset requires authorization. Pass the returned records into your downstream workflow, retaining `docket_id`, the source URLs, and the evidence objects. For a CSV file workflow, request `format=csv` instead. See [n8n HTTP Request documentation](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.httprequest/).

### Source use

GovInfo provides public access to these court opinions and metadata. Its [public-domain and copyright policy](https://www.govinfo.gov/about/policies) explains that U.S. government works are generally public domain and that embedded third-party material can retain copyright restrictions. This Actor returns structured observations and official source links; a publication's availability does not imply that every embedded work has the same reuse status.

The output contains corporate party names and recorded law-firm evidence, not personal attorney names, phone numbers, or email addresses. The Actor performs no outreach. Consult the cited source when a relationship or procedural role matters to your research.

### Version 0.2 input and data migration

Version 0.2 uses GovInfo case packages and published opinions. `docket_id` is now a string package ID. Use `opinion_date_from` and `opinion_date_to` for opinion dates, and `maxSourceRequests` for the source-request limit. Legacy `filing_date_from`, `filing_date_to`, and `maxApiRequests` keys are rejected rather than reinterpreted. Source-token input fields are no longer accepted.

Update existing integrations to treat `filing_date` as unavailable, handle nullable Nature of Suit fields, and read the new opinion-coverage and firm-evidence fields. Existing source-specific docket identifiers and historical representation links are not interchangeable with the new package and opinion identifiers.

#### Resume time accounting

The `maxRunSeconds` deadline is fixed for the same run. Time spent interrupted or waiting for a restart counts toward this wall-clock limit; resuming does not reset it. Request counts and provider retry deadlines are also preserved. The recorded `case_name` retains the public source case title; corporate-party and firm fields exclude personal attorney names and contact details.

The processing deadline bounds source work and storage operations. No new Dataset append starts after it expires. A final checkpoint and operational-summary write each have a separate maximum of 10 seconds for shutdown; use Apify's run timeout for the platform wall-clock ceiling. A timed-out append remains pending and is checked against the Dataset on resume before another append is attempted.

For an append whose server outcome is unknown, resuming first checks the Dataset. If the record is present, it is reconciled without another append. If it is still absent, the run stops with `delivery_unconfirmed` and retains the pending record instead of risking a second paid row. Dataset writes use a single HTTP attempt; source downloads retain their separate controlled retries.

# Actor input Schema

## `sourceMode` (type: `string`):

Use sitemap to discover case packages in the selected court and publication-year partitions. Use packages to inspect explicit GovInfo case-package IDs. All output must still match the opinion-date, court (when supplied), and Nature of Suit filters.

## `court` (type: `string`):

GovInfo federal court code, such as ca13 for the Federal Circuit. Required and nonblank in sitemap mode. In packages mode, an empty string permits any supported federal court; a supplied code is checked against source metadata. Automatic firm extraction supports only recognized Federal and Sixth Circuit singular-caption layouts; other courts return corporate-case metadata with empty firm arrays.

## `nature_of_suit` (type: `string`):

Three-digit federal Nature of Suit code; 830 is Patent. An empty string accepts any Nature of Suit. The Actor checks GovInfo metadata and its code-to-label mapping; it does not submit numeric codes as GovInfo text-search queries.

## `sitemapYears` (type: `array`):

One to three integer years to discover in sitemap mode. These are GovInfo publication-year partitions, not case filing years. Matching opinion dates are checked again in package metadata. Not used to discover packages in packages mode.

## `opinion_date_from` (type: `string`):

Inclusive beginning of the opinion-date range in YYYY-MM-DD format. This is an opinion date, not a docket filing date. Must be a real calendar date no later than opinion_date_to.

## `opinion_date_to` (type: `string`):

Inclusive end of the opinion-date range in YYYY-MM-DD format. Only matching opinions are eligible for bounded inspection within each case package. Must be no earlier than opinion_date_from.

## `packageIds` (type: `array`):

Required and nonempty when sourceMode is packages. Supply case IDs such as USCOURTS-ca13-23-01048, not individual opinion IDs, PDF URLs, or CourtListener docket IDs. Duplicate case IDs do not create extra result rows.

## `maxResults` (type: `integer`):

Maximum dataset rows for this run. One row represents one unique GovInfo case package and aggregates the bounded matching opinions inspected for it. Valid corporate-case records count and are billed even if their firm arrays are empty. Source coverage and the other budgets can yield fewer results.

## `maxCostUsd` (type: `number`):

Application ceiling at $0.006 per unique case package. Zero allows no output rows. Apify also has a separate maximum run charge; the lower applicable budget limits results. Three rows cost at most $0.018 in result events.

## `maxSourceRequests` (type: `integer`):

Maximum GovInfo requests, including discovery, metadata, document downloads, and retries. A case may require several requests. Reaching this limit can leave discovery or opinion inspection incomplete.

## `maxRunSeconds` (type: `integer`):

Same-run wall-clock deadline in seconds, including downloads, PDF processing, retries and interruption time. Resuming the same run does not reset this deadline. Partial progress is saved when a limit is reached.

## `requestIntervalSeconds` (type: `number`):

Minimum spacing between requests to GovInfo. Any longer server-requested Retry-After delay takes precedence. The default is one second.

## `maxOpinionsPerDocket` (type: `integer`):

Maximum matching opinions selected per case package. The first three PDF pages of each are inspected. Firm matches require recognized Federal or Sixth Circuit singular captions and a legal-form marker or explicit law-firm designation. Other courts and unsupported layouts can return metadata with empty firm arrays. This is not complete representation history.

## `maxPdfBytes` (type: `integer`):

Maximum bytes for each PDF download. Default 8 MiB; allowed range 1–16 MiB. Larger or unreadable documents may leave firm arrays empty while usable corporate metadata still produces a billed case record. No OCR or LLM inference is used.

## Actor input object example

```json
{
  "sourceMode": "sitemap",
  "court": "ca13",
  "nature_of_suit": "830",
  "sitemapYears": [
    2024
  ],
  "opinion_date_from": "2024-01-01",
  "opinion_date_to": "2024-01-31",
  "packageIds": [],
  "maxResults": 3,
  "maxCostUsd": 0.018,
  "maxSourceRequests": 60,
  "maxRunSeconds": 240,
  "requestIntervalSeconds": 1,
  "maxOpinionsPerDocket": 3,
  "maxPdfBytes": 8388608
}
```

# Actor output Schema

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

Corporate-case metadata with supported firm evidence. Automatic firm links are limited to recognized Federal/Sixth Circuit singular captions and explicit firm markers; empty firm arrays remain valid case results.

## `downloadJson` (type: `string`):

Complete case records and supported firm links with opinion/page provenance. Other courts and unsupported layouts can have empty firm arrays. JSON retains the structured evidence.

## `downloadCsv` (type: `string`):

One row per case with semicolon-separated corporate party, law-firm, and opinion-date text. Use JSON for nested representation evidence.

## `runSummary` (type: `string`):

Processing counters, limits, and the reason discovery or inspection stopped. Partial output can result from source coverage or configured budgets.

# 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 = {
    "sourceMode": "sitemap",
    "court": "ca13",
    "nature_of_suit": "830",
    "sitemapYears": [
        2024
    ],
    "opinion_date_from": "2024-01-01",
    "opinion_date_to": "2024-01-31",
    "packageIds": [],
    "maxResults": 3,
    "maxCostUsd": 0.018,
    "maxSourceRequests": 60,
    "maxRunSeconds": 240,
    "requestIntervalSeconds": 1,
    "maxOpinionsPerDocket": 3,
    "maxPdfBytes": 8388608
};

// Run the Actor and wait for it to finish
const run = await client.actor("afkdigital/newapi09-federal-litigation-firm-finder").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 = {
    "sourceMode": "sitemap",
    "court": "ca13",
    "nature_of_suit": "830",
    "sitemapYears": [2024],
    "opinion_date_from": "2024-01-01",
    "opinion_date_to": "2024-01-31",
    "packageIds": [],
    "maxResults": 3,
    "maxCostUsd": 0.018,
    "maxSourceRequests": 60,
    "maxRunSeconds": 240,
    "requestIntervalSeconds": 1,
    "maxOpinionsPerDocket": 3,
    "maxPdfBytes": 8388608,
}

# Run the Actor and wait for it to finish
run = client.actor("afkdigital/newapi09-federal-litigation-firm-finder").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 '{
  "sourceMode": "sitemap",
  "court": "ca13",
  "nature_of_suit": "830",
  "sitemapYears": [
    2024
  ],
  "opinion_date_from": "2024-01-01",
  "opinion_date_to": "2024-01-31",
  "packageIds": [],
  "maxResults": 3,
  "maxCostUsd": 0.018,
  "maxSourceRequests": 60,
  "maxRunSeconds": 240,
  "requestIntervalSeconds": 1,
  "maxOpinionsPerDocket": 3,
  "maxPdfBytes": 8388608
}' |
apify call afkdigital/newapi09-federal-litigation-firm-finder --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,afkdigital/newapi09-federal-litigation-firm-finder"
        }
    }
}
```

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/hdewyzoYgyjYP4G0P/builds/kp9nSMXyfYJo7hfNw/openapi.json
