# NZ Doctor Register Scraper (`crawlerbros/nz-doctor-register-scraper`) Actor

Search and browse the Medical Council of New Zealand (MCNZ) public Register of Doctors - filter by name, town/city, specialty, and registration status.

- **URL**: https://apify.com/crawlerbros/nz-doctor-register-scraper.md
- **Developed by:** [Crawler Bros](https://apify.com/crawlerbros) (community)
- **Categories:** Agents, Automation, Jobs
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## NZ Doctor Register Scraper

Search and browse the **Medical Council of New Zealand (MCNZ) public Register of Doctors** — the official government register of every doctor licensed to practise medicine in New Zealand. Filter by name, town/city, specialty (vocational scope), and registration status to get structured, ready-to-use records: name, previous name, practice location, specialty, current registration status, and practising-certificate expiry date.

No login, no API key, no cookies required — this actor reads MCNZ's public register pages directly.

### What this actor does

- **Free-text name search** — find a doctor by current or previous name (MCNZ's search also does phonetic matching, e.g. `smith` can surface `smyth`)
- **Browse without a name** — filter purely by location, specialty, and/or status to pull segments of the register (e.g. every practising GP in Wellington)
- **182 New Zealand towns/cities** and **36 medical specialties** available as dropdowns — no guessing at spelling
- **4 registration statuses**: Practising, Not Practising, Inactive, Suspended
- **Automatic pagination** up to your requested `maxItems`
- **Clean output** — every field is either a real value or omitted entirely; no `null`/`"N/A"` placeholders

### Output per doctor

| Field | Description |
|---|---|
| `fullName` | Doctor's current registered name (e.g. `Smith, David`) |
| `previouslyKnownAs` | Previous registered name, if MCNZ records one |
| `location` | Recorded practice town/city, if published |
| `specialty` | Recorded vocational scope / specialty area, if any |
| `registrationStatus` | `Practising`, `Not Practising`, `Inactive`, or `Suspended` |
| `certificateExpiryDate` | Practising-certificate expiry date (ISO `YYYY-MM-DD`), if shown |
| `profileUrl` | Canonical MCNZ register URL for this doctor |
| `recordType` | Always `"doctor"` |
| `scrapedAt` | UTC timestamp the record was collected |

Only fields MCNZ actually publishes for that doctor are included — for example, doctors with no recorded location simply omit `location` rather than showing a placeholder.

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `keyword` | string | `smith` | Free-text name / previous-name search. Leave blank to browse using only the filters below. |
| `location` | select | *(all)* | Restrict to a specific New Zealand town/city (182 options) |
| `specialty` | select | *(all)* | Restrict to a specific vocational scope / specialty (36 options) |
| `status` | select | *(all)* | Restrict to `Practising`, `Not Practising`, `Inactive`, or `Suspended` |
| `maxItems` | integer | `50` | Hard cap on the number of records returned (1–1000) |

#### Example: browse practising GPs in Auckland

```json
{
  "location": "auckland",
  "specialty": "general-practice",
  "status": "practising",
  "maxItems": 100
}
```

#### Example: name search across the whole register

```json
{
  "keyword": "wilson",
  "maxItems": 50
}
```

#### Example: every suspended doctor nationwide

```json
{
  "status": "suspended",
  "maxItems": 200
}
```

### Use cases

- **Employer due diligence** — verify a doctor's current registration status before hiring or credentialing
- **Healthcare directories** — build location- or specialty-based doctor directories for patients
- **Compliance & research** — monitor suspended/inactive practitioners or track specialty distribution by region
- **Recruitment** — find practising doctors in a target specialty and city for outreach
- **Data journalism** — analyse the geographic or specialty spread of New Zealand's medical workforce

### FAQ

**Is this official data?** Yes — everything comes directly from the Medical Council of New Zealand's public register, the statutory authority responsible for registering doctors in New Zealand.

**Does this cover doctors outside New Zealand?** No, this actor is specific to MCNZ's Register of Doctors (New Zealand only).

**Why is `location` sometimes missing?** Not every doctor has a published practice location on the public register (e.g. some records show "Not available"). The actor omits the field rather than inventing a value.

**Can I search by registration number instead of name?** The `keyword` field searches MCNZ's name index; it is optimized for names (including phonetic matches) rather than registration numbers.

**Does the actor visit individual doctor profile pages?** No. MCNZ's `robots.txt` explicitly disallows crawling individual doctor profile pages, so this actor only reads the public search/browse listing (which is not restricted) and returns the fields shown there. The `profileUrl` field links to the doctor's full profile on mcnz.org.nz for reference.

**How often is the register updated?** MCNZ updates the public register continuously; the actor always reads the live page, so results reflect the current register at run time.

**What if my filters return zero doctors?** The actor finishes cleanly with 0 records and a status message — no error — so you can safely automate broad filter sweeps.

**Why do I only get 1000 records even though MCNZ says there are more matches?** MCNZ's own register never serves more than 1000 cumulative results for any single query, no matter how many total matches it reports (e.g. it may say "10,000 doctors" while still refusing to serve past the first 1000). This is a limit on MCNZ's side, not this actor. To reach doctors beyond the first 1000 matches, narrow your search with the `location`, `specialty`, and/or `status` filters (or a more specific `keyword`) so each individual run's match count stays under 1000.

# Actor input Schema

## `keyword` (type: `string`):

Free-text search across doctor names (first, last, previous names). Leave blank to browse using only the filters below.

## `location` (type: `string`):

Restrict results to doctors whose recorded practice location matches this New Zealand town or city.

## `specialty` (type: `string`):

Restrict results to doctors registered in this vocational scope / specialty area.

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

Restrict results to doctors with this current registration status.

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

Hard cap on the number of doctor records emitted in this run. MCNZ's own register never serves more than 1000 results for a single query, regardless of how many total matches it reports — narrow the location/specialty/status filters to reach doctors beyond the first 1000 matches.

## Actor input object example

```json
{
  "keyword": "smith",
  "location": "auckland",
  "specialty": "",
  "status": "practising",
  "maxItems": 20
}
```

# Actor output Schema

## `doctors` (type: `string`):

Dataset containing all scraped MCNZ doctor register entries.

# 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 = {
    "keyword": "smith",
    "location": "auckland",
    "specialty": "",
    "status": "practising",
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("crawlerbros/nz-doctor-register-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 = {
    "keyword": "smith",
    "location": "auckland",
    "specialty": "",
    "status": "practising",
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("crawlerbros/nz-doctor-register-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 '{
  "keyword": "smith",
  "location": "auckland",
  "specialty": "",
  "status": "practising",
  "maxItems": 20
}' |
apify call crawlerbros/nz-doctor-register-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,crawlerbros/nz-doctor-register-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/vBUGBdwJPXNmyJzUu/builds/w7FaHIRRin2vaWauD/openapi.json
