# Bankruptcy Filings Scraper - Chapter 11 Dockets (CourtListener) (`groundplanes/courtlistener-bankruptcy-dockets`) Actor

New business bankruptcy filings from CourtListener's RECAP archive: case name, chapter, court, docket number, filed date, judge and docket link, newest first. Chapter 11 in Delaware, New Jersey, Texas Southern and New York Southern by default. Business debtors only. Not for consumer use.

- **URL**: https://apify.com/groundplanes/courtlistener-bankruptcy-dockets.md
- **Developed by:** [Groundplane Labs](https://apify.com/groundplanes) (community)
- **Categories:** Business
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 37.5% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 bankruptcy dockets

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

## Bankruptcy Filings Scraper - Chapter 11 Dockets (CourtListener)

Extract federal business bankruptcy dockets (Chapter 11 reorganizations, Chapter 7 liquidations, and Chapter 15 cross-border insolvencies) from the CourtListener RECAP archive via the official REST API v4. Filter by bankruptcy court district, filing date window, company keyword, and corporate entity markers.

> **Required: a free CourtListener API token.** CourtListener has disabled anonymous access to its search API — runs without a token now fail immediately with an explanatory message. A free account at [courtlistener.com](https://www.courtlistener.com/sign-in/) gives you a token ([API help](https://www.courtlistener.com/help/api/rest/)); paste it into `courtListenerApiToken`. With a token, if CourtListener answers HTTP 429 (too many requests), the run stops early and its status message starts with **PARTIAL**.

### What it does

Commercial bankruptcy petitions filed in U.S. Bankruptcy Courts—especially in major restructuring venues such as Delaware (`deb`), New Jersey (`njb`), the Southern District of Texas (`txsb`), and the Southern District of New York (`nysb`)—signal immediate restructuring, DIP financing, § 363 asset sale, and vendor claim opportunities.

This Actor:

- Queries the CourtListener REST API v4 RECAP search endpoint (`https://www.courtlistener.com/api/rest/v4/search/?type=r`) with cursor pagination and automatic rate-limiting (at most 2 requests/second).
- Filters directly by Bankruptcy Code chapter (`11`, `7`, `15`, or `13`) and court district (`courtIds`).
- Enforces a privacy-first **`businessOnly`** filter (`true` by default) that keeps only dockets whose `caseName` includes a recognized business entity marker (`LLC`, `Inc`, `Corp`, `Co.`, `LP`, `LLP`, `Ltd`, `Holdings`, `Group`, `Company`, `Partners`, `Trust`, etc.) and blocks individual Chapter 13 wage-earner filings.
- Outputs normalized docket records with `docketId`, `docketNumber`, `caseName`, `chapter`, `courtId`, `courtName`, `dateFiled`, `dateTerminated`, `assignedJudge`, `cause`, `natureOfSuit`, `pacerCaseId`, and `docketUrl`.

### Who it's for

- **Restructuring advisors, turnaround consultants, and investment banks** tracking new Chapter 11 and Chapter 15 petitions.
- **Distressed debt investors and § 363 asset buyers** identifying commercial debtors across key bankruptcy districts.
- **Commercial credit, trade creditor, and supply-chain risk teams** monitoring vendor or customer insolvency filings.
- **Bankruptcy and commercial litigation law firms** monitoring new docket activity by court and judge.

### Input

- **`chapters`** *(array of strings)* — Bankruptcy chapters to include: `"11"` (Reorganization), `"7"` (Liquidation), `"15"` (Cross-Border), `"13"` (Individual Adjustment — never allowed when `businessOnly` is `true`). Default: `["11"]`.
- **`businessOnly`** *(boolean)* — Defaults to `true` to keep only cases with business entity markers in `caseName` and exclude consumer filings.
- **`courtIds`** *(array of strings)* — CourtListener bankruptcy court IDs. Default: `["deb", "njb", "txsb", "nysb"]`. Leave empty (`[]`) to search all federal bankruptcy courts.
- **`filedDateFrom`** *(string, YYYY-MM-DD)* — Start of docket filing date window. Defaults to 14 days before `filedDateTo`.
- **`filedDateTo`** *(string, YYYY-MM-DD)* — End of docket filing date window. Defaults to today (UTC).
- **`query`** *(string)* — Optional keyword or company name filter. Default: `""`.
- **`courtListenerApiToken`** *(string, secret)* — **Required** free CourtListener API token (`Authorization: Token <token>`). CourtListener has disabled anonymous search access, so runs without a token fail immediately with an explanatory message. Get a free token from [courtlistener.com](https://www.courtlistener.com/help/api/rest/) (up to 5,000 requests/hour).
- **`maxItems`** *(integer)* — Maximum dockets to return. Default: `200`.

#### Example input JSON

```json
{
  "chapters": ["11"],
  "businessOnly": true,
  "courtIds": ["deb", "njb", "txsb", "nysb"],
  "filedDateFrom": "2026-10-09",
  "filedDateTo": "2026-10-23",
  "query": "",
  "maxItems": 200
}
```

#### Example run options (default max charge $50)

Set a default maximum charge of **$50** (`"maxTotalChargeUsd": 50`) in your run options:

```json
{
  "maxTotalChargeUsd": 50
}
```

### Output

Results are deduplicated by `docketId` and sorted newest first by `dateFiled` descending.

| Field | Type | Description |
|---|---|---|
| `docketId` | `integer \| string` | Unique CourtListener RECAP docket ID. |
| `docketNumber` | `string \| null` | Bankruptcy court docket number (e.g. `26-12345`). |
| `caseName` | `string \| null` | Debtor / case name. |
| `chapter` | `string \| null` | Bankruptcy Code chapter (`7`, `11`, `13`, `15`). |
| `courtId` | `string \| null` | CourtListener court identifier (`deb`, `txsb`, `nysb`, `njb`, etc.). |
| `courtName` | `string \| null` | Full name of the federal bankruptcy court. |
| `dateFiled` | `string \| null` | Petition filing date (`YYYY-MM-DD`). |
| `dateTerminated` | `string \| null` | Case termination date (`YYYY-MM-DD`) or `null` if active. |
| `assignedJudge` | `string \| null` | Assigned bankruptcy judge name. |
| `cause` | `string \| null` | Statutory cause if populated. |
| `natureOfSuit` | `string \| null` | Nature of suit if populated. |
| `pacerCaseId` | `string \| null` | PACER internal case ID. |
| `docketUrl` | `string` | Direct URL to the docket on `courtlistener.com`. |
| `source` | `string` | Always `"CourtListener RECAP"`. |

#### Sample output row (synthetic example)

Sample row (fictitious: debtor, judge and numbers are made up):

```json
{
  "docketId": 99999999,
  "docketNumber": "26-10999",
  "caseName": "Example Logistics Holdings, LLC",
  "chapter": "11",
  "courtId": "deb",
  "courtName": "United States Bankruptcy Court, D. Delaware",
  "dateFiled": "2026-10-22",
  "dateTerminated": null,
  "assignedJudge": "Jane Q. Example",
  "cause": null,
  "natureOfSuit": null,
  "pacerCaseId": "500123",
  "docketUrl": "https://www.courtlistener.com/docket/99999999/example-logistics-holdings-llc/",
  "source": "CourtListener RECAP"
}
```

### How pricing works

Pay per result. You only pay for rows returned. Set `"maxTotalChargeUsd": 50` in your run options to cap spend automatically.

### Data source and terms

- **Credit & Official Source:** Data from [CourtListener](https://www.courtlistener.com/), a project of the [Free Law Project](https://free.law/) ([REST API v4 Documentation](https://www.courtlistener.com/help/api/rest/)).
- **RECAP coverage note:** The RECAP Archive holds federal court dockets and documents that have been contributed by RECAP extension users or public court feeds from PACER; therefore, it is not a complete census of every PACER filing.
- **Affiliation disclaimer:** This Actor is an independent tool and is **not affiliated with or endorsed by CourtListener, the Free Law Project, PACER, or the Administrative Office of the U.S. Courts**.

### Compliance

This Actor is designed strictly for commercial B2B research, restructuring analysis, and corporate credit monitoring. **This Actor is not for consumer debt marketing, consumer collection, or credit/employment/tenant eligibility determinations under the Fair Credit Reporting Act (FCRA) or the Fair Debt Collection Practices Act (FDCPA).** No party or attorney personal contact details are scraped. Buyers are responsible for complying with the Telephone Consumer Protection Act (TCPA), the National Do-Not-Call Registry, the CAN-SPAM Act, and all applicable federal and state privacy laws before any business outreach.

### Limits and FAQ

- **Do I need a CourtListener API token?**
  Yes. CourtListener has disabled anonymous access to its search API (unauthenticated requests now return HTTP 401), so the run fails immediately with an explanatory message if no token is supplied. A token is free: create an account at [courtlistener.com](https://www.courtlistener.com/help/api/rest/), copy the token from your profile, and pass it in `courtListenerApiToken` to unlock up to 5,000 requests/hour. If CourtListener answers HTTP 429 during a large pull, the run returns the rows collected so far, flagged PARTIAL in the status message.
- **Why is Chapter 13 blocked when `businessOnly` is `true`?**
  Chapter 13 ("Adjustment of Debts of an Individual with Regular Income") applies exclusively to individual consumers under 11 U.S.C. § 109(e).

### Changelog

- **v0.3 (2026-10-27):** Buyer-token model only: runs use the CourtListener API token supplied in `courtListenerApiToken`; no account token is attached to this version, so tokenless runs fail immediately as documented. PARTIAL status messages now end with the Issues-tab call to action, the rate-limit message names the token's hourly quota, and the max-charge stop is reported as PARTIAL. No other behavior changed.
- **v0.2 (2026-10-27):** CourtListener disabled anonymous access to its search API (unauthenticated requests return HTTP 401; the previous build surfaced this as a raw HTTP error). A CourtListener API token is now required: runs without one fail immediately with an explanatory message instead of a raw API error, a rejected token is reported as such, and the token can also be supplied via the `COURTLISTENER_API_TOKEN` environment variable. No other behavior changed.
- **v0.1 (2026-10-23):** Initial release with CourtListener REST API v4 cursor pagination, chapter query pushdown, and `businessOnly` entity filtering.

# Actor input Schema

## `chapters` (type: `array`):

Bankruptcy chapters to include: 11 (Reorganization), 7 (Liquidation), 15 (Ancillary/Cross-Border), 13 (Individual Adjustment — blocked when businessOnly is true).

## `businessOnly` (type: `boolean`):

Defaults to true so individual consumer bankruptcies are excluded: keeps only cases with business entity markers (LLC, Inc, Corp, Co., LP, LLP, Ltd, Holdings, Group, Company, Partners, Trust) and never allows Chapter 13.

## `courtIds` (type: `array`):

CourtListener federal bankruptcy court IDs (e.g. \['deb', 'njb', 'txsb', 'nysb']). Leave empty to search all federal bankruptcy courts.

## `filedDateFrom` (type: `string`):

Start of docket filing date window (YYYY-MM-DD). Leave empty for today minus 14 days.

## `filedDateTo` (type: `string`):

End of docket filing date window (YYYY-MM-DD). Leave empty for today.

## `query` (type: `string`):

Optional company name or keyword search query.

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

Required. CourtListener has disabled anonymous access to its search API (unauthenticated requests return HTTP 401), so runs without a token fail immediately with an explanatory message. A free token from courtlistener.com (Profile -> API token) unlocks up to 5,000 requests/hour and avoids HTTP 429 partial results on large pulls.

## `maxItems` (type: `integer`):

Maximum number of bankruptcy dockets to return.

## Actor input object example

```json
{
  "chapters": [
    "11"
  ],
  "businessOnly": true,
  "courtIds": [
    "deb",
    "njb",
    "txsb",
    "nysb"
  ],
  "query": "",
  "maxItems": 200
}
```

# Actor output Schema

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

No description

# 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 = {
    "chapters": [
        "11"
    ],
    "businessOnly": true,
    "courtIds": [
        "deb",
        "njb",
        "txsb",
        "nysb"
    ],
    "query": "",
    "maxItems": 200
};

// Run the Actor and wait for it to finish
const run = await client.actor("groundplanes/courtlistener-bankruptcy-dockets").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 = {
    "chapters": ["11"],
    "businessOnly": True,
    "courtIds": [
        "deb",
        "njb",
        "txsb",
        "nysb",
    ],
    "query": "",
    "maxItems": 200,
}

# Run the Actor and wait for it to finish
run = client.actor("groundplanes/courtlistener-bankruptcy-dockets").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 '{
  "chapters": [
    "11"
  ],
  "businessOnly": true,
  "courtIds": [
    "deb",
    "njb",
    "txsb",
    "nysb"
  ],
  "query": "",
  "maxItems": 200
}' |
apify call groundplanes/courtlistener-bankruptcy-dockets --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,groundplanes/courtlistener-bankruptcy-dockets"
        }
    }
}
```

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/G2lyahOzk66ZeGfga/builds/tCuiNuemvjqEaYkgh/openapi.json
