# New York Company Registry Scraper — DOS Active Corporations (`ai-lead-gen-tools/us-ny-dos`) Actor

Search New York State's active corporations by name or DOS ID, or stream every new registration since a date. Returns normalized records: current entity name, entity type, DOS ID, formation date, county, jurisdiction and DOS process address. Public Socrata API (data.ny.gov), no proxy needed.

- **URL**: https://apify.com/ai-lead-gen-tools/us-ny-dos.md
- **Developed by:** [Vladimir Chernykh](https://apify.com/ai-lead-gen-tools) (community)
- **Categories:** Lead generation, Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.80 / 1,000 company scrapeds

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

## New York Company Registry Scraper — DOS Active Corporations

Look up any active business entity registered with the **New York Department of State** and export clean, normalized records — legal name, entity type, DOS ID, jurisdiction, formation date, county and the address the state mails process to.

The source is the state's own **public JSON API** (`data.ny.gov`, dataset `n9v6-gdp6`). No login, no cookies, no proxies, no captchas — which is why a run of a thousand companies takes a few seconds.

### What you get

One row per entity. Every field is always present; `null` means the registry does not publish it.

| Field | Example |
|---|---|
| `name` / `legalName` | BUTCHY'S WINE & SPIRITS, INC. |
| `entityType` | DOMESTIC BUSINESS CORPORATION |
| `sourceId` | 4424185 (DOS ID) |
| `jurisdiction` | New York |
| `formationDate` | 2013-06-27 |
| `status` | ACTIVE |
| `mailingAddress` | 23 SPRING STREET, OSSINING, NY 10562 |
| `registeredAgent` | name + the same process address |
| `lastEvent` | Registered in Westchester County |
| `filingHistory` | initial DOS filing date |
| `sourceUrl` | link back to the source row |

Output is available as JSON, CSV or Excel from the dataset tab.

### Two ways to use it

**1. Search by name or DOS ID** — paste terms into **Search terms** and run. That is the whole setup.

```json
{
  "mode": "search",
  "searchTerms": ["TESLA", "STRIPE"],
  "maxResults": 100
}
```

If you already know the entity number, `"dosIds": ["4424185"]` is faster — one request, no name matching.

**2. New-registrations feed** — set `mode` to `new` and put the actor on a schedule.

```json
{
  "mode": "new",
  "sinceDays": 7,
  "maxResults": 1000
}
```

Each run returns only entities filed **after** the previous run's cursor, newest first. It remembers what it already sent, so you are never charged twice for the same company. This is the setup for lead generation and compliance monitoring.

| Input | Default | Notes |
|---|---|---|
| `mode` | `search` | `new` = incremental filings feed |
| `searchTerms` | `["TESLA"]` | names or fragments, 2–80 characters |
| `dosIds` | `[]` | exact DOS entity numbers |
| `maxResults` | `100` | hard cap on saved records |
| `sinceDays` | `7` | lookback window on the first `new` run |
| `sinceDate` | — | explicit `YYYY-MM-DD` start date |
| `maxPagesPerTerm` | `10` | paging cap per term (1000 rows per page) |
| `includeRaw` | `false` | attach the untouched source JSON |
| `maxConcurrency` | `3` | parallel requests |

### What New York does not publish

The dataset covers active entities only, and it is deliberately shallow. Be aware before buying:

- **No officers or directors** — the registry publishes the process address, not the people.
- **No EIN or document number** other than the DOS ID.
- **No status field** — every row in this dataset is active by definition, so `status` is always `ACTIVE` and `statusDate` is `null`.
- **No filing history** beyond the initial filing date.
- **No principal address** — only the address DOS mails process to. It fills `mailingAddress`; repeating it in `principalAddress` would imply a distinction the data does not make.

If you need officers and full history, that is a different (and much more heavily protected) source; this actor does not pretend otherwise.

### Broad searches

The API returns at most 1000 rows per request. A very broad term such as `"A"` matches hundreds of thousands of entities, so paging is capped by `maxPagesPerTerm` (10 pages = 10 000 rows by default). When a term hits that cap the run keeps going and the summary reports `truncated: true` — narrow the term, or raise the cap.

### Cost

**$2 per 1 000 companies**, plus a one-off $0.00005 for starting the run.

You pay only for records that land in the dataset. Because the actor charges on saved rows, a search that returns nothing costs you the start fee and nothing more. In `new` mode a quiet week can legitimately produce zero records — and zero charge.

Check the **Pricing** tab of this Actor for the current price before running at scale.

### Notes

- Data comes straight from `data.ny.gov`; `sourceUrl` on every record lets you verify it.
- No proxy is used, so there is no proxy cost passed on to you.
- The state updates the dataset continuously; `scrapedAt` tells you when this actor read it.

# Actor input Schema

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

"search" looks entities up by the terms and IDs you provide. "new" ignores them and returns entities filed after the last run — put the actor on a schedule and you get a new-registrations feed.

## `searchTerms` (type: `array`):

Company names or fragments. Matching is case-insensitive and finds the term anywhere in the name, so "TESLA" also returns "TESLA MOTORS LLC". Minimum 2 characters.

## `dosIds` (type: `array`):

Exact Department of State entity numbers, e.g. "4424185". Fastest path: one request per ID, no name matching.

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

Hard cap on the number of company records saved to the dataset. Each saved record is charged.

## `sinceDays` (type: `integer`):

Used in "new" mode when no explicit start date is set: how many days to look back on the first run. Later runs continue from the cursor saved in the key-value store.

## `sinceDate` (type: `string`):

Explicit start date in "new" mode, format YYYY-MM-DD. Leave empty to use the saved cursor, or the window above on the first run.

## `maxPagesPerTerm` (type: `integer`):

The source returns at most 1000 rows per request. This caps how many pages a single term may page through, so a very broad term cannot run away.

## `includeRaw` (type: `boolean`):

Attach the untouched JSON row to every record under the `raw` field. Useful for auditing, roughly doubles the dataset size.

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

Parallel requests to the state's API. Keep it modest to stay polite to a public dataset.

## `requestTimeoutSecs` (type: `integer`):

Per-request timeout before a retry is attempted.

## `runBudgetSecs` (type: `integer`):

How long this run may take before it stops and returns what it has. Leave it empty (recommended) and the run uses the whole timeout you set for it. Set a number only to stop earlier. Stopping early is not a failure: the run summary reports it and you get the records found so far.

## `proxyConfiguration` (type: `object`):

Not needed: the dataset is a public JSON API and answers directly from Apify. Enable only if you have a specific reason to route the traffic.

## Actor input object example

```json
{
  "mode": "search",
  "searchTerms": [
    "TESLA"
  ],
  "maxResults": 100,
  "sinceDays": 7,
  "maxPagesPerTerm": 10,
  "includeRaw": false,
  "maxConcurrency": 3,
  "requestTimeoutSecs": 30,
  "runBudgetSecs": 205,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

One row per company. Every field is always present — values New York does not publish are null, never omitted, so the column set is stable between runs. See the Companies tab for the full table.

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

Counters for the run: records pushed, rows read from the dataset, duplicates and records skipped as already seen, API requests and failures, whether the result was truncated, the incremental cursor, and how many charge events were emitted.

# 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 = {
    "searchTerms": [
        "TESLA"
    ],
    "runBudgetSecs": 205
};

// Run the Actor and wait for it to finish
const run = await client.actor("ai-lead-gen-tools/us-ny-dos").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 = {
    "searchTerms": ["TESLA"],
    "runBudgetSecs": 205,
}

# Run the Actor and wait for it to finish
run = client.actor("ai-lead-gen-tools/us-ny-dos").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 '{
  "searchTerms": [
    "TESLA"
  ],
  "runBudgetSecs": 205
}' |
apify call ai-lead-gen-tools/us-ny-dos --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,ai-lead-gen-tools/us-ny-dos"
        }
    }
}
```

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/co2vo7wObxp1RJrAk/builds/ld7KkqET4SMxXlS3d/openapi.json
