# /dc/companies/search

`POST /api/dc/companies/search`

Price: 10 credits

Search Washington DC business entities in the DLCP corporate registry by name or Initial File No., with optional filters for legal form, registry status, Domestic or Foreign registration, registered agent name, business address city, state, postal code and country, and effective-date range. Returns matching entities with Initial File No., name, legal form, registration region, status, effective date, registered agent name and business address.

## How to use it

Search Washington DC business entities. Pass count plus any of: name (an entity name or Initial File No., matched by starts_with/contains/exact via match), entity_type, status, region, agent_name, city, state, zip, country, formation_start_date/formation_end_date (YYYY-MM-DD), sort_by and sort_order. The match mode applies to name, agent_name, city and zip; state and country are always matched exactly. Returns items with id and entity_number (both the Initial File No.), name, legal_form, region, status, effective_date, agent_name and address. Returns an empty list when nothing matches. Use entity_number or id with dc/companies for the full record.

## Parameters

- `access-token` (string, required)

## Request body

- `timeout` (integer) — Max scrapping execution timeout (in seconds) (default: 300; min: 20; max: 1500)
- `count` (integer, required) — Max number of results to return (min: 1)
- `name` (string, nullable) — Entity name or Initial File No. to match (examples: "WASHINGTON"; minLength: 1)
- `match` (string) — How the text filters are matched (default: "contains"; one of: "starts_with", "contains", "exact")
- `entity_type` (string, nullable) — Legal form filter (one of: "domestic_act_of_congress_corporation", "domestic_business_corporation", "domestic_general_cooperative_association", "domestic_limited_cooperative_association", "domestic_limited_liability_company", "domestic_limited_liability_partnership", "domestic_limited_partnership", "domestic_nonprofit_corporation", "domestic_statutory_trust", "foreign_act_of_congress_corporation", "foreign_business_corporation", "foreign_general_cooperative_association", "foreign_limited_cooperative_association", "foreign_limited_liability_company", "foreign_limited_liability_partnership", "foreign_limited_partnership", "foreign_nonprofit_corporation", "foreign_statutory_trust")
- `status` (string, nullable) — Registry status filter (one of: "active_in_good_standing", "active_not_in_good_standing", "cancelled", "consolidated", "converted", "dissolved", "domesticated", "merged", "revoked", "terminated", "withdrawn")
- `region` (string, nullable) — Whether the entity is registered in DC or in another jurisdiction (one of: "domestic", "foreign")
- `agent_name` (string, nullable) — Registered agent name filter (examples: "C T CORPORATION SYSTEM"; minLength: 1)
- `city` (string, nullable) — Business address city filter (examples: "Washington"; minLength: 1)
- `state` (string, nullable) — Business address state or territory code filter (examples: "DC"; minLength: 1)
- `zip` (string, nullable) — Business address postal code filter (examples: "20003"; minLength: 1)
- `country` (string, nullable) — Business address country code filter (examples: "USA"; minLength: 1)
- `formation_start_date` (string, nullable) — Earliest effective date, YYYY-MM-DD (examples: "2020-01-01")
- `formation_end_date` (string, nullable) — Latest effective date, YYYY-MM-DD (examples: "2020-12-31")
- `sort_by` (string, nullable) — Field to sort results by (one of: "name", "effective_date", "entity_number", "entity_type", "status", "agent_name")
- `sort_order` (string) — Sort direction (default: "asc"; one of: "asc", "desc")

## Response

### 200 — Successful Response

- `@type` (string) (default: "DcCompanySearchItem")
- `id` (string, required)
- `entity_number` (string, nullable)
- `name` (string, required)
- `legal_form` (string, nullable)
- `region` (string, nullable)
- `status` (string, nullable)
- `effective_date` (string, nullable)
- `agent_name` (string, nullable)
- `address` (object, nullable)
  - `@type` (string) (default: "DcAddress")
  - `street` (string, nullable)
  - `street2` (string, nullable)
  - `city` (string, nullable)
  - `state` (string, nullable)
  - `province` (string, nullable)
  - `zip` (string, nullable)
  - `postal_code` (string, nullable)
  - `country` (string, nullable)
  - `county` (string, nullable)
  - `full` (string, nullable)

## Errors

### 422 — Validation Error

The request body did not validate

What to do: Check the fields against this schema. A URN with the wrong prefix is the most common cause.

- `detail` (array)
  - `loc` (array, required)
  - `msg` (string, required)
  - `type` (string, required)
  - `input` (any)
  - `ctx` (object)

### 408

The request ran past its time limit

What to do: Raise `timeout` in the request body, up to the maximum this endpoint documents. Lowering `count` or turning off the `with_*` flags also helps, because less work finishes sooner.

### 412

The entity was not found, or a precondition failed

What to do: Retrying will not help: either the entity does not exist, or the input points at a different one.

### 429

Too many requests: a rate limit or a usage window is exhausted

What to do: When the response carries an X-Retry-After header, wait that many seconds and retry: the same number is in the body as `detail.retry_after`, and the limit clears once that window passes. The message in the body names the limit that was hit.

### 500

Something broke on our side

What to do: Retrying will not help. If it keeps happening, send us the X-Request-ID from the response headers.

### 529

Rate limit reached, or the endpoint is overloaded

What to do: Wait at least 30 seconds, then retry.

## Response envelope

Success: Array of objects (may be empty if no results)

Error: Error may coexist with partial results if it occurs mid-execution. Check X-Error header and status code.

Every response carries these headers:

- `X-Error` — Error message text (present only on error)
- `X-Request-ID` — Unique request identifier
- `X-Execution-Time` — Execution time in seconds
- `X-Result-Count` — How many records the body carries. 0 means an empty result, which is a normal answer and not by itself an error. A non-zero count can come back together with X-Error when the failure happened partway through — read this header and X-Error independently.
- `X-Total-Available-Results` — How many records exist for this query, when the endpoint can say. On a `dry_run` request this is the answer and the body is empty. It saturates: the endpoint's documented maximum means 'at least that many', any smaller number is exact.
- `X-Warning` — Present when the request body carried keys this endpoint does not document. They were ignored, so any filter you meant to apply through them did not apply. Check the spelling against this schema and retry.
- `X-Retry-After` — Seconds to wait before retrying. Present only on 429.

