{
  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}