# New York Attorney Register: Newly Admitted Attorneys & Firms (`groundplanes/state-bar-newly-admitted-attorney-scraper`) Actor

Scrape official New York State Unified Court System attorney registrations via the Socrata SODA API on data.ny.gov. Filter by admission year, registration status, state/country of practice, and firm keyword.

- **URL**: https://apify.com/groundplanes/state-bar-newly-admitted-attorney-scraper.md
- **Developed by:** [Groundplane Labs](https://apify.com/groundplanes) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.10 / 1,000 attorney records

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 Attorney Register: Newly Admitted Attorneys & Practice Directory Scraper

Extract official New York State attorney registration records directly from the New York State Unified Court System dataset on data.ny.gov via the Socrata SODA Open Data API. Filter by admission year, current registration status, practice jurisdiction, and law firm or corporate employer keywords.

### What Data Does It Collect?

For each registered attorney, the scraper retrieves complete public registration details:

- **Registration Identifiers**: Official NYS Unified Court System attorney registration number (`registrationNumber`), bar admission year (`yearAdmitted`), and Appellate Division Judicial Department of admission (`judicialDepartmentOfAdmission`).
- **Attorney Name**: First name, middle name or initial, and last name / surname.
- **Law Practice & Employer**: Law firm, government agency, corporate legal department, or professional practice organization name (`lawFirmOrCompanyName`).
- **Office Address of Record**: Street address, city, state, zip code (including 4-digit extension), and country.
- **Published Contact Info**: Official business phone number of record (only as published in the official register).
- **Education & Credentials**: Law school from which the attorney graduated (`lawSchoolAttended`).
- **Registration Lifecycle**: Current status (`Currently registered`, `Delinquent`, `Suspended, delinquent`), next registration renewal month and year (`nextRegistrationMonthYear`), and official dataset update timestamp (`datasetUpdatedDate`). Status values must match the register exactly: the register has no bare `Suspended` value, and a status the register does not use returns zero rows.

> **Note on Data Scope & Cadence**: This dataset is sourced directly from the official NYS Unified Court System attorney registration roll (`eqw2-r5nb`) and is updated quarterly by the state court administration (posting frequency: Quarterly, per the dataset's own metadata). In compliance with court publication policy, this register contains public attorney directory data and does not contain disciplinary records. The register publishes no email column at all, so this actor's output has no email field: the draft spec's combined email-or-phone filter resolves to `onlyWithBusinessPhone`, and phone and address ship only exactly as published.

### Key Features

- **SoQL Server-Side Query Execution**: Leverages Socrata SODA `$where` filtering, minimizing network bandwidth and eliminating client-side memory bloat.
- **Comprehensive Admission Year Filtering**: Target newly admitted attorneys (e.g. 2025 to 2026 cohorts) for mandatory CLE outreach and legal software onboarding.
- **Multi-Jurisdiction Support**: Filter across US states (e.g. `NY`, `NJ`, `CA`, `DC`) and international jurisdictions where NY-admitted attorneys practice.
- **Optional App Token Support**: Supports buyer-supplied Socrata App Tokens (`X-App-Token`) for high-volume enterprise runs, while running keyless under default public limits.

### Input Configuration

| Parameter | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| `admissionYearFrom` | Integer | `2025` | Earliest bar admission year to include (e.g. `2025`). |
| `admissionYearTo` | Integer | `2026` | Latest bar admission year to include (e.g. `2026`). |
| `registrationStatuses` | Array | `["Currently registered"]` | Filter by registration status, exactly as published (e.g. `Currently registered`, `Delinquent`, `Suspended, delinquent`, `Deceased`). |
| `statesOrCountriesOfPractice` | Array | `["NY", "NJ", "CA", "DC", "FL"]` | Filter by US state codes or country names. Leave empty for all jurisdictions. |
| `companyOrLawFirmKeyword` | String | `""` | Case-insensitive keyword filter for employer or firm name (e.g. `LLP`, `Skadden`, `District Attorney`). |
| `onlyWithBusinessPhone` | Boolean | `false` | When true, filters exclusively for attorney records with a published office phone number. |
| `socrataAppToken` | String (Secret) | `""` | Optional personal Socrata SODA API token (`X-App-Token`). Operates keyless when blank. |
| `maxItems` | Integer | `2000` | Maximum number of attorney records to return. |
| `pageSize` | Integer | `1000` | Rows requested per Socrata API call during the paging walk (per-call limit, not a total). Lower it only for troubleshooting; the total returned is still governed by `maxItems`. Range 1 to 50000. |

### Sample Output

```json
{
  "registrationNumber": "4924791",
  "firstName": "AMANDA",
  "middleName": "MICHELE",
  "lastName": "PARDEE",
  "lawFirmOrCompanyName": "PAYJOY, INC.",
  "streetAddress": "655 4TH ST",
  "city": "SAN FRANCISCO",
  "state": "CA",
  "zip": "94107-1601",
  "country": "UNITED STATES OF AMERICA",
  "businessPhone": "(408) 455-6781",
  "yearAdmitted": 2025,
  "judicialDepartmentOfAdmission": 1,
  "lawSchoolAttended": "Harvard Law School",
  "registrationStatus": "Currently registered",
  "nextRegistrationMonthYear": "Mar 2027",
  "datasetUpdatedDate": "2026-11-02"
}
```

### Labeled Canary Input

```json
{
  "admissionYearFrom": 2025,
  "admissionYearTo": 2026,
  "companyOrLawFirmKeyword": "PAYJOY",
  "maxItems": 10
}
```

Expected result (verified live against the 2026-11-02 dataset update): `Complete: 1 attorney registrations delivered. (scanned 1, emitted 1, total in register 1)`. The single row is registration number 4924791, the same row shown in the sample output above. Counts can change at the next quarterly dataset update; the canary still passes as long as the status is Complete and scanned, emitted, and total agree.

### Troubleshooting

- **Stale data**: the register updates quarterly, not in real time. Every row carries `datasetUpdatedDate`, the dataset's own last-updated date, so you can judge freshness yourself. A newly admitted attorney appears only after the next quarterly publication.
- **Zero matches**: a `Complete: 0 attorney registrations matched your filters` status is a success, not an error. The usual cause is a filter value the register does not use, for example a registration status spelled differently from the published value (there is no bare `Suspended` status), or a 2-letter jurisdiction code that is not a US state code.
- **Caps and PARTIAL statuses**: reaching `maxItems` or the run charge limit ends the run with a PARTIAL status that names the cap; raise the limit to get more rows. A PARTIAL caused by the source itself (Socrata throttling on keyless runs, rows the source counted but did not return, unparseable records) says so and carries the Issues line below. Supplying your own Socrata app token raises the throttling limits.
- **Throttling**: keyless runs share Socrata's public rate limits. On a 429 the actor retries with backoff (6 tries, Retry-After honored); if the limit persists it returns the rows already fetched with an honest PARTIAL instead of losing them silently.

If this keeps happening, please open an issue on this actor's Issues tab and we'll fix it fast.

### Use Cases

- **Continuing Legal Education (CLE) Providers**: Identify newly admitted attorneys approaching mandatory New York State biennial CLE deadlines.
- **LegalTech & Practice Management SaaS**: Target new partners and solo practitioners setting up office infrastructure.
- **Legal Recruitment & Talent Intelligence**: Track associate movements across AmLaw 100 firms and boutique practices.
- **Professional Liability Insurers**: Underwrite and market legal malpractice insurance to newly admitted practitioners.

### Changelog

- **0.1.2 (2026-11-02, Red Team fix round 1)**: reconciliation now fails closed: a count query that fails, or returns an empty, missing, or unparseable count, ends the run PARTIAL with the reason stated instead of Complete. Jurisdiction tokens that match neither a US state code nor a country name (for example a single character, or an empty token) are now input errors instead of being silently dropped and widening the run. A payload-level sentinel now checks the data response itself (the `X-SODA2-Fields` header, with a per-page aggregate fallback): a core column absent from the payload fails the run loudly naming the column, on any page. `rowsUpdatedAt` handling hardened: an 8-digit value is read as a YYYYMMDD date, never as a 1970 epoch date, and a missing value fails loudly instead of nulling `datasetUpdatedDate` silently. Parsed integer fields no longer round fractional values, and `judicialDepartmentOfAdmission` is validated against its documented 1 to 4 domain. The `pageSize` input is now documented in the input schema and the input table above, and non-string items in list inputs are rejected as input errors instead of being stringified.
- **0.1.1 (2026-11-02, CEO review fixes)**: build tag corrected to `audit`. All Socrata calls now use the fleet retry standard (6 tries, jittered 2-32s backoff, 120s budget, Retry-After honored, including HTTP-date values). Core-column sentinel expanded to every filter, dedupe, and headline column. Delivered rows are reconciled against the source count query: a truncated walk, duplicate registration numbers, or skipped records now report an honest PARTIAL instead of Complete, and delivering exactly `maxItems` rows when no more exist reports Complete. A present-but-unparseable parsed field (for example a judicial department in text form) now fails the row loudly instead of shipping null. Input errors fail cleanly with no traceback, and an unknown 2-letter jurisdiction code is rejected instead of silently matching zero rows. Registration status examples corrected to values the register actually publishes.
- **0.1 (2026-11-02)**: initial build. Pinned to the canonical dataset `eqw2-r5nb`; the draft ID `c2ea-4474` is retired (404) and the draft's three community view IDs are never queried. No `businessEmail` field: the register publishes no email column.

# Actor input Schema

## `admissionYearFrom` (type: `integer`):

Earliest bar admission year to include (e.g. 2025).

## `admissionYearTo` (type: `integer`):

Latest bar admission year to include (e.g. 2026).

## `companyOrLawFirmKeyword` (type: `string`):

Filter by keyword in firm or organization name (case-insensitive).

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

Maximum number of attorney registration records to return.

## `pageSize` (type: `integer`):

Rows requested per Socrata API call during the paging walk (per-call limit, not a total). Lower it only for troubleshooting; the total returned is still governed by maxItems.

## `onlyWithBusinessPhone` (type: `boolean`):

Filter for attorney records that contain an official business telephone number of record.

## `registrationStatuses` (type: `array`):

Filter by attorney registration status as published (e.g. Currently registered, Delinquent, Suspended, delinquent, Deceased). Values must match the register exactly; a value the register does not use returns zero rows.

## `socrataAppToken` (type: `string`):

Optional user Socrata SODA API App Token (X-App-Token). Keyless runs operate under default Socrata rate limits.

## `statesOrCountriesOfPractice` (type: `array`):

Filter by US 2-letter state code (e.g. NY, NJ) or country name. Leave empty to query all jurisdictions.

## Actor input object example

```json
{
  "admissionYearFrom": 2025,
  "admissionYearTo": 2026,
  "companyOrLawFirmKeyword": "",
  "maxItems": 2000,
  "pageSize": 1000,
  "onlyWithBusinessPhone": false,
  "registrationStatuses": [
    "Currently registered"
  ],
  "statesOrCountriesOfPractice": [
    "NY",
    "NJ",
    "CA",
    "DC",
    "FL"
  ]
}
```

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

// Run the Actor and wait for it to finish
const run = await client.actor("groundplanes/state-bar-newly-admitted-attorney-scraper").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("groundplanes/state-bar-newly-admitted-attorney-scraper").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 '{}' |
apify call groundplanes/state-bar-newly-admitted-attorney-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,groundplanes/state-bar-newly-admitted-attorney-scraper"
        }
    }
}
```

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/9evNeL4RbDDsggFhf/builds/un8n5IL1eaYsMguNa/openapi.json
