{
  "openapi": "3.0.1",
  "info": {
    "title": "Doctoralia Scraper: LatAm & Spain Doctor Data",
    "description": "Scrape Doctoralia doctor profiles in Mexico, Brazil, Colombia, Chile, Peru and Spain without a browser. Type a city and specialty. Get consultation prices vs the same city, cheap/fair/expensive labels, rating percentile, insurance report, MARKET_REPORT, and monitor mode.",
    "version": "0.1",
    "x-build-id": "kicLFlnbT0nYJKOvx"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kareninatech~doctoralia-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kareninatech-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/kareninatech~doctoralia-scraper/runs": {
      "post": {
        "operationId": "runs-sync-kareninatech-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/kareninatech~doctoralia-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-kareninatech-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",
        "properties": {
          "country": {
            "title": "Country",
            "enum": [
              "mexico",
              "brazil",
              "colombia",
              "chile",
              "peru",
              "spain"
            ],
            "type": "string",
            "description": "Doctoralia site to scrape, for example Mexico, Brazil or Spain. Use the dropdown values.",
            "default": "mexico"
          },
          "city": {
            "title": "City",
            "type": "string",
            "description": "A city name as you would type it: Ciudad de México, São Paulo, Bogotá, Santiago, Lima, Madrid… For the whole country type the country name (Mexico, Brazil, Colombia, Chile, Peru or Spain). Do not leave this field empty — an omitted value is filled with the default, Ciudad de México.",
            "default": "Ciudad de México"
          },
          "cities": {
            "title": "More cities",
            "type": "array",
            "description": "Extra cities to search in the same run. max_items is split between all city and specialty combinations.",
            "items": {
              "type": "string"
            }
          },
          "specialty": {
            "title": "Specialty",
            "type": "string",
            "description": "A specialty as you would type it: dermatólogo, dermatologista, ginecólogo, psicólogo, pediatra, médico general…",
            "default": "dermatólogo"
          },
          "specialties": {
            "title": "More specialties",
            "type": "array",
            "description": "Optional extra specialties to search in the same run, for example dermatología. Leave empty to use the default list.",
            "items": {
              "type": "string"
            }
          },
          "search_url": {
            "title": "Doctoralia search URL (optional)",
            "type": "string",
            "description": "Paste a search page from a Doctoralia site with your filters already set. When you use URLs, the country / city / specialty fields above are ignored."
          },
          "start_urls": {
            "title": "More search URLs",
            "type": "array",
            "description": "Extra Doctoralia search pages (Mexico, Brazil, Colombia, Chile, Peru or Spain).",
            "items": {
              "type": "string"
            }
          },
          "max_items": {
            "title": "Max profiles",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum doctor or clinic profiles to save (split between searches). Each results page has about 20–24 doctors.",
            "default": 40
          },
          "max_pages": {
            "title": "Max pages per search",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Maximum results pages to fetch per search. Leave empty to decide automatically from max_items."
          },
          "profile_type": {
            "title": "Profile type",
            "enum": [
              "doctors",
              "clinics",
              "all"
            ],
            "type": "string",
            "description": "Doctors only, clinics only, or both. Search pages sometimes include a few clinic ads.",
            "default": "doctors"
          },
          "min_rating": {
            "title": "Min rating",
            "minimum": 1,
            "maximum": 5,
            "type": "number",
            "description": "Only keep profiles with at least this star rating (1–5)."
          },
          "min_reviews": {
            "title": "Min reviews",
            "minimum": 0,
            "type": "integer",
            "description": "Only keep profiles with at least this many patient reviews."
          },
          "online_only": {
            "title": "Online consultation only",
            "type": "boolean",
            "description": "Only keep profiles that offer an online consultation.",
            "default": false
          },
          "fetch_details": {
            "title": "Fetch profile pages",
            "type": "boolean",
            "description": "Visit each profile for the full service price list, insurance accepted, languages and license numbers. Off by default because it is slower (one extra page per doctor).",
            "default": false
          },
          "include_reviews": {
            "title": "Include latest reviews",
            "type": "boolean",
            "description": "Save the latest patient reviews from the profile page (usually a handful, already in the page). This also opens the profile, even if Fetch profile pages is off.",
            "default": false
          },
          "max_reviews_per_doctor": {
            "title": "Max reviews per doctor",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum reviews to save per profile when reviews are enabled.",
            "default": 5
          },
          "compare_with_market": {
            "title": "Compare price and rating with the same specialty and city",
            "type": "boolean",
            "description": "Add the city median consultation price, a cheap/fair/expensive label, and a rating percentile, using the other doctors in this run.",
            "default": true
          },
          "min_peers": {
            "title": "Min doctors in a comparison group",
            "minimum": 3,
            "maximum": 50,
            "type": "integer",
            "description": "A specialty and city needs at least this many comparable doctors before a median or percentile is used.",
            "default": 5
          },
          "monitor_mode": {
            "title": "Monitor mode",
            "type": "boolean",
            "description": "Only save new profiles and those whose price, rating or review count changed (and removed ones if you turn that on). Schedule the Actor to run regularly.",
            "default": false
          },
          "monitor_key": {
            "title": "Monitor name",
            "type": "string",
            "description": "Name for this watch list (so different searches do not share history). Letters, numbers and hyphens."
          },
          "emit_removed": {
            "title": "Report removed profiles",
            "type": "boolean",
            "description": "In monitor mode, also save profiles that disappeared. Only works when the run covers the whole search.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional. Not needed today. If Doctoralia starts blocking, use Apify Proxy (RESIDENTIAL, and the country you are scraping)."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}