# Doctoralia Scraper - Doctors, Clinics & Provider Leads (`scrapesage/doctoralia-scraper`) Actor

Scrape Doctoralia / DocPlanner for doctors, dentists, specialists & clinics by specialty and city: full profiles with phone, clinic address + geo, services & prices, insurances, languages, rating, reviews & a lead score. Monitoring mode. No login, no API key, no browser.

- **URL**: https://apify.com/scrapesage/doctoralia-scraper.md
- **Developed by:** [Scrape Sage](https://apify.com/scrapesage) (community)
- **Categories:** Lead generation, Automation, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 provider scrapeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## Doctoralia Scraper — Doctors, Clinics & Provider Leads (Phones, Prices, Insurances & Reviews)

Extract **complete doctor & clinic data from Doctoralia / DocPlanner** — the world's largest medical-booking directory (Brazil, Mexico, Spain, Italy, Poland, Argentina, Colombia, Chile, Peru and more). Every record ships with the **specialty, clinic address with map coordinates, phone, consultation services & prices, accepted insurances, languages, star rating, review count and a 0–100 lead score** — turning a public provider directory into a clean, ready-to-use **healthcare B2B lead list**.

No login, no cookies, no browser — fast JSON-LD + HTML extraction with automatic retry on transient blocks.

### Why this Doctoralia scraper?

Most "doctor lead" tools scrape a maps app and hand you a name and a phone number. This actor pulls every field Doctoralia exposes — pricing, insurances, full clinic geo, patient reviews — and ships the richest dataset in the category:

| Data | Maps-based lead tools | This actor |
|---|---|---|
| Doctor / clinic name + specialty | partial | ✅ |
| Phone | ✅ | ✅ |
| Consultation **services + prices** | ❌ | ✅ |
| Accepted **insurances / payment methods** | ❌ | ✅ |
| All clinic locations + **map coordinates** | partial | ✅ |
| Star rating + review count | ✅ | ✅ |
| Patient **review text** (rating, date, body, doctor reply) | ❌ | ✅ opt-in |
| "About" bio, languages, online-booking flag, verified badge | ❌ | ✅ |
| Clinic-website **email/phone/social** enrichment | ❌ | ✅ opt-in |
| Lead score (0–100) | ❌ | ✅ |
| Monitoring mode (only new providers) | ❌ | ✅ |

### Use cases

- **Healthcare lead generation** — doctors, dentists and clinics are high-value buyers for medical devices, pharma, practice-management software, EHRs, billing, marketing and insurance. Filter by specialty, city, rating and price and reach them directly with the **phone** (and, with enrichment, **email**).
- **Sales prospecting for medtech & health SaaS** — build targeted lists of specialists by city and specialty for booking, telemedicine, CRM and patient-engagement tools.
- **Market & pricing intelligence** — track consultation prices, accepted insurances, ratings and review velocity by specialty and city across countries.
- **Recruiting & staffing** — find practitioners and clinics by location and specialty for hiring or locum placement.
- **Directory & data enrichment** — append specialty, clinic, geo, pricing and contact data to an existing list of providers.

### How to use

1. [Sign up for Apify](https://console.apify.com/sign-up) — the free plan is enough to try this actor.
2. Open the **Doctoralia Scraper**, pick a **country**, enter specialties (e.g. `cardiologista`) and cities (e.g. `sao-paulo`), and click **Start**.
3. Watch providers stream into the dataset table.
4. **Export** as JSON, CSV, Excel, XML, or RSS — or pull results programmatically via the [Apify API](https://docs.apify.com/api/v2).

### Input

```json
{
    "mode": "search",
    "country": "br",
    "specialties": ["cardiologista", "dermatologista"],
    "locations": ["sao-paulo", "rio-de-janeiro"],
    "maxResults": 200,
    "includeProfileDetails": true,
    "includeReviews": false,
    "enrichContactEmails": false,
    "withPhoneOnly": true,
    "monitorMode": false
}
````

- **mode** — `search` (specialties × locations) or `startUrls` (paste Doctoralia URLs).
- **country** — which Doctoralia / DocPlanner site to use: `br`, `mx`, `es`, `it`, `pl` (znanylekarz.pl), `ar`, `co`, `cl`, `pe`, `ec`, `pt`. Use specialty/city terms in **that country's language**.
- **specialties** — one per row, in the site's language: Brazil `cardiologista`, `dermatologista`, `ginecologista`, `psicologo`, `dentista`; Spain/Mexico `cardiologo`, `dermatologo`, `ginecologo`, `psicologo`, `dentista`. Plain names are auto-slugified.
- **locations** — cities, one per row (`sao-paulo`, `madrid`, `ciudad-de-mexico`). Plain `São Paulo` is auto-slugified.
- **startUrls** — Doctoralia listing URLs (`…/{specialty}/{city}`) or profile URLs (`…/{doctor}/{specialty}/{city}`). Auto-detected and routed.
- **maxResults** — cap on providers for the whole run (listings paginate automatically).
- **includeProfileDetails** *(default true)* — open each profile for phone, all clinic locations + geo, services & prices, insurances, languages, online-booking flag and bio. One extra request per provider.
- **includeReviews** *(default false)* — also output patient review records (rating, author, date, text, doctor reply).
- **enrichContactEmails** *(default false)* — when a provider lists a clinic website, crawl it for emails, phones and socials. Doctoralia itself never publishes emails — this is the way to get them.
- **withPhoneOnly / withEmailOnly / minRating** — output filters.
- **monitorMode** *(default false)* — emit ONLY providers (and reviews) not seen in previous runs. Pairs with Apify Schedules.

### Output

One record per provider (`type: "provider"`), plus optional patient review records (`type: "review"`):

```json
{
    "type": "provider",
    "providerId": "luciano-melo-atanes",
    "name": "Luciano Melo Atanes",
    "title": "Dr.",
    "fullName": "Dr. Luciano Melo Atanes",
    "profileUrl": "https://www.doctoralia.com.br/luciano-melo-atanes/cardiologista/sao-paulo",
    "specialties": ["Cardiologista", "Médico clínico geral"],
    "rating": 5,
    "reviewCount": 121,
    "phone": "(11) 93213-7572",
    "clinicName": "Consultório Dr. Luciano Atanes — Unidade Brigadeiro",
    "fullAddress": "R. Cincinato Braga 340, São Paulo, 01333-011",
    "city": "São Paulo",
    "region": "São Paulo SP",
    "latitude": -23.5679798,
    "longitude": -46.6459541,
    "locationCount": 3,
    "services": [
        { "name": "Consulta Cardiologia", "price": 850, "currency": "BRL", "currencySymbol": "R$" }
    ],
    "startingPrice": 850,
    "currency": "BRL",
    "insurances": ["Cartão de Crédito", "Dinheiro", "Transferência Bancária"],
    "onlineBooking": true,
    "isVerified": true,
    "about": "Médico cardiologista com mais de 15 anos de experiência…",
    "country": "br",
    "leadScore": 72,
    "scrapedAt": "2026-06-19T12:00:00.000Z"
}
```

### Automate & schedule

Run this actor on autopilot and pull results into your own stack:

- **[Apify API](https://docs.apify.com/api/v2)** — start runs, fetch datasets, and manage schedules over REST.
- **[apify-client for JavaScript](https://docs.apify.com/api/client/js/)** and **[apify-client for Python](https://docs.apify.com/api/client/python/)** — official SDKs.
- **[Schedules](https://docs.apify.com/platform/schedules)** — run it daily/weekly with **monitoring mode** to capture only newly listed providers in a city/specialty; perfect for lead pipelines.
- **[Webhooks](https://docs.apify.com/platform/integrations/webhooks)** — trigger downstream actions (CRM import, Slack alert, email sequence) the moment a run finishes.

```js
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'MY_APIFY_TOKEN' });

const run = await client.actor('scrapesage/doctoralia-scraper').call({
    mode: 'search',
    country: 'mx',
    specialties: ['dermatologo'],
    locations: ['ciudad-de-mexico'],
    maxResults: 300,
    withPhoneOnly: true,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(`Got ${items.length} provider leads`);
```

### Integrate with any app

Connect the dataset to 5,000+ apps — no code required:

- **[Make](https://docs.apify.com/platform/integrations/make)** — multi-step automation scenarios.
- **[Zapier](https://docs.apify.com/platform/integrations/zapier)** — push new provider leads straight into your CRM.
- **[Slack](https://docs.apify.com/platform/integrations/slack)** — get notified when a monitored specialty/city gets new providers.
- **[Google Drive / Sheets](https://docs.apify.com/platform/integrations/drive)** — auto-export every run to a spreadsheet.
- **[Airbyte](https://docs.apify.com/platform/integrations/airbyte)** — pipe results into your data warehouse.
- **[GitHub](https://docs.apify.com/platform/integrations/github)** — trigger runs from commits or releases.

### Use with AI assistants (MCP)

The output is clean, LLM-ready JSON. Call this actor from Claude, ChatGPT, or any agent framework through the **[Apify MCP server](https://docs.apify.com/platform/integrations/mcp)** — ask your assistant to "find dermatologists in Madrid with reviews and list their phone numbers and prices" and let it run this scraper for you.

### Agent-ready: autonomous payments (x402 & Skyfire)

This actor is **agent-ready** — AI agents can discover it, run it, and **pay for it autonomously**, with no Apify account and no human in the loop. It uses [pay-per-event](https://docs.apify.com/platform/actors/publishing/monetize/pay-per-event) pricing and [limited permissions](https://docs.apify.com/platform/actors/development/permissions), so it qualifies for Apify's agentic-payment standards:

- **[x402](https://docs.apify.com/platform/integrations/x402)** — an open, HTTP-native payment protocol. Agents pay per run in USDC on the Base network directly through the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp) — no account, no API key.
- **[Skyfire](https://docs.apify.com/platform/integrations/skyfire)** — agent-to-service payments for fully autonomous AI-agent workflows.

Building an AI agent, MCP tool, or autonomous data pipeline? This scraper is ready to plug in and pay as it goes.

### More scrapers from scrapesage

Build a complete **healthcare & professional-services lead-gen stack**:

- **[Healthgrades Scraper](https://apify.com/scrapesage/healthgrades-scraper)** — US doctors, reviews and provider leads.
- **[WebMD Scraper](https://apify.com/scrapesage/webmd-scraper)** — US doctors, specialties and provider leads.
- **[NPI / NPPES Scraper](https://apify.com/scrapesage/npi-nppes-scraper)** — the US national registry of 8M+ healthcare providers.
- **[CMS Open Payments Scraper](https://apify.com/scrapesage/open-payments-scraper)** — pharma & device payments to US physicians.
- **[Clinical Trials Scraper](https://apify.com/scrapesage/clinical-trials-scraper)** — trials, sites and PI contacts.
- **[FDA Scraper](https://apify.com/scrapesage/fda-scraper)** — recalls, adverse events, devices and establishment leads.
- **[Caring Senior Living Scraper](https://apify.com/scrapesage/caring-senior-living-scraper)** — senior-care facility leads.
- **[TaxBuzz Scraper](https://apify.com/scrapesage/taxbuzz-scraper)** — CPAs, tax preparers and accountant leads.
- **[FindLaw Scraper](https://apify.com/scrapesage/findlaw-scraper)** — lawyers, law firms and legal leads.

### Tips

- **Cover a metro fully**: add neighbouring cities to `locations`; Doctoralia lists each provider under their clinic's city.
- **Faster runs**: turn off `includeProfileDetails` for a listing-only pass — it still includes name, specialties, rating, address and a starting price (phone/insurances come from the profile).
- **Use the local language**: a Brazilian search needs `cardiologista` / `sao-paulo`, a Mexican search `cardiologo` / `ciudad-de-mexico`. Or just paste a Doctoralia URL into `startUrls`.
- **Proxies**: keep the default Residential group — Doctoralia is geo-sensitive and the actor automatically sets the exit country to match your selected **country**.
- **Recurring monitoring**: combine [Schedules](https://docs.apify.com/platform/schedules) with `monitorMode` to capture only newly listed providers over time.

### FAQ

**How do I scrape doctors for a specific city?** Pick the **country**, then put the specialty (in that country's language, e.g. `dermatologista`) and the city (`sao-paulo`) into `specialties` and `locations`. Or paste a Doctoralia search URL into `startUrls`.

**Which countries are supported?** Brazil, Mexico, Spain, Italy, Poland (znanylekarz.pl), Argentina, Colombia, Chile, Peru, Ecuador and Portugal. Run one country at a time for best geo-matching.

**Where do the emails come from?** Never from Doctoralia (it doesn't publish emails). With `enrichContactEmails` on, the actor visits the clinic's own public website and extracts publicly listed contact emails — the same thing a human visitor would see.

**Can I export to Google Sheets, CSV, or Excel?** Yes — one click in the dataset view, or automatically on every run via the [Google Drive integration](https://docs.apify.com/platform/integrations/drive).

**How do I get only new providers over time?** Turn on `monitorMode` and run on a [Schedule](https://docs.apify.com/platform/schedules) — each run returns only providers not seen before.

**Is scraping Doctoralia legal?** This actor collects publicly available data only. You are responsible for using the data in compliance with applicable laws (GDPR/LGPD/CCPA for personal data) and Doctoralia's terms.

**A field is null — why?** Some profiles genuinely omit a phone, price, insurance or website. Fields are `null` only when the data doesn't exist, not because the scraper skipped them.

### Need help?

Open an issue on the actor's **Issues** tab, or visit the [Apify help center](https://help.apify.com/). Feature requests are welcome — this actor is actively maintained.

# Actor input Schema

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

Search builds a list from specialties × locations. Start URLs scrapes specific Doctoralia listing or profile URLs you paste in.

## `country` (type: `string`):

Doctoralia / DocPlanner country site to search. Determines the domain AND the proxy exit country (the site is geo-sensitive). Use specialty/location terms in that country's language (e.g. <code>cardiologista</code> for Brazil, <code>cardiologo</code> for Mexico/Spain/Italy). (Search mode.)

## `specialties` (type: `array`):

Medical specialties to pull — in the country's language, one per row. Brazil: <code>cardiologista</code>, <code>dermatologista</code>, <code>ginecologista</code>, <code>psicologo</code>, <code>dentista</code>. Spain/Mexico: <code>cardiologo</code>, <code>dermatologo</code>, <code>ginecologo</code>, <code>psicologo</code>, <code>dentista</code>. You can also paste a full URL-style slug. (Search mode.)

## `locations` (type: `array`):

Cities to search, one per row, in the country's language — e.g. <code>sao-paulo</code>, <code>rio-de-janeiro</code> (Brazil); <code>madrid</code>, <code>barcelona</code> (Spain); <code>ciudad-de-mexico</code> (Mexico). Plain names like <code>São Paulo</code> are auto-slugified. (Search mode.)

## `startUrls` (type: `array`):

Doctoralia / DocPlanner URLs to scrape directly: listing URLs (<code>.../{specialty}/{city}</code>) or profile URLs (<code>.../{doctor-slug}/{specialty}/{city}</code>). Auto-detected and routed. One per row. (Start URLs mode.)

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

Cap on doctor/clinic records across the whole run. Listings are paginated automatically until this cap or the search is exhausted.

## `includeProfileDetails` (type: `boolean`):

Open each provider's profile page for the richer record: phone, all clinic locations with full address + map coordinates, services & prices, accepted insurances/payment methods, languages, online-booking availability, awards and an 'about' bio. One extra request per provider. Turn off for a faster, listing-only run (which already includes name, specialties, rating, address and a starting price).

## `includeReviews` (type: `boolean`):

Also output patient review records (type `review`) parsed from each profile page: rating, author, date, text and the doctor's reply. In monitoring mode only NEW reviews are returned.

## `maxReviewsPerProfile` (type: `integer`):

How many reviews to output per provider when 'Include patient reviews' is on.

## `enrichContactEmails` (type: `boolean`):

Opt-in extra lead enrichment: when a provider lists a clinic/personal website, crawl it (home + contact/about, up to 3 pages) for emails, phone numbers and social links. Doctoralia itself does not publish emails — this is the way to get them.

## `withPhoneOnly` (type: `boolean`):

Output only providers that expose a phone number (requires full profiles to be on).

## `withEmailOnly` (type: `boolean`):

Output only providers that have a contact email (from the clinic-website crawl). Implies 'Enrich contacts from the clinic website'.

## `minRating` (type: `integer`):

Only output providers with at least this star rating (0–5). 0 = no rating filter.

## `deduplicateProviders` (type: `boolean`):

Skip a provider already emitted in this run (by profile URL) — useful when several searches overlap.

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

Remember what was already returned and emit ONLY records not seen in previous runs (new providers, and new reviews per provider). Pairs with Apify Schedules to track new listings over time.

## `monitorStoreName` (type: `string`):

Named key-value store that holds the 'already seen' ids for monitoring mode. Use a different name per tracked search to keep their histories separate.

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

Maximum parallel requests for profile/enrichment fetches. Lower it for very large runs if you see transient blocks; raise it for speed.

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

Proxy settings. Residential proxies in the target country are strongly recommended — Doctoralia is geo-sensitive and blocks most datacenter IPs. The actor sets the exit country to match the selected Country automatically.

## Actor input object example

```json
{
  "mode": "search",
  "country": "br",
  "specialties": [
    "cardiologista"
  ],
  "locations": [
    "sao-paulo"
  ],
  "maxResults": 100,
  "includeProfileDetails": true,
  "includeReviews": false,
  "maxReviewsPerProfile": 20,
  "enrichContactEmails": false,
  "withPhoneOnly": false,
  "withEmailOnly": false,
  "minRating": 0,
  "deduplicateProviders": true,
  "monitorMode": false,
  "monitorStoreName": "doctoralia-monitor",
  "maxConcurrency": 5,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `results` (type: `string`):

All scraped doctor/clinic provider records and optional patient review records as JSON items in the default dataset.

# 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 = {
    "specialties": [
        "cardiologista"
    ],
    "locations": [
        "sao-paulo"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapesage/doctoralia-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 = {
    "specialties": ["cardiologista"],
    "locations": ["sao-paulo"],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("scrapesage/doctoralia-scraper").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 '{
  "specialties": [
    "cardiologista"
  ],
  "locations": [
    "sao-paulo"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call scrapesage/doctoralia-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=scrapesage/doctoralia-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Doctoralia Scraper - Doctors, Clinics & Provider Leads",
        "description": "Scrape Doctoralia / DocPlanner for doctors, dentists, specialists & clinics by specialty and city: full profiles with phone, clinic address + geo, services & prices, insurances, languages, rating, reviews & a lead score. Monitoring mode. No login, no API key, no browser.",
        "version": "0.1",
        "x-build-id": "3fRpyjij3gU3UBvhe"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/scrapesage~doctoralia-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-scrapesage-doctoralia-scraper",
                "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/scrapesage~doctoralia-scraper/runs": {
            "post": {
                "operationId": "runs-sync-scrapesage-doctoralia-scraper",
                "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/scrapesage~doctoralia-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-scrapesage-doctoralia-scraper",
                "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",
                "required": [
                    "mode"
                ],
                "properties": {
                    "mode": {
                        "title": "What to scrape",
                        "enum": [
                            "search",
                            "startUrls"
                        ],
                        "type": "string",
                        "description": "Search builds a list from specialties × locations. Start URLs scrapes specific Doctoralia listing or profile URLs you paste in.",
                        "default": "search"
                    },
                    "country": {
                        "title": "Country",
                        "enum": [
                            "br",
                            "mx",
                            "es",
                            "it",
                            "pl",
                            "ar",
                            "co",
                            "cl",
                            "pe",
                            "ec",
                            "pt"
                        ],
                        "type": "string",
                        "description": "Doctoralia / DocPlanner country site to search. Determines the domain AND the proxy exit country (the site is geo-sensitive). Use specialty/location terms in that country's language (e.g. <code>cardiologista</code> for Brazil, <code>cardiologo</code> for Mexico/Spain/Italy). (Search mode.)",
                        "default": "br"
                    },
                    "specialties": {
                        "title": "Specialties",
                        "type": "array",
                        "description": "Medical specialties to pull — in the country's language, one per row. Brazil: <code>cardiologista</code>, <code>dermatologista</code>, <code>ginecologista</code>, <code>psicologo</code>, <code>dentista</code>. Spain/Mexico: <code>cardiologo</code>, <code>dermatologo</code>, <code>ginecologo</code>, <code>psicologo</code>, <code>dentista</code>. You can also paste a full URL-style slug. (Search mode.)",
                        "items": {
                            "type": "string"
                        }
                    },
                    "locations": {
                        "title": "Locations (cities)",
                        "type": "array",
                        "description": "Cities to search, one per row, in the country's language — e.g. <code>sao-paulo</code>, <code>rio-de-janeiro</code> (Brazil); <code>madrid</code>, <code>barcelona</code> (Spain); <code>ciudad-de-mexico</code> (Mexico). Plain names like <code>São Paulo</code> are auto-slugified. (Search mode.)",
                        "items": {
                            "type": "string"
                        }
                    },
                    "startUrls": {
                        "title": "Start URLs (Doctoralia listing or profile URLs)",
                        "type": "array",
                        "description": "Doctoralia / DocPlanner URLs to scrape directly: listing URLs (<code>.../{specialty}/{city}</code>) or profile URLs (<code>.../{doctor-slug}/{specialty}/{city}</code>). Auto-detected and routed. One per row. (Start URLs mode.)",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxResults": {
                        "title": "Max results (providers)",
                        "minimum": 1,
                        "maximum": 100000,
                        "type": "integer",
                        "description": "Cap on doctor/clinic records across the whole run. Listings are paginated automatically until this cap or the search is exhausted.",
                        "default": 100
                    },
                    "includeProfileDetails": {
                        "title": "Include full profiles (phone, services, insurances, geo)",
                        "type": "boolean",
                        "description": "Open each provider's profile page for the richer record: phone, all clinic locations with full address + map coordinates, services & prices, accepted insurances/payment methods, languages, online-booking availability, awards and an 'about' bio. One extra request per provider. Turn off for a faster, listing-only run (which already includes name, specialties, rating, address and a starting price).",
                        "default": true
                    },
                    "includeReviews": {
                        "title": "Include patient reviews",
                        "type": "boolean",
                        "description": "Also output patient review records (type `review`) parsed from each profile page: rating, author, date, text and the doctor's reply. In monitoring mode only NEW reviews are returned.",
                        "default": false
                    },
                    "maxReviewsPerProfile": {
                        "title": "Max reviews per provider",
                        "minimum": 1,
                        "maximum": 200,
                        "type": "integer",
                        "description": "How many reviews to output per provider when 'Include patient reviews' is on.",
                        "default": 20
                    },
                    "enrichContactEmails": {
                        "title": "Enrich contacts from the clinic website",
                        "type": "boolean",
                        "description": "Opt-in extra lead enrichment: when a provider lists a clinic/personal website, crawl it (home + contact/about, up to 3 pages) for emails, phone numbers and social links. Doctoralia itself does not publish emails — this is the way to get them.",
                        "default": false
                    },
                    "withPhoneOnly": {
                        "title": "Only providers with a phone",
                        "type": "boolean",
                        "description": "Output only providers that expose a phone number (requires full profiles to be on).",
                        "default": false
                    },
                    "withEmailOnly": {
                        "title": "Only providers with an email",
                        "type": "boolean",
                        "description": "Output only providers that have a contact email (from the clinic-website crawl). Implies 'Enrich contacts from the clinic website'.",
                        "default": false
                    },
                    "minRating": {
                        "title": "Minimum rating",
                        "minimum": 0,
                        "maximum": 5,
                        "type": "integer",
                        "description": "Only output providers with at least this star rating (0–5). 0 = no rating filter.",
                        "default": 0
                    },
                    "deduplicateProviders": {
                        "title": "Deduplicate providers",
                        "type": "boolean",
                        "description": "Skip a provider already emitted in this run (by profile URL) — useful when several searches overlap.",
                        "default": true
                    },
                    "monitorMode": {
                        "title": "Monitoring mode — only new records",
                        "type": "boolean",
                        "description": "Remember what was already returned and emit ONLY records not seen in previous runs (new providers, and new reviews per provider). Pairs with Apify Schedules to track new listings over time.",
                        "default": false
                    },
                    "monitorStoreName": {
                        "title": "Monitor store name",
                        "type": "string",
                        "description": "Named key-value store that holds the 'already seen' ids for monitoring mode. Use a different name per tracked search to keep their histories separate.",
                        "default": "doctoralia-monitor"
                    },
                    "maxConcurrency": {
                        "title": "Max concurrency",
                        "minimum": 1,
                        "maximum": 12,
                        "type": "integer",
                        "description": "Maximum parallel requests for profile/enrichment fetches. Lower it for very large runs if you see transient blocks; raise it for speed.",
                        "default": 5
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Proxy settings. Residential proxies in the target country are strongly recommended — Doctoralia is geo-sensitive and blocks most datacenter IPs. The actor sets the exit country to match the selected Country automatically.",
                        "default": {
                            "useApifyProxy": true,
                            "apifyProxyGroups": [
                                "RESIDENTIAL"
                            ]
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
