{
  "openapi": "3.0.1",
  "info": {
    "title": "Doctor & Clinic Scraper for Doctoralia - Leads & Reviews",
    "description": "Scrape Doctoralia / DocPlanner in 11 countries: doctors, dentists & clinics by specialty and city with phone, registration number, addresses + geo, services & prices, insurances, reviews, website e-mails & a lead score. Monitoring mode. Independent tool, not affiliated with Docplanner.",
    "version": "0.1",
    "x-build-id": "AyVxhb1tW8htmfypK"
  },
  "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 × cities. Start URLs scrapes the Doctoralia search or profile pages you paste in.",
            "default": "search"
          },
          "country": {
            "title": "Country",
            "enum": [
              "br",
              "mx",
              "es",
              "it",
              "pl",
              "co",
              "cl",
              "pe",
              "pt",
              "cz",
              "tr",
              "ar",
              "ec"
            ],
            "type": "string",
            "description": "Which DocPlanner site to search. Write specialties and cities in that site's language (e.g. <code>cardiologista</code> for Brazil and Portugal, <code>cardiologo</code> for Mexico, Spain, Italy, Colombia, Chile and Peru, <code>kardiolog</code> for Poland and Czechia, <code>kardiyoloji</code> for Turkey). Argentina and Ecuador are listed only so older saved inputs keep working: Doctoralia closed those two sites. (Search mode.)",
            "default": "br"
          },
          "specialties": {
            "title": "Specialties",
            "type": "array",
            "description": "Medical specialties to search, one per row, as the site writes them. Brazil: <code>cardiologista</code>, <code>dermatologista</code>, <code>ginecologista</code>, <code>psicologo</code>, <code>dentista</code>. Spain / Mexico / Latin America: <code>cardiologo</code>, <code>dermatologo</code>, <code>ginecologo</code>, <code>psicologo</code>, <code>dentista</code>. Plain names such as <code>Médico clínico geral</code> are turned into the site's URL form automatically. Leave Cities empty to search the whole country. (Search mode.)",
            "items": {
              "type": "string"
            }
          },
          "locations": {
            "title": "Cities",
            "type": "array",
            "description": "Cities to search, one per row: <code>sao-paulo</code>, <code>rio-de-janeiro</code> (Brazil); <code>madrid</code>, <code>barcelona</code> (Spain); <code>ciudad-de-mexico</code> (Mexico); <code>warszawa</code> (Poland). Plain names such as <code>São Paulo</code> work too. Every specialty is searched in every city. (Search mode.)",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URLs (Doctoralia search or profile pages)",
            "type": "array",
            "description": "DocPlanner URLs to scrape directly, one per row: search pages (<code>https://www.doctoralia.com.br/cardiologista/sao-paulo</code>, also district and insurance pages such as <code>…/cardiologista/sao-paulo/moema</code>), doctor profiles and clinic profiles, on any of the 11 sites. Each URL is recognised automatically. (Start URLs mode.)",
            "items": {
              "type": "string"
            }
          },
          "urlsFromFile": {
            "title": "Import Start URLs from a file",
            "type": "string",
            "description": "Paste a list of URLs (one per line), OR one link to a .txt/.csv file, Google Sheet or Google Drive file containing them. Google Sheet / Drive share links are handled automatically. (Start URLs mode.)"
          },
          "maxResults": {
            "title": "Max results (providers)",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Cap on doctor and clinic records for the whole run, shared fairly between your searches. 0 = no cap. Patient reviews come on top (see Max reviews per provider).",
            "default": 100
          },
          "providerTypes": {
            "title": "Provider types",
            "type": "array",
            "description": "Doctoralia's search results mix individual doctors and clinics. Keep both, or pick one. Clinics only reads the site's own clinic directory for your specialty and city, which lists far more clinics than the doctor search.",
            "items": {
              "type": "string",
              "enum": [
                "doctor",
                "clinic"
              ],
              "enumTitles": [
                "Doctors and other professionals (doctor)",
                "Clinics, hospitals and medical centres (clinic)"
              ]
            },
            "default": [
              "doctor",
              "clinic"
            ]
          },
          "includeProfileDetails": {
            "title": "Include full profiles",
            "type": "boolean",
            "description": "Open each provider's profile page for the full record: phone numbers where the provider publishes them, every practice address with map coordinates, all services with prices and the next bookable date, insurance plans and payment methods, registration number, education, experience, diseases treated, languages, photos and social links. Turn off for a faster search-page-only run (name, specialties, rating, address, map pin and starting prices).",
            "default": true
          },
          "includeReviews": {
            "title": "Include patient reviews",
            "type": "boolean",
            "description": "Also output patient review records (type <code>review</code>): rating, author, date, text, verification badge, the service and address of the visit, and the provider's reply. In monitoring mode only reviews posted since the last run 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 (newest first).",
            "default": 20
          },
          "enrichContactEmails": {
            "title": "Find e-mails on the provider's own website",
            "type": "boolean",
            "description": "Doctoralia does not publish e-mail addresses. When a provider lists its own website, read it (home page + one contact page) for e-mail addresses, extra phone numbers and social profiles. Billed per provider only when the site gives contact data the record did not already have.",
            "default": false
          },
          "withPhoneOnly": {
            "title": "Only providers with a phone",
            "type": "boolean",
            "description": "Output only providers that publish a phone number on Doctoralia. Many doctors who take online bookings hide theirs; clinics usually show it.",
            "default": false
          },
          "withEmailOnly": {
            "title": "Only providers with an e-mail",
            "type": "boolean",
            "description": "Output only providers whose own website lists an e-mail address. Turns on the website e-mail search.",
            "default": false
          },
          "minRating": {
            "title": "Minimum rating",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Only output providers with at least this star rating (1-5). Providers without reviews are skipped when this is set. 0 = no rating filter.",
            "default": 0
          },
          "deduplicateProviders": {
            "title": "Deduplicate providers",
            "type": "boolean",
            "description": "Output each provider once per run, even when several of your searches list it.",
            "default": true
          },
          "monitorMode": {
            "title": "Monitoring mode - only new providers",
            "type": "boolean",
            "description": "Remember what earlier runs returned and output ONLY providers that joined each search since then (and, with reviews on, only reviews posted since then). The first run returns the current providers up to Max results and remembers the whole search. Pair with an Apify Schedule.",
            "default": false
          },
          "monitorStoreName": {
            "title": "Monitor memory name",
            "type": "string",
            "description": "Name of the key-value store that remembers what was already returned. Use a different name per tracked list to keep their histories apart.",
            "default": "doctoralia-monitor"
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 12,
            "type": "integer",
            "description": "How many profiles are read in parallel. The run's memory sets the upper limit: 4 at 512 MB, 8 at 1 GB, 12 from 1.5 GB.",
            "default": 8
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Leave as is: the Actor routes its own requests (Apify datacenter proxy first, a residential IP in the site's country only as a fallback). Your own proxy URLs, if given, replace that.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}