{
  "openapi": "3.0.1",
  "info": {
    "title": "Doctoralia Scraper | 2$ / 1k Cheap",
    "description": "Scrape doctors from the whole Doctoralia network — doctoralia.es/.com.br/.com.mx and 9 more sites incl. ZnanyLekarz, MioDottore, Doktortakvimi and Jameda. Profiles, license numbers, services with prices, GPS locations and every patient review. Incremental monitoring for cheap recurring runs.",
    "version": "1.0",
    "x-build-id": "9WwcPybzKkPClWDop"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/trev0n~doctoralia-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-trev0n-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/trev0n~doctoralia-scraper/runs": {
      "post": {
        "operationId": "runs-sync-trev0n-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/trev0n~doctoralia-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-trev0n-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": [
              "es",
              "br",
              "mx",
              "pl",
              "it",
              "cl",
              "co",
              "pe",
              "tr",
              "cz",
              "de"
            ],
            "type": "string",
            "description": "Which Doctoralia-family site to search. All 11 active countries of the network are supported.",
            "default": "es"
          },
          "specializations": {
            "title": "Specializations",
            "type": "array",
            "description": "One or more medical specializations, written the way they appear in the site's URLs for your chosen country — e.g. Spain: <code>dermatologo</code>, <code>psicologo</code>; Brazil: <code>dermatologista</code>; Poland: <code>dermatolog</code>; Germany: <code>hautarzt-dermatologe</code>. Free text is normalised (accents stripped, spaces → hyphens).",
            "items": {
              "type": "string"
            }
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "Cities to search, e.g. <code>barcelona</code>, <code>madrid</code> — or <code>online</code> for telemedicine-only doctors. Leave empty to search the specialization nationwide. Free text is normalised to the site's slug (e.g. 'São Paulo' → 'sao-paulo').",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URLs (advanced — overrides filters)",
            "type": "array",
            "description": "Optional. Paste any URLs from the 11 supported sites — a search-results page (e.g. https://www.doctoralia.es/dermatologo/barcelona) or a doctor profile. Auto-classified. When provided, these REPLACE the country/specialization/city fields above.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "fetchProfileDetails": {
            "title": "Fetch full doctor profiles",
            "type": "boolean",
            "description": "When enabled (default), every doctor's profile page is opened for the full record: license/registration number, biography, services with prices, payment methods, postal codes and reviews. When disabled (cheapest), only the ~15 fields already on the search-result card are returned — one request per ~20 doctors.",
            "default": true
          },
          "maxReviewsPerDoctor": {
            "title": "Max reviews per doctor",
            "minimum": 0,
            "type": "integer",
            "description": "How many patient reviews to collect per doctor (newest first). The first 10 come free with the profile page; anything above 10 is fetched in small batches of 10. Set 0 to collect ALL reviews. Requires 'Fetch full doctor profiles'.",
            "default": 10
          },
          "maxDoctors": {
            "title": "Max doctors",
            "minimum": 0,
            "type": "integer",
            "description": "Hard cap on the number of doctor records pushed to the dataset. Set 0 for unlimited.",
            "default": 100
          },
          "maxPages": {
            "title": "Max search pages",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of search-result pages to crawl per search (~20 doctors per page). The site itself caps a single search at roughly 20–25 pages — split large jobs by city or specialization to get everything.",
            "default": 30
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of parallel requests.",
            "default": 10
          },
          "maxRequestRetries": {
            "title": "Max request retries",
            "minimum": 0,
            "type": "integer",
            "description": "How many times a failed request is retried.",
            "default": 5
          },
          "incremental": {
            "title": "Incremental monitoring",
            "type": "boolean",
            "description": "Track changes across runs. The first run records a baseline; later runs emit only NEW, UPDATED (e.g. new reviews, price changes) and REAPPEARED doctors — typically 80–95% cheaper for recurring monitoring of the same search.",
            "default": false
          },
          "stateKey": {
            "title": "Monitoring state key",
            "type": "string",
            "description": "Optional. Identifier for this monitoring baseline. Leave empty to derive one automatically from the search filters. Use a fixed value to keep one baseline across config tweaks."
          },
          "emitUnchanged": {
            "title": "Emit unchanged doctors",
            "type": "boolean",
            "description": "Incremental only. Also output doctors that did not change since the last run.",
            "default": false
          },
          "emitExpired": {
            "title": "Emit removed doctors",
            "type": "boolean",
            "description": "Incremental only. Also output doctors that disappeared from the search results since the last run, tagged EXPIRED.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "The platform is scrape-friendly, so NO proxy is the default (cheapest). Configure a proxy only for very large runs or if your traffic gets rate-limited.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}