{
  "openapi": "3.0.1",
  "info": {
    "title": "WebMD Scraper — Doctors, Reviews & Provider Leads",
    "description": "Scrape WebMD doctors & healthcare providers by specialty and location. Get NPI, specialties, ratings, patient reviews, board certifications, accepted insurance, all practice locations, phones, fax & leads — plus optional practice-email enrichment and monitoring. No login, no key, no browser.",
    "version": "0.1",
    "x-build-id": "5kRhZdy5VrHUWnEHg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapesage~webmd-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapesage-webmd-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~webmd-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapesage-webmd-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~webmd-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapesage-webmd-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": {
          "specialties": {
            "title": "Specialties",
            "type": "array",
            "description": "Medical specialties to browse, combined with every location. Friendly names work (e.g. Cardiology, Dentist, OB-GYN) and map to WebMD slugs like cardiovascular-disease, family-medicine, dermatology, pediatrics, psychiatry, psychology, dentistry. Full list at doctor.webmd.com/providers/specialty.",
            "items": {
              "type": "string"
            }
          },
          "locations": {
            "title": "Locations",
            "type": "array",
            "description": "Where to search. Use <code>state/city</code> (<code>texas/austin</code>, <code>california/los-angeles</code>), a plain <code>City, ST</code> (<code>Austin, TX</code>), or a whole state (<code>texas</code>, <code>TX</code>). City-level searches return the most providers.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Direct WebMD URLs: doctor profiles (<code>/doctor/...-overview</code>) or browse/directory pages (<code>/providers/specialty/...</code>). Used in addition to specialties + locations.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "acceptingNewPatientsOnly": {
            "title": "Accepting new patients only",
            "type": "boolean",
            "description": "Only include providers currently accepting new patients.",
            "default": false
          },
          "minRating": {
            "title": "Minimum rating",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Only include providers with at least this WebMD star rating (1–5). 0 = no minimum.",
            "default": 0
          },
          "gender": {
            "title": "Gender",
            "enum": [
              "any",
              "female",
              "male"
            ],
            "type": "string",
            "description": "Filter providers by gender.",
            "default": "any"
          },
          "maxResultsPerSearch": {
            "title": "Max results per search",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum providers to collect per specialty × location combination.",
            "default": 60
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of providers to scrape across all searches.",
            "default": 100
          },
          "includeProviderDetails": {
            "title": "Include full provider profiles",
            "type": "boolean",
            "description": "Fetch each profile for the full record: biography, sub-specialty expertise, years of experience, board certifications, state licenses, languages, conditions treated, procedures, accepted insurance, all practice locations and hospital affiliations. One extra page per provider.",
            "default": true
          },
          "includeReviews": {
            "title": "Include patient reviews",
            "type": "boolean",
            "description": "Also emit each provider's patient reviews as separate records (star rating, text, author, date). Requires the profile fetch.",
            "default": false
          },
          "maxReviewsPerProvider": {
            "title": "Max reviews per provider",
            "minimum": 1,
            "type": "integer",
            "description": "Cap the number of review records emitted per provider.",
            "default": 25
          },
          "enrichPracticeEmails": {
            "title": "Enrich practice emails from their website",
            "type": "boolean",
            "description": "Crawl each provider's own practice website (home + contact/about, up to 3 pages) for contact emails, phone numbers and social links. WebMD never exposes emails — this is the only way to get them.",
            "default": false
          },
          "deduplicateProviders": {
            "title": "Deduplicate providers",
            "type": "boolean",
            "description": "Skip providers already emitted in this run (by NPI / provider id).",
            "default": true
          },
          "monitorMode": {
            "title": "Monitor mode (only new providers)",
            "type": "boolean",
            "description": "Remember providers seen in previous runs (in a named key-value store) and emit only NEW ones next time. Pair with Apify Schedules to track newly listed providers — it does not conflict with the scheduler.",
            "default": false
          },
          "monitorStoreName": {
            "title": "Monitor store name",
            "type": "string",
            "description": "Key-value store name used to remember seen providers across runs.",
            "default": "webmd-monitor"
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum parallel page fetches.",
            "default": 6
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxies to use. The default Apify Proxy (datacenter) is enough — WebMD serves clean pages to it.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}