# Healthcare Facilities Scraper – OpenStreetMap (OSM) (`dataquarry/healthcare-facilities`) Actor

Extract healthcare facilities from OpenStreetMap by area, radius, or name: pharmacies, doctors, dentists, clinics, hospitals & nursing homes. Get speciality, dispensing, contact and address. No API key; open (ODbL) data.

- **URL**: https://apify.com/dataquarry/healthcare-facilities.md
- **Developed by:** [Daniel Brenner](https://apify.com/dataquarry) (community)
- **Categories:** Lead generation, Developer tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Healthcare Facilities Scraper – Pharmacies, Clinics, Doctors & Dentists (OpenStreetMap)

Extract **healthcare facilities from OpenStreetMap** by area, radius, or name — **no API key, no medical-directory subscription, no anti-bot battles**. Open, legal (ODbL) data you can redistribute. Public facility listings only — **no patient data**.

Give it an area like `"Manchester, United Kingdom"` and get back tidy rows for every pharmacy, doctor's surgery, dentist, clinic, hospital and nursing home: name, **facility type**, **speciality**, **dispensing**, emergency flag, operator, full address, coordinates, contact, and the raw OpenStreetMap tags. You can also search **around a point** (every clinic within X km) or **filter by name** (e.g. every `"Boots"` pharmacy).

### Why use this scraper?

- **Healthcare-specific fields.** Beyond a generic POI dump — `facility_type`, normalized `healthcare`, `speciality`, `dispensing` (pharmacies) and `emergency` are parsed out of the OpenStreetMap tags.
- **Legal & open.** OpenStreetMap data is ODbL-licensed — redistributable with attribution. Facility listings, **not patient/PII data**. No login.
- **No API key.** No medical-data provider account, no quota.
- **Search by area, radius, or name.** A whole city/region, everything within X metres of a point, or every facility of one brand.
- **Filter by type.** Pharmacies only, or clinics + doctors, etc.
- **No duplicates.** When OpenStreetMap maps one facility twice (a node and a building outline), you get a single, richer row.
- **Honest data.** Every value comes straight from OpenStreetMap; anything not mapped is left empty (`null`) — never guessed.
- **Global coverage & reliable.** Anywhere OSM has data; retries across multiple Overpass mirrors.

### Great for

- Medical / pharmacy / clinic directories and finder apps
- Healthcare market research, coverage and access analysis
- B2B lead lists for healthcare suppliers and services
- Care-access mapping, public-health datasets, AI/RAG pipelines

### Input

| Field | Type | Description |
|---|---|---|
| `area` | string | Place to search within, e.g. `"Manchester, United Kingdom"`. Geocoded to a bounding box. |
| `aroundLocation` | string | *(optional)* Address/place to search **around** within a radius. Pair with `radiusMeters`. |
| `radiusMeters` | integer | *(optional)* Radius in metres for around-a-location search (default `3000`). |
| `centerPoint` | object | *(advanced)* Explicit center `{ "lat":.., "lon":.. }` to search around. |
| `boundingBox` | object | *(advanced)* Explicit `{ "south":.., "west":.., "north":.., "east":.. }`. Overrides `area`. |
| `facilityTypes` | array | *(optional)* Which types to include: `pharmacy`, `doctors`, `dentist`, `clinic`, `hospital`, `nursing_home`. Default: all. |
| `searchTerm` | string | *(optional)* Only return facilities whose **name** contains this text (case-insensitive), e.g. `"Boots"`. |
| `maxResults` | integer | Maximum number of facilities to return (default `1000`). |

#### Example input

```json
{
  "area": "Manchester, United Kingdom",
  "facilityTypes": ["pharmacy", "doctors", "dentist", "clinic"],
  "maxResults": 500
}
````

Every Boots pharmacy within 15 km of a point:

```json
{
  "aroundLocation": "Leeds City Centre",
  "radiusMeters": 15000,
  "facilityTypes": ["pharmacy"],
  "searchTerm": "Boots"
}
```

### Output

One row per facility:

| Field | Description |
|---|---|
| `name` | Facility name |
| `facility_type` | pharmacy / doctors / dentist / clinic / hospital / nursing\_home |
| `healthcare` | Normalized OSM healthcare value |
| `speciality` | Medical speciality (from `healthcare:speciality`) |
| `dispensing` | Pharmacy dispensing flag |
| `emergency` | Emergency service flag |
| `operator`, `brand` | Operator (e.g. NHS) and brand/chain |
| `branch` | Branch / location name of a chain outlet (e.g. `Times Square`) |
| `wheelchair` | Accessibility |
| `latitude`, `longitude` | Coordinates |
| `street`, `housenumber`, `city`, `postcode`, `country` | Address |
| `state` | State / province (`addr:state` / `addr:province`); common in US/CA/AU |
| `phone`, `email`, `website`, `opening_hours` | Contact + hours |
| `osm_id`, `osm_type`, `all_tags`, `source_url` | OpenStreetMap identifiers, raw tags, and link |
| `full_address` | All present address parts in one string (e.g. `Main St 1, 10115 Berlin`) |
| `map_url` | Google Maps link to the coordinates |

#### Example output

```json
{
  "name": "Boots",
  "facility_type": "pharmacy",
  "healthcare": "pharmacy",
  "speciality": null,
  "dispensing": "yes",
  "emergency": null,
  "operator": "Boots UK",
  "brand": "Boots",
  "city": "Manchester",
  "postcode": "M1 1AA",
  "country": "GB",
  "phone": "+44 161 000 0000",
  "opening_hours": "Mo-Sa 09:00-18:00",
  "osm_type": "node",
  "source_url": "https://www.openstreetmap.org/node/..."
}
```

Any field is `null` when the facility hasn't tagged it in OpenStreetMap — values are never guessed.

### FAQ

**Do I need an API key or account?**
No — give it an area (plus optional radius/name filters) and run. No data-provider key, no quota, no setup.

**Is the data legal to use and redistribute?**
Yes. It comes from OpenStreetMap under the Open Database License (ODbL): public data you can redistribute with attribution (© OpenStreetMap contributors). No logins, no Terms-of-Service violations.

**How is this different from a Google Maps scraper?**
It uses open OpenStreetMap data instead of scraping a site behind anti-bot defenses and Terms of Service — so it's legal, needs no API key, and returns an honest `null` for anything OSM hasn't mapped instead of guessing. It returns facility data only (type, speciality, contact) — no patient or personal data.

**How much does it cost?**
Pay-per-result: **$3 per 1,000 results** — you only pay for the rows you actually get.

**Which countries does it cover?**
Worldwide — anywhere OpenStreetMap has data.

**How fresh is the data?**
It's pulled live from OpenStreetMap at run time, so it reflects the current map.

### Data source & license

Data comes from **OpenStreetMap** via the public **Nominatim** (geocoding) and **Overpass** (querying) APIs. OpenStreetMap data is **© OpenStreetMap contributors**, licensed under the **Open Database License (ODbL)**. If you publish or redistribute results, attribute "© OpenStreetMap contributors".

### Notes

- Coverage and tag richness vary by region — OSM is community-mapped, so cities are richer than rural areas.
- This returns **facility** information (names, addresses, phones, specialities) — not individual practitioners or any patient data.

### More OpenStreetMap data actors

Part of **dataquarry**'s family of clean, ODbL OpenStreetMap extractors — same flexible **area / radius / bounding-box / name** search, same honest-null data (a field that isn't mapped is left empty, never guessed):

- [OpenStreetMap Places Scraper](https://apify.com/dataquarry/osm-places-scraper) — POI & local business, 115+ categories
- [EV Charging Stations Scraper](https://apify.com/dataquarry/ev-charging-stations) — socket types, power (kW), networks
- [Hotels & Lodging Scraper](https://apify.com/dataquarry/hotels-lodging) — stars, rooms, brands
- [Healthcare Facilities Scraper](https://apify.com/dataquarry/healthcare-facilities) — pharmacies, doctors, dentists, clinics
- [Tourist Attractions & Museums Scraper](https://apify.com/dataquarry/tourist-attractions) — Wikidata & Wikipedia links
- [Fuel Station Scraper](https://apify.com/dataquarry/fuel-stations) — fuel types, brands, payment methods
- [Supermarket & Grocery Scraper](https://apify.com/dataquarry/supermarkets) — brands, organic, payment methods

# Actor input Schema

## `area` (type: `string`):

Place to search within, e.g. "Manchester, United Kingdom". Geocoded to a bounding box via Nominatim. Provide this OR a bounding box OR a center for radius search.

## `aroundLocation` (type: `string`):

Optional. An address or place to search AROUND within a radius. Geocoded to a center point; set the radius with "radiusMeters".

## `radiusMeters` (type: `integer`):

Radius in meters for the around-a-location search. Default 3000.

## `centerPoint` (type: `object`):

Optional advanced alternative: an explicit center as {"lat":.., "lon":..}. Overrides Around Location.

## `boundingBox` (type: `object`):

Explicit bounding box as {"south":..,"west":..,"north":..,"east":..}. Overrides Area.

## `facilityTypes` (type: `array`):

Which facility types to include. Supported: pharmacy, doctors, dentist, clinic, hospital, nursing\_home. Default: all of them.

## `searchTerm` (type: `string`):

Optional. Only return facilities whose name contains this text (case-insensitive), e.g. "Boots", "NHS".

## `maxResults` (type: `integer`):

Maximum number of facilities to return.

## Actor input object example

```json
{
  "area": "Manchester, United Kingdom",
  "radiusMeters": 3000,
  "facilityTypes": [
    "pharmacy",
    "doctors",
    "dentist",
    "clinic"
  ],
  "maxResults": 1000
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "area": "Manchester, United Kingdom",
    "facilityTypes": [
        "pharmacy",
        "doctors",
        "dentist",
        "clinic"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("dataquarry/healthcare-facilities").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "area": "Manchester, United Kingdom",
    "facilityTypes": [
        "pharmacy",
        "doctors",
        "dentist",
        "clinic",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("dataquarry/healthcare-facilities").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "area": "Manchester, United Kingdom",
  "facilityTypes": [
    "pharmacy",
    "doctors",
    "dentist",
    "clinic"
  ]
}' |
apify call dataquarry/healthcare-facilities --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=dataquarry/healthcare-facilities",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Healthcare Facilities Scraper – OpenStreetMap (OSM)",
        "description": "Extract healthcare facilities from OpenStreetMap by area, radius, or name: pharmacies, doctors, dentists, clinics, hospitals & nursing homes. Get speciality, dispensing, contact and address. No API key; open (ODbL) data.",
        "version": "0.0",
        "x-build-id": "drM184HG3ncI2ccNz"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/dataquarry~healthcare-facilities/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-dataquarry-healthcare-facilities",
                "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/dataquarry~healthcare-facilities/runs": {
            "post": {
                "operationId": "runs-sync-dataquarry-healthcare-facilities",
                "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/dataquarry~healthcare-facilities/run-sync": {
            "post": {
                "operationId": "run-sync-dataquarry-healthcare-facilities",
                "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": {
                    "area": {
                        "title": "Area",
                        "type": "string",
                        "description": "Place to search within, e.g. \"Manchester, United Kingdom\". Geocoded to a bounding box via Nominatim. Provide this OR a bounding box OR a center for radius search."
                    },
                    "aroundLocation": {
                        "title": "Search around a location (radius)",
                        "type": "string",
                        "description": "Optional. An address or place to search AROUND within a radius. Geocoded to a center point; set the radius with \"radiusMeters\"."
                    },
                    "radiusMeters": {
                        "title": "Radius (meters)",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Radius in meters for the around-a-location search. Default 3000.",
                        "default": 3000
                    },
                    "centerPoint": {
                        "title": "Center point (advanced radius)",
                        "type": "object",
                        "description": "Optional advanced alternative: an explicit center as {\"lat\":.., \"lon\":..}. Overrides Around Location."
                    },
                    "boundingBox": {
                        "title": "Bounding box (advanced)",
                        "type": "object",
                        "description": "Explicit bounding box as {\"south\":..,\"west\":..,\"north\":..,\"east\":..}. Overrides Area."
                    },
                    "facilityTypes": {
                        "title": "Facility types",
                        "type": "array",
                        "description": "Which facility types to include. Supported: pharmacy, doctors, dentist, clinic, hospital, nursing_home. Default: all of them.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "searchTerm": {
                        "title": "Filter by name (optional)",
                        "type": "string",
                        "description": "Optional. Only return facilities whose name contains this text (case-insensitive), e.g. \"Boots\", \"NHS\"."
                    },
                    "maxResults": {
                        "title": "Max results",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum number of facilities to return.",
                        "default": 1000
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
