# US State Business Entities API (NY, CO, OR, CT) (`yourevenings/us-state-business-entities`) Actor

Secretary of State business search API for NY, CO, OR and CT: business entity search, LLC lookup, new filings and KYB checks in one schema. No API key.

- **URL**: https://apify.com/yourevenings/us-state-business-entities.md
- **Developed by:** [Your Evenings](https://apify.com/yourevenings) (community)
- **Categories:** Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 entity record returneds

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

## US State Business Entities API (NY, CO, OR, CT)

**US State Business Entities API** returns business entity records from the official open-data registers of four US states (New York, Colorado, Oregon and Connecticut) as clean JSON rows in **one schema**, with **no API key needed**. Each row has the state's entity ID, name, entity type, status, formation date, jurisdiction of formation, business address, NAICS code (Connecticut) and a link to the dataset and its licence. Use it as a Secretary of State business entity search API for business verification and KYB, good-standing checks and new LLC and corporation filings. Three modes:

- **Look up entities**: up to 500 entities by state and ID, for example `NY:4424185` or `CO:18961000001`.
- **Search by name**: "contains" or "starts with" matching in any of the four states.
- **New filings**: entities formed or registered in a date range, newest first.

Turn on **monitor mode** and schedule the Actor to get only entities that are new or have changed since the last run, with the fields that changed and their previous values.

It's one **business entity search** across four states: a **NY business entity search**, a **Colorado Secretary of State business search**, the **Oregon business registry** and Connecticut's Business Registry, in place of four separate **Secretary of State business search** sites. Use it for an **LLC lookup** by ID or name, and export the rows as CSV, JSON or Excel.

| State | Register (open dataset) | ID | Look up | Search | New filings | Which entities |
|---|---|---|---|---|---|---|
| NY | Department of State, Active Corporations | DOS ID | yes | yes | yes | active only |
| CO | Department of State, Business Entities | Entity ID (11 digits) | yes | yes | yes | all statuses |
| OR | Secretary of State, Active Businesses | Registry number | yes | yes | yes | active only |
| CT | Secretary of the State, Business Registry | Business ID (account number) | yes | yes | yes | all statuses |

> **Not affiliated with any state.** This Actor is independent and is not affiliated with, endorsed by or sponsored by any state government or office named here. It reads their official open-data portals. Each row carries the dataset's licence and attribution (see *Data sources, licences and attribution*).

### Why this one

- **Official open data, not scraped search pages.** Every row comes from a state's own open-data API, so a change to a state's business-search website doesn't break it.
- **One schema for four states.** The same field names, the same four status values (`active`, `not_in_good_standing`, `inactive`, `unknown`) and the same address shape, with the state's own wording kept in `statusDetail`.
- **New filings, not just lookups.** List entities formed in the last N days in each state, with NAICS industry codes for Connecticut.
- **Clean values.** Placeholder text such as "No information provided" becomes `null`, "C/O" and "ATTN" lines are removed from addresses, and Colorado's status suffixes (for example ", Delinquent April 1, 2020") are moved out of the entity name into `extra.nameStatusNote`.
- **Clear answers when nothing is found.** An unknown ID gets a free `not_found` row, a badly formed ID gets `invalid_id`, a state with no matches gets `no_matches`, and an unreachable state gets `source_error` while the other states carry on, so an empty result is never silent.
- **You choose how much comes back.** `maxResults` caps the whole run and `maxResultsPerState` caps each state, and the Actor stops before your run's maximum cost.
- **Company-level data only.** Sole proprietorships, assumed business names (DBAs) and name reservations are skipped and never charged. Officer and owner names are never requested from the states.
- **Polite to the sources.** Requests to each portal are paced, retried after rate-limit or server errors, and identify the Actor.

### Quick start

Press **Start** with the prefilled input, or paste this into the **JSON** view of the Input tab. It looks up one entity in each state.

```json
{
  "mode": "lookup",
  "entities": ["NY:4424185", "CO:18961000001", "OR:338616", "CT:0067276"]
}
```

In our test run on 30 October 2026 it returned 4 rows: BUTCHY'S WINE & SPIRITS, INC. (NY), PARK RESERVOIR COMPANY (CO), PORTLAND TERMINAL RAILROAD COMPANY (OR) and TORRINGTON LIBRARY (CT), all active.

Active entities whose name contains "bakery" in Colorado and Connecticut:

```json
{
  "mode": "search",
  "name": "bakery",
  "states": ["CO", "CT"],
  "activeOnly": true,
  "maxResultsPerState": 10
}
```

Entities filed in the last 7 days in all four states:

```json
{
  "mode": "newFilings",
  "filedWithinDays": 7,
  "maxResultsPerState": 100,
  "maxResults": 400
}
```

### Who it's for

- **KYC, onboarding and credit teams** checking that a US business entity exists in its home state, is in good standing and is registered at the address it gave.
- **Data and CRM teams** enriching account lists with official entity names, types, formation dates and statuses.
- **B2B sales and market researchers** following newly formed businesses in a state, by industry in Connecticut.

### Use cases

1. **Counterparty check.** Look up a list of entity IDs and get status, type, formation date and address in one table.
2. **Good-standing watch.** Monitor a watch list daily and get a row only when an entity's name, status, address or NAICS code changes, for example when a Colorado entity becomes delinquent.
3. **New businesses.** Entities formed in the last N days, filtered to the states you want.
4. **Name check.** Find registered entities matching a name across four states at once.

### Output sample

The rows from the Quick start input (run on 30 October 2026), shortened:

| State | ID | Name | Entity type | Status | Formed | City |
|---|---|---|---|---|---|---|
| NY | 4424185 | BUTCHY'S WINE & SPIRITS, INC. | DOMESTIC BUSINESS CORPORATION | active | 2013-06-27 | MOUNT VERNON |
| CO | 18961000001 | PARK RESERVOIR COMPANY | Domestic Profit Corporation | active | 1896-03-16 | Cedaredge |
| OR | 338616 | PORTLAND TERMINAL RAILROAD COMPANY | DOMESTIC BUSINESS CORPORATION | active | 1882-08-28 | PORTLAND |
| CT | 0067276 | TORRINGTON LIBRARY | Special Chartered | active | | |

One row as JSON, from a run on 30 October 2026 (build 0.1.3). Some fields are left out to keep it short; the full list is under Output.

```json
{
  "rowType": "entity",
  "state": "OR",
  "registerName": "Oregon Secretary of State, Corporation Division",
  "idType": "Registry number",
  "registerId": "338616",
  "name": "PORTLAND TERMINAL RAILROAD COMPANY",
  "entityType": "DOMESTIC BUSINESS CORPORATION",
  "status": "active",
  "statusDetail": "Listed in the Active Businesses dataset",
  "formationDate": "1882-08-28",
  "closedDate": null,
  "jurisdictionOfFormation": "OR",
  "address": {
    "street": "3500 NW YEON AVE",
    "city": "PORTLAND",
    "state": "OR",
    "postalCode": "97210",
    "country": null,
    "full": "3500 NW YEON AVE, PORTLAND, OR 97210"
  },
  "addressType": "principal_place_of_business",
  "naicsCode": null,
  "naicsDescription": null,
  "recordUrl": "https://egov.sos.state.or.us/br/pkg_web_name_srch_inq.do_name_srch?p_name=&p_regist_nbr=338616&p_srch=PHASE1&p_print=FALSE&p_entity_status=ACTINA",
  "sourceUrl": "https://data.oregon.gov/resource/tckn-sxa6.json?%24where=registry_number%3D%27338616%27",
  "dataset": "https://data.oregon.gov/d/tckn-sxa6",
  "licence": "Public domain (ORS 276A.368)",
  "licenceUrl": "https://oregon.public.law/statutes/ors_276a.368",
  "attribution": "Oregon Secretary of State, Corporation Division"
}
```

### Input examples

Paste any of these into the **JSON** view of the Input tab. Each one is the input of a ready-made example task.

#### Business entity lookup by ID in all four states

```json
{
  "mode": "lookup",
  "entities": ["NY:4424185", "CO:18961000001", "OR:338616", "CT:0067276"],
  "maxResults": 50,
  "maxResultsPerState": 25
}
```

#### New business filings in the last 7 days

```json
{
  "mode": "newFilings",
  "states": ["NY", "CO", "OR", "CT"],
  "filedWithinDays": 7,
  "maxResults": 100,
  "maxResultsPerState": 25
}
```

#### Business name search ("starts with") in four states

```json
{
  "mode": "search",
  "name": "blue ridge",
  "nameMatch": "startsWith",
  "states": ["NY", "CO", "OR", "CT"],
  "activeOnly": true,
  "maxResults": 50,
  "maxResultsPerState": 10
}
```

### Input

| Field | Used by | What it does |
|---|---|---|
| `mode` | all | `lookup` (default), `search` or `newFilings`. |
| `entities` | lookup | Up to 500 entries like `NY:4424185`, `CO 18961000001` or `CT-0067276`. |
| `defaultState` | lookup | State for entries without a prefix. |
| `name` | search | Name or part of it, at least 2 letters or digits. Case is ignored. |
| `nameMatch` | search | `contains` (default) or `startsWith` (faster on large states). |
| `states` | search, newFilings | States to query. Defaults to all four. |
| `activeOnly` | all | Leave out dissolved, revoked, withdrawn or otherwise closed entities (CO and CT; the NY and OR datasets list active entities only). |
| `filedWithinDays`, `filedSince`, `filedUntil` | newFilings | Last N days (default 7, up to 366), or a `YYYY-MM-DD` range. |
| `includeRegisteredAgent` | all | Off by default. Adds the registered agent for NY and CO, only when the agent is an organisation. |
| `maxResults` | all | Most entity rows per run. Default 50; 0 means no limit. |
| `maxResultsPerState` | search, newFilings | Most entity rows per state. Default 25; 0 means no limit. |
| `monitorMode`, `emitBaselineOnFirstRun`, `stateStoreName` | all | See *Monitor mode* below. |

### Output

Every row has `rowType`. An **entity** row (`entity`) has `state`, `registerName`, `idType`, `registerId`, `name`, `entityType`, `status`, `statusDetail`, `formationDate`, `closedDate`, `jurisdictionOfFormation`, `county`, `address` (`street`, `city`, `state`, `postalCode`, `country`, `full`), `addressType`, `mailingAddress`, `naicsCode`, `naicsDescription`, `registeredAgent`, `extra` (state-specific fields), `recordUrl`, `sourceUrl`, `dataset`, `licence`, `licenceUrl`, `attribution` and `retrievedAt`. Fields a state doesn't publish are `null`. Values shortened:

```json
{
  "rowType": "entity",
  "state": "CO",
  "registerName": "Colorado Department of State, Business Division",
  "idType": "Entity ID",
  "registerId": "18961000001",
  "name": "PARK RESERVOIR COMPANY",
  "entityType": "Domestic Profit Corporation",
  "status": "active",
  "statusDetail": "Good Standing",
  "formationDate": "1896-03-16",
  "address": { "street": "980 W Main St", "city": "Cedaredge", "state": "CO", "postalCode": "81413", "country": "US" },
  "addressType": "principal_office",
  "mailingAddress": { "street": "PO Box 399", "city": "Cedaredge", "state": "CO", "postalCode": "81413", "country": "US" },
  "dataset": "https://data.colorado.gov/d/4ykn-tg5h",
  "licence": "Public Domain (Colorado Information Marketplace terms)"
}
```

`addressType` says which address the state published: `location` or `service_of_process` (NY), `principal_office` (CO), `principal_place_of_business` or `mailing` (OR), `business_address` (CT). New York rows use the service-of-process address only when it is addressed to the entity itself or to an organisation; otherwise `address` is `null`.

**Status** rows (`status`, free): `invalid_input`, `invalid_id`, `not_found`, `no_longer_listed`, `no_matches`, `scan_limit`, `skipped_individual`, `skipped_other_form`, `skipped_inactive`, `source_error` or `budget_reached`, each with a plain-English `message`.

The **SUMMARY** record in the default key-value store lists the input, rows per state, skipped records, status counts, request counts and each dataset's licence. The dataset has views for Overview, Changes and Status rows.

### Monitor mode: only new or changed entities

Set `monitorMode` to `true` and schedule a saved task. The Actor remembers each entity's name, type, status, closed date, jurisdiction, addresses and NAICS code in the named key-value store `stateStoreName`, and returns only entities it hasn't returned before (`changeType: "new"`) or where one of those fields changed (`changeType: "updated"`, with `changedFields` and `previousValues`). In Look up mode, an entity it has seen before that drops out of its state's dataset gets a free `no_longer_listed` row; in New York and Oregon that usually means it is no longer active.

- `emitBaselineOnFirstRun` (default `true`) returns current matches on the first run. Set it to `false` to remember them silently, without charge, and get only later changes.
- Use a different `stateStoreName` for each separate watch list.

### Pricing

Pay per event:

| Event | Price |
|---|---|
| Entity record returned | $0.0025 |
| Alert run with new or updated entities (monitor mode only, once per run that returns at least one) | $0.01 |
| Actor start | $0.00005 |

Higher Apify plans get lower prices (shown on the Pricing tab). Status rows, skipped records, the SUMMARY record and monitor runs with nothing new are free of record and alert charges. Set **Maximum cost per run** in the run options: the Actor stops before going over it and adds a free `budget_reached` row.

### Data sources, licences and attribution

Every entity row carries its dataset's `dataset`, `licence`, `licenceUrl` and `attribution`, so you can keep the attribution when you reuse the data. Rows are normalised by this Actor (field names, status values, address clean-up), so they are modified from the original records.

| State | Source register (open dataset) | Licence or terms | Attribution line (in every row's `attribution`) |
|---|---|---|---|
| NY | New York State Department of State, [Active Corporations: Beginning 1800](https://data.ny.gov/d/n9v6-gdp6) (data.ny.gov) | [Open NY Terms of Use](https://data.ny.gov/download/77gx-ii52/application%2Fpdf): no set wording; we name the source | New York State Department of State |
| CO | Colorado Department of State, [Business Entities in Colorado](https://data.colorado.gov/d/4ykn-tg5h) (data.colorado.gov) | Public domain, [Colorado Information Marketplace terms](https://data.colorado.gov/terms): the State of Colorado disclaimer below must go with the data | `Colorado Department of State.` followed by the full State of Colorado disclaimer below |
| OR | Oregon Secretary of State, Corporation Division, [Active Businesses - ALL](https://data.oregon.gov/d/tckn-sxa6) (data.oregon.gov) | Public domain under [ORS 276A.368](https://oregon.public.law/statutes/ors_276a.368), [Oregon.gov terms](https://www.oregon.gov/pages/terms-and-conditions.aspx): no set wording; we name the source | Oregon Secretary of State, Corporation Division |
| CT | Connecticut Secretary of the State, [Connecticut Business Registry - Business Master](https://data.ct.gov/d/n7gp-d28j) (data.ct.gov) | Public domain, [data.ct.gov terms](https://data.ct.gov/terms): no set wording; we name the source | Connecticut Secretary of the State |

#### State of Colorado disclaimer

The State of Colorado requires this notice with its data, and every Colorado row carries it in `attribution`:

> The data made available here has been modified for use from its original source, which is the State of Colorado. THE STATE OF COLORADO MAKES NO REPRESENTATIONS OR WARRANTY AS TO THE COMPLETENESS, ACCURACY, TIMELINESS, OR CONTENT OF ANY DATA MADE AVAILABLE THROUGH THIS SITE. THE STATE OF COLORADO EXPRESSLY DISCLAIMS ALL WARRANTIES, WHETHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. The data is subject to change as modifications and updates are complete. It is understood that the information contained in the Web feed is being used at one's own risk.

### Company-level data only

This Actor returns company-level (entity-level) data only. Sole proprietorships, assumed business names (DBAs) and name reservations are skipped and never charged. Officer and owner names are never requested from the states. The registered agent is off by default; when you turn it on, it is added for New York and Colorado only when the agent is an organisation, and agent names that look like a person's are dropped, never returned. Business addresses are returned as the state publishes them, and for small entities they can be a home address.

### Limits

- **States:** New York, Colorado, Oregon and Connecticut only. The New York and Oregon datasets list active entities only, so dissolved entities there get `not_found`.
- **Look up:** up to 500 entities per run.
- **New filings:** `filedWithinDays` goes up to 366.
- **Records read per state:** outside monitor mode, at most 500 records beyond your per-state limit are read to fill it (skipped records count towards this); in monitor mode, at most 5,000 records per state per run. A free `scan_limit` row says when a run stopped early; narrow the name or use "starts with".
- **Pacing:** the portals are called without an app token, at most 2 requests a second per state, so large runs take time.
- **Freshness:** each state refreshes its dataset on its own schedule. New York can lag the Department of State by a few days and Oregon is refreshed about once a week, so the newest filings can appear later than on the state's website.

### Use it from code, spreadsheets or an AI agent

Run it with the Apify API or client libraries, schedule it, or connect it to Make, Zapier, Google Sheets or webhooks through Apify integrations. AI agents can call it through Apify's MCP server.

### FAQ

**Why don't New York and Oregon return dissolved entities?** Their open datasets list active entities only. An ID that isn't there gets a `not_found` row that says so; it may be inactive rather than non-existent. Use the state's own business search for its full history.

**How current is the data?** Each run reads the open datasets at that moment, but each state refreshes its dataset on its own schedule. The New York dataset can lag the Department of State by a few days, and the Oregon dataset is refreshed about once a week, so the newest filings can appear later than on the state's website.

**Why are registered agents off by default?** Many registered agents are individuals. When you turn the option on, New York and Colorado agents are added only when the agent is an organisation; named people are never returned. Oregon and Connecticut agents are not included.

**Why are officers and owners not included?** This Actor returns entity-level data only.

**Why are some entities missing from a search?** Sole proprietorships (CO), assumed business names (OR) and name reservations (CT, OR) are skipped and not charged, and the run says how many. Narrow the name or use "starts with" if you get `scan_limit`.

**Can I add another state?** Open an issue with the state you need. A state is added only if it publishes its business register as official open data that allows reuse.

**Can I do an LLC lookup by name?** Yes. Use `mode: "search"` with the name and pick "contains" or "starts with" matching. Rows include the entity type, so LLCs are easy to filter, and each row links to the state's own record.

**Is this the same data as the Secretary of State business search sites?** Rows come from each state's official open dataset of its business register, which the state refreshes on its own schedule (see *How current is the data?*). Each row links to the record and the dataset it came from.

### Feedback

Found a problem or need a state? Open an issue on the Issues tab.

# Changelog

This Actor's version history is a separate document: https://apify.com/yourevenings/us-state-business-entities/changelog.md

# Actor input Schema

## `mode` (type: `string`):

<b>Look up</b> returns the entities you list by state and ID. <b>Search</b> finds entities by name in each state's dataset. <b>New filings</b> lists entities formed or registered in a date range, newest first.

## `entities` (type: `array`):

For <b>Look up</b>: up to 500 entries as STATE:ID. NY = DOS ID, CO = 11-digit entity ID, OR = registry number, CT = business ID (account number). Unknown or invalid IDs get a free status row.

## `defaultState` (type: `string`):

For <b>Look up</b>: state to use for entries with no STATE: prefix.

## `name` (type: `string`):

For <b>Search</b>: the name or part of it (at least 2 letters or digits). Matching ignores case. Punctuation other than & . , ' - / is ignored.

## `nameMatch` (type: `string`):

For <b>Search</b>: <b>Starts with</b> is faster on large states.

## `states` (type: `array`):

For <b>Search</b> and <b>New filings</b>: which states to query. Empty = all four.

## `activeOnly` (type: `boolean`):

Leave out dissolved, revoked, withdrawn, merged or otherwise closed entities (CO and CT; the NY and OR datasets list active entities only). Entities that are not in good standing but still exist are kept. Closed rows are dropped before charging and counted in a free <code>skipped_inactive</code> row.

## `filedWithinDays` (type: `integer`):

For <b>New filings</b>: date range ending today. Ignored when 'Filed since' is set.

## `filedSince` (type: `string`):

For <b>New filings</b>: start date, YYYY-MM-DD.

## `filedUntil` (type: `string`):

For <b>New filings</b>: end date, YYYY-MM-DD. Default today.

## `includeRegisteredAgent` (type: `boolean`):

Off by default. When on, adds the registered agent's name and address for NY and CO, but only when the agent is an organisation (for example a registered-agent company). Agents who are named people are never returned.

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

Stop after this many entity records across all states. 0 means no limit. You are charged per entity record returned.

## `maxResultsPerState` (type: `integer`):

Stop each state after this many entity records. 0 means no limit.

## `monitorMode` (type: `boolean`):

Remember a fingerprint of each entity (name, type, status, closed date, jurisdiction, addresses, NAICS) and, on later runs, return only entities that are new or changed, with the changed fields and their old values. In Look up, an entity that drops out of a state's dataset gets a free <code>no_longer_listed</code> row.

## `emitBaselineOnFirstRun` (type: `boolean`):

Off: the first monitor run only records what exists (no rows, no charges).

## `stateStoreName` (type: `string`):

Named key-value store for monitor state. Use a different name per watch list.

## Actor input object example

```json
{
  "mode": "lookup",
  "entities": [
    "NY:4424185",
    "CO:18961000001",
    "OR:338616",
    "CT:0067276"
  ],
  "nameMatch": "contains",
  "activeOnly": false,
  "filedWithinDays": 7,
  "includeRegisteredAgent": false,
  "maxResults": 50,
  "maxResultsPerState": 25,
  "monitorMode": false,
  "emitBaselineOnFirstRun": true,
  "stateStoreName": "us-state-business-entities-monitor"
}
```

# Actor output Schema

## `overview` (type: `string`):

Overview view of the dataset.

## `changes` (type: `string`):

Monitor changes view of the dataset.

## `status` (type: `string`):

Status rows (free) view of the dataset.

## `summary` (type: `string`):

SUMMARY record: input, counts per state, skipped records, request counts and timings, and each dataset's licence.

# 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 = {
    "mode": "lookup",
    "entities": [
        "NY:4424185",
        "CO:18961000001",
        "OR:338616",
        "CT:0067276"
    ],
    "maxResults": 50,
    "maxResultsPerState": 25
};

// Run the Actor and wait for it to finish
const run = await client.actor("yourevenings/us-state-business-entities").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 = {
    "mode": "lookup",
    "entities": [
        "NY:4424185",
        "CO:18961000001",
        "OR:338616",
        "CT:0067276",
    ],
    "maxResults": 50,
    "maxResultsPerState": 25,
}

# Run the Actor and wait for it to finish
run = client.actor("yourevenings/us-state-business-entities").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 '{
  "mode": "lookup",
  "entities": [
    "NY:4424185",
    "CO:18961000001",
    "OR:338616",
    "CT:0067276"
  ],
  "maxResults": 50,
  "maxResultsPerState": 25
}' |
apify call yourevenings/us-state-business-entities --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,yourevenings/us-state-business-entities"
        }
    }
}
```

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/RwUAWY41f911TW7u7/builds/af6BlbKOXZ72h7LW7/openapi.json
