# Ny Realestate Agent Leads Scraper (`gocreative.ai/ny-realestate-agent-leads`) Actor

Active NY real-estate salesperson & broker licenses, pulled live from the NY Dept of State open-data API, not a fragile scrape. 148,000+ records, all 62 counties. Filter by county, city, ZIP, name, or license type. Includes a days-until-expiration / expiring-soon flag.

- **URL**: https://apify.com/gocreative.ai/ny-realestate-agent-leads.md
- **Developed by:** [GoCreative AI](https://apify.com/gocreative.ai) (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 $0.60 / 1,000 license leads

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## 🏠🗽 NY Real Estate Agent & Broker License Leads — Official State Data

![NY Real Estate Agent & Broker License Leads — filter by county/brokerage, get enriched license leads back](https://api.apify.com/v2/key-value-stores/1ztQFHwG8acESTazI/records/ny-realestate-hero.png)

**148,000+ active New York State real-estate salesperson and broker licenses, statewide, pulled live from the NY Department of State's own open-data API — not a fragile scrape of a login-free search form.** Filter by county, city, ZIP, name, brokerage, or license type. Every record ships with a person-vs-entity classification and a days-until-expiration / expiring-soon flag built in.

---

### Why this actor is different

The only two other NY real-estate license tools on the Store scrape the [NY DOS `eAccessNY` public search form](https://appext20.dos.ny.gov/nydos/selSearchType.do) one name at a time — slow, breaks whenever the state tweaks the form, and has no bulk/filtered pull. This actor instead queries NY's **official Socrata open-data endpoint** (`data.ny.gov`, dataset `x6eg-w668`) directly:

| | This actor | Search-form scrapers |
|---|---|---|
| Data source | First-party NY open-data REST API | Scraped HTML search form |
| Coverage | Statewide, all 62 counties, 148K+ active licenses | One name/license # per lookup |
| Bulk filtering | County / city / ZIP / name / brokerage / license type, server-side | Manual, one record at a time |
| Breakage risk | None — a public government API, not a UI it can change | Breaks whenever DOS updates the form |
| Renewal targeting | Built-in `expiring_soon` + `days_until_expiration` fields | Not available |
| Proxy/CAPTCHA needed | No | Depends on form protections |

No login, no CAPTCHA, no anti-bot handling of any kind — this is a clean REST integration against a dataset New York State publishes specifically for public reuse.

---

### What you get per record

- `license_holder_name`, `business_name` (brokerage), `license_type`
- `is_individual_license` — true for a person (salesperson/broker), false for an entity/office registration
- `is_broker` / `is_salesperson` — quick role filters
- `license_number`, `county`, full business address (`business_address_1/city/state/zip`, plus a combined `full_address`)
- `license_expiration_date`, `days_until_expiration`, `expiring_soon` — flag licenses coming up for renewal, a ready-made list for CE-course providers, brokerage recruiters, or E&O insurance outreach
- `source` — always states the origin dataset for audit trails

---

### How to use it

**Pull everything for a county (fastest way to build a territory list):**
```json
{ "counties": ["KINGS", "QUEENS"], "maxResults": 2000 }
````

**Find agents at a specific brokerage:**

```json
{ "businessNameContains": "COMPASS", "licenseTypes": ["REAL ESTATE SALESPERSON"] }
```

**Build a renewal-outreach list (licenses expiring in the next 60 days):**

```json
{ "expiringWithinDays": 60, "counties": ["NEW YORK"] }
```

**Search by name:**

```json
{ "nameContains": "SMITH", "maxResults": 200 }
```

Leave every filter empty to pull statewide (paginate across multiple runs — 5,000 record cap per run keeps each run fast and predictable).

***

### Real output example (live data, captured 2026-07-10)

```json
[
  {
    "license_holder_name": "Brisard Stephan",
    "business_name": "Compass",
    "license_type": "REAL ESTATE SALESPERSON",
    "is_individual_license": true,
    "is_broker": false,
    "is_salesperson": true,
    "license_number": "10401373778",
    "county": "KINGS",
    "business_address_1": "124 MONTAGUE ST",
    "business_city": "BROOKLYN",
    "business_state": "NY",
    "business_zip": "11201-3403",
    "full_address": "124 MONTAGUE ST, BROOKLYN, NY, 11201-3403",
    "license_expiration_date": "2027-02-09",
    "days_until_expiration": 214,
    "expiring_soon": false,
    "source": "NY Dept of State Open Data (data.ny.gov, dataset x6eg-w668)"
  },
  {
    "license_holder_name": "BURNS PATRICK OWEN JR",
    "business_name": "Compass",
    "license_type": "REAL ESTATE SALESPERSON",
    "is_individual_license": true,
    "is_broker": false,
    "is_salesperson": true,
    "license_number": "10401397031",
    "county": "KINGS",
    "business_address_1": "124 MONTAGUE ST",
    "business_city": "BROOKLYN",
    "business_state": "NY",
    "business_zip": "11201-3403",
    "full_address": "124 MONTAGUE ST, BROOKLYN, NY, 11201-3403",
    "license_expiration_date": "2027-07-16",
    "days_until_expiration": 371,
    "expiring_soon": false,
    "source": "NY Dept of State Open Data (data.ny.gov, dataset x6eg-w668)"
  }
]
```

The run summary (Key-Value Store → `summary`) gives you aggregate counts:

```json
{
  "total_records": 2000,
  "brokers": 612,
  "salespersons": 1388,
  "individual_licenses": 1841,
  "expiring_soon": 94,
  "counties_covered": ["KINGS", "QUEENS"],
  "source": "NY Dept of State Open Data (data.ny.gov, dataset x6eg-w668)"
}
```

***

### Pricing

Pay-Per-Result — you're charged only for license records actually returned, nothing for platform overhead. See the actor's **Pricing** tab for the current tiered rate; heavier usage tiers get a lower per-record price automatically.

***

### FAQ

**Is this legal?** Yes. This dataset is published by New York State's Department of State specifically as public open data for reuse — no authentication is bypassed and no protected system is accessed.

**Is the data current?** NY DOS updates the underlying dataset on an ongoing basis; this actor always queries it live, so results reflect the state's current published snapshot at run time — no stale cached copy.

**Does it cover license status history or disciplinary actions?** No — this dataset covers *active* licenses only (name, brokerage, address, license number/type, expiration). It does not include disciplinary/complaint history.

**Can I get all 148,000+ records in one run?** Each run caps at 5,000 records to keep runs fast and predictable. Split a full statewide pull across multiple runs by county (62 counties) or license type.

**Does this include email or phone?** No — the source dataset itself doesn't publish contact info. Pair this actor's `business_name`/`full_address` output with our [Google Maps Lead Extractor](https://apify.com/store) or [Website Contact & Email Extractor](https://apify.com/store) to enrich brokerage contacts.

***

### Other GoCreative data tools

- **[Website Contact & Email Extractor](https://apify.com/store)** — turn any brokerage URL into verified emails/phones
- **[Email Verifier — 8-Layer Deliverability Check](https://apify.com/store)** — validate a purchased or scraped list before you send
- **[Realtor.com Pro Leads](https://apify.com/store)** — active agent contacts sourced from Realtor.com

***

*Need help or have a feature request (another state's license board)? Contact support via the Apify actor messaging system.*

# Actor input Schema

## `counties` (type: `array`):

NY counties to include (e.g. NEW YORK, KINGS, NASSAU, SUFFOLK, WESTCHESTER, ERIE). Leave empty for all 62 counties.

## `cities` (type: `array`):

Business-registered cities to include (e.g. NEW YORK, BROOKLYN, BUFFALO, ALBANY). Leave empty for all cities.

## `licenseTypes` (type: `array`):

Restrict to specific license types. Leave empty for all types.

## `zipCodes` (type: `array`):

Business ZIP codes to include. Leave empty for all ZIP codes.

## `nameContains` (type: `string`):

Case-insensitive substring match on the licensee's name (e.g. "SMITH").

## `businessNameContains` (type: `string`):

Case-insensitive substring match on the registered business/brokerage name (e.g. "COMPASS", "KELLER WILLIAMS").

## `expiringWithinDays` (type: `integer`):

If set, only return licenses expiring within this many days from today — a ready-made renewal/CE-course outreach list. Leave empty to include all license statuses.

## `expiringSoonThresholdDays` (type: `integer`):

Every returned record gets an expiring\_soon boolean flag. This sets the day threshold for that flag (independent of the hard expiringWithinDays filter above).

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

Maximum number of license records to return this run (cap: 5,000). Split larger pulls across multiple runs/county filters.

## Actor input object example

```json
{
  "counties": [
    "NEW YORK",
    "KINGS",
    "QUEENS"
  ],
  "cities": [],
  "licenseTypes": [],
  "zipCodes": [],
  "nameContains": "",
  "businessNameContains": "",
  "expiringSoonThresholdDays": 90,
  "maxResults": 1000
}
```

# Actor output Schema

## `licenseRecords` (type: `string`):

No description

## `summary` (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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("gocreative.ai/ny-realestate-agent-leads").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("gocreative.ai/ny-realestate-agent-leads").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call gocreative.ai/ny-realestate-agent-leads --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=gocreative.ai/ny-realestate-agent-leads",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Ny Realestate Agent Leads Scraper",
        "description": "Active NY real-estate salesperson & broker licenses, pulled live from the NY Dept of State open-data API, not a fragile scrape. 148,000+ records, all 62 counties. Filter by county, city, ZIP, name, or license type. Includes a days-until-expiration / expiring-soon flag.",
        "version": "0.1",
        "x-build-id": "hziN38X69albwINai"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/gocreative.ai~ny-realestate-agent-leads/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-gocreative.ai-ny-realestate-agent-leads",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/gocreative.ai~ny-realestate-agent-leads/runs": {
            "post": {
                "operationId": "runs-sync-gocreative.ai-ny-realestate-agent-leads",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/gocreative.ai~ny-realestate-agent-leads/run-sync": {
            "post": {
                "operationId": "run-sync-gocreative.ai-ny-realestate-agent-leads",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "counties": {
                        "title": "Counties",
                        "type": "array",
                        "description": "NY counties to include (e.g. NEW YORK, KINGS, NASSAU, SUFFOLK, WESTCHESTER, ERIE). Leave empty for all 62 counties.",
                        "items": {
                            "type": "string"
                        },
                        "default": []
                    },
                    "cities": {
                        "title": "Cities",
                        "type": "array",
                        "description": "Business-registered cities to include (e.g. NEW YORK, BROOKLYN, BUFFALO, ALBANY). Leave empty for all cities.",
                        "items": {
                            "type": "string"
                        },
                        "default": []
                    },
                    "licenseTypes": {
                        "title": "License Types",
                        "type": "array",
                        "description": "Restrict to specific license types. Leave empty for all types.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "REAL ESTATE SALESPERSON",
                                "INDIVIDUAL BROKER",
                                "ASSOCIATE BROKER",
                                "PARTNERSHIP BROKER",
                                "CORPORATE BROKER",
                                "LIMITED LIABILITY BROKER",
                                "TRADENAME BROKER",
                                "REAL ESTATE BRANCH OFFICE",
                                "REAL ESTATE PRINCIPAL OFFICE"
                            ]
                        },
                        "default": []
                    },
                    "zipCodes": {
                        "title": "ZIP Codes",
                        "type": "array",
                        "description": "Business ZIP codes to include. Leave empty for all ZIP codes.",
                        "items": {
                            "type": "string"
                        },
                        "default": []
                    },
                    "nameContains": {
                        "title": "License Holder Name Contains",
                        "type": "string",
                        "description": "Case-insensitive substring match on the licensee's name (e.g. \"SMITH\").",
                        "default": ""
                    },
                    "businessNameContains": {
                        "title": "Business/Brokerage Name Contains",
                        "type": "string",
                        "description": "Case-insensitive substring match on the registered business/brokerage name (e.g. \"COMPASS\", \"KELLER WILLIAMS\").",
                        "default": ""
                    },
                    "expiringWithinDays": {
                        "title": "Only Licenses Expiring Within N Days",
                        "type": "integer",
                        "description": "If set, only return licenses expiring within this many days from today — a ready-made renewal/CE-course outreach list. Leave empty to include all license statuses."
                    },
                    "expiringSoonThresholdDays": {
                        "title": "\"Expiring Soon\" Flag Threshold (days)",
                        "minimum": 1,
                        "maximum": 365,
                        "type": "integer",
                        "description": "Every returned record gets an expiring_soon boolean flag. This sets the day threshold for that flag (independent of the hard expiringWithinDays filter above).",
                        "default": 90
                    },
                    "maxResults": {
                        "title": "Max Results",
                        "minimum": 1,
                        "maximum": 5000,
                        "type": "integer",
                        "description": "Maximum number of license records to return this run (cap: 5,000). Split larger pulls across multiple runs/county filters.",
                        "default": 1000
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
