# Apotheek.be Scraper — Belgian Pharmacy Finder & Locations (`studio-amba/apotheek-scraper`) Actor

Find Belgian pharmacies by location using Apotheek.be. Get names, addresses, phone numbers, GPS coordinates, APB numbers, opening hours, and duty pharmacy status.

- **URL**: https://apify.com/studio-amba/apotheek-scraper.md
- **Developed by:** [Jelle Desramaults](https://apify.com/studio-amba) (community)
- **Categories:** Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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

## Apotheek.be Scraper

Find and extract data for Belgian pharmacies by location. Get names, addresses, phone numbers, GPS coordinates, APB registration numbers, and on-duty status for any pharmacy in Belgium.

### What is Apotheek.be Scraper?

Apotheek.be is the official pharmacy directory for Belgium, maintained by the APB (Association Pharmaceutique Belge). It covers all ~5,000 registered pharmacies in the country with their locations, contact details, and real-time duty schedules. This is not a product scraper — it is a pharmacy location and directory scraper.

The actor geocodes your search queries (city names, postal codes, or addresses) and queries Apotheek.be's search system to return the nearest pharmacies with structured data. Perfect for building pharmacy finder apps, analyzing pharmacy density in Belgian municipalities, or enriching location-based health service databases.

**Common use cases:**

- **Pharmacy finder applications** — Build location-aware apps that show users the nearest open pharmacy with GPS coordinates for navigation
- **Healthcare market analysis** — Map pharmacy density across Belgian cities and regions to identify underserved areas
- **On-duty pharmacy tracking** — Find which pharmacies are currently on night/weekend duty (wachtdienst) in any Belgian location
- **Business location intelligence** — Analyze the competitive landscape for new pharmacy locations or health-related retail openings
- **Contact data enrichment** — Get phone numbers and addresses for Belgian pharmacies to enrich CRM or directory databases

### What data does Apotheek.be Scraper extract?

- 🏥 **Pharmacy name** — Official registered name of the pharmacy
- 📍 **Full address** — Street address, postal code, and city
- 📞 **Phone number** — Direct phone line for the pharmacy
- 🗺️ **GPS coordinates** — Latitude and longitude for mapping and distance calculations
- 🆔 **APB number** — Official registration number from the Belgian pharmaceutical association
- 📏 **Distance** — How far the pharmacy is from the search location (in km)
- 🟢 **On-duty status** — Whether the pharmacy is currently serving as the duty pharmacy (wachtapotheek)
- 🕐 **Opening hours** — Available when displayed on the search results page

### How to scrape Apotheek.be

The scraper works by searching for pharmacies near a location. You provide one or more search queries, and the actor geocodes them and returns the closest pharmacies for each location.

#### Search by city name
Enter Belgian city names like "Brussel", "Antwerpen", "Gent", or "Luik".

#### Search by postal code
Use Belgian postal codes: "1000" (Brussels), "2000" (Antwerp), "9000" (Ghent).

#### Search by address
Provide specific addresses: "Meir 1, Antwerpen" or "Rue Neuve, Bruxelles".

#### Multiple locations
Pass multiple search queries to scan multiple areas in a single run. Each query returns the nearest pharmacies.

#### Input parameters

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `searchQueries` | Array of strings | `["Brussel"]` | City names, postal codes, or addresses to search |
| `maxResults` | Integer | 100 | Maximum total pharmacies to return |
| `proxyConfiguration` | Object | — | Proxy settings |

**Tip:** To get nationwide coverage, pass all 10 Belgian provinces as separate search queries: Brussel, Antwerpen, Oost-Vlaanderen, West-Vlaanderen, Limburg, Vlaams-Brabant, Waals-Brabant, Henegouwen, Luik, Luxemburg, Namen.

### Output

```json
{
    "pharmacyName": "Apotheek De Witte Leeuw",
    "address": "Kerkstraat 42",
    "postalCode": "2000",
    "city": "Antwerpen",
    "phone": "03 231 45 67",
    "apbNumber": "108234",
    "latitude": 51.2194,
    "longitude": 4.4025,
    "distance": 0.3,
    "onDuty": false,
    "openingHours": "Ma-Vr 9:00-18:30, Za 9:00-13:00",
    "url": "https://www.apotheek.be/PharmacySearch",
    "scrapedAt": "2026-04-03T10:15:00.000Z"
}
````

### How much does it cost?

The scraper makes one geocoding call (via OpenStreetMap Nominatim) and one POST request per search query. Very lightweight.

| Volume | Estimated CU | Estimated Cost |
|--------|-------------|----------------|
| 1 location (20-30 pharmacies) | ~0.01 CU | < $0.01 |
| 10 locations (~200 pharmacies) | ~0.05 CU | ~$0.03 |
| All Belgian provinces | ~0.1 CU | ~$0.05 |

This is one of the cheapest scrapers to run. No browser rendering, no pagination loops.

### Can I integrate?

Yes. Export pharmacy location data wherever you need it:

- **Google Sheets** — Maintain a live pharmacy directory spreadsheet
- **Google Maps / Mapbox** — Use GPS coordinates to plot pharmacies on interactive maps
- **Webhooks** — Trigger notifications when on-duty pharmacy data changes
- **Zapier / Make / n8n** — Route pharmacy data into CRM systems or databases
- **Amazon S3 / Google Cloud** — Archive pharmacy directory snapshots
- **REST API** — Query pharmacy locations programmatically from your app

### Can I use it as an API?

Yes. Build pharmacy finder features directly into your applications.

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_API_TOKEN")

run = client.actor("studio-amba/apotheek-scraper").call(run_input={
    "searchQueries": ["Antwerpen", "Gent", "Brussel"],
    "maxResults": 200,
})

for pharmacy in client.dataset(run["defaultDatasetId"]).iterate_items():
    duty = " [ON DUTY]" if pharmacy.get("onDuty") else ""
    print(f"{pharmacy['pharmacyName']} — {pharmacy['postalCode']} {pharmacy['city']}{duty}")
    if pharmacy.get("latitude"):
        print(f"  GPS: {pharmacy['latitude']}, {pharmacy['longitude']}")
```

#### JavaScript

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

const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });

const run = await client.actor('studio-amba/apotheek-scraper').call({
    searchQueries: ['Antwerpen', 'Gent', 'Brussel'],
    maxResults: 200,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach(pharmacy => {
    const duty = pharmacy.onDuty ? ' [ON DUTY]' : '';
    console.log(`${pharmacy.pharmacyName} — ${pharmacy.postalCode} ${pharmacy.city}${duty}`);
});
```

### FAQ

**How many pharmacies are in Belgium?**
Belgium has approximately 4,900 registered pharmacies. With enough search queries covering different regions, you can build a near-complete directory of all Belgian pharmacies.

**What is the APB number?**
The APB (Association Pharmaceutique Belge) number is the official registration identifier assigned to every licensed pharmacy in Belgium. It is unique per pharmacy and can be used as a stable identifier for deduplication across multiple scrape runs.

**Can I find pharmacies that are currently on duty?**
Yes. The `onDuty` field indicates whether a pharmacy is currently serving as the duty pharmacy (wachtapotheek/pharmacie de garde). In Belgium, pharmacies rotate night and weekend duty on a schedule. Run the scraper to get the current duty status.

**Why are some fields empty?**
Not all pharmacies display their phone number or opening hours on Apotheek.be. The scraper extracts what is available on the search results page. GPS coordinates are almost always available.

**How accurate is the geocoding?**
The scraper uses OpenStreetMap Nominatim for geocoding search queries, which is generally accurate for Belgian cities and postal codes. For very specific addresses, results may vary. The search is scoped to Belgium automatically.

**Can I filter for pharmacies offering COVID testing or vaccinations?**
The underlying Apotheek.be search supports these filters, but they are not currently exposed as input parameters. Contact us if you need this feature added.

**How does the search radius work?**
Apotheek.be returns the nearest pharmacies to your search location, typically within a 5-10 km radius. Densely populated areas like Brussels or Antwerp will return more pharmacies than rural towns. The `distance` field in the output tells you exactly how far each pharmacy is from your search point, allowing you to set your own radius filter post-scraping.

### Tips for building a Belgian pharmacy database

Here is how to get the most comprehensive coverage from this scraper:

1. **Cover all postal codes** — Belgium has postal codes from 1000 to 9999. For full national coverage, generate a list of major cities or use postal code ranges as search queries.
2. **Deduplicate on APB number** — When running multiple search queries, pharmacies near borders between search areas will appear in multiple results. Use the `apbNumber` field to deduplicate.
3. **Combine with product scrapers** — Use this scraper to build your pharmacy directory, then use our Farmaline, Viata, or Multipharma scrapers to get product and pricing data. Together, they give you a complete picture of the Belgian pharmacy landscape.
4. **Monitor duty schedules** — The `onDuty` field changes based on the time of scraping. Schedule runs at different times to build a duty rotation calendar.
5. **Build distance matrices** — Use the GPS coordinates to calculate distances between pharmacies, identify pharmacy deserts, or optimize delivery routes.

### Limitations

- The scraper returns pharmacies near each search location — it is not a full database dump of all Belgian pharmacies
- Opening hours are extracted from HTML cards and may not always parse perfectly
- The anti-forgery token system means each search requires a GET + POST request pair
- Geocoding depends on OpenStreetMap Nominatim availability (free service, occasional rate limits)
- This is a location directory scraper only — it does not scrape product prices or inventory

### Other pharmacy scrapers

Need product and pricing data from Belgian pharmacies? Pair this directory scraper with our product scrapers:

- [Farmaline Scraper](https://apify.com/studio-amba/farmaline-scraper) — Belgium's largest online pharmacy (70,000+ products, bilingual NL/FR)
- [Multipharma Scraper](https://apify.com/studio-amba/multipharma-scraper) — One of Belgium's largest pharmacy chains (230+ locations)
- [Viata Scraper](https://apify.com/studio-amba/viata-scraper) — Belgian online pharmacy with health and wellness products
- [Shop Apotheke Scraper](https://apify.com/studio-amba/shopapotheke-scraper) — Europe's leading online pharmacy (includes Belgian store)
- [dm Scraper](https://apify.com/studio-amba/dm-scraper) — Germany's largest drugstore chain (beauty, health, household)
- [Matas Scraper](https://apify.com/studio-amba/matas-scraper) — Denmark's leading beauty and pharmacy retailer

### Your feedback

Building a pharmacy finder app for Belgium? Need to add filters for services like COVID testing? Want bulk coverage of all Belgian pharmacies? [Open an issue](https://console.apify.com/actors/studio-amba/apotheek-scraper/issues) or reach out on Apify. We are happy to extend this scraper based on your needs.

# Actor input Schema

## `searchQueries` (type: `array`):

List of search queries — city names, postal codes, or addresses (e.g., 'Brussel', '1000', 'Antwerpen'). Each query returns the closest pharmacies.

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

Maximum total number of pharmacies to return across all queries.

## `proxyConfiguration` (type: `object`):

Proxy settings for the scraper.

## Actor input object example

```json
{
  "searchQueries": [
    "Brussel"
  ],
  "maxResults": 100
}
```

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("studio-amba/apotheek-scraper").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("studio-amba/apotheek-scraper").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 '{}' |
apify call studio-amba/apotheek-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Apotheek.be Scraper — Belgian Pharmacy Finder & Locations",
        "description": "Find Belgian pharmacies by location using Apotheek.be. Get names, addresses, phone numbers, GPS coordinates, APB numbers, opening hours, and duty pharmacy status.",
        "version": "0.1",
        "x-build-id": "FtWpkLBTJ38dsVHuG"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/studio-amba~apotheek-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-studio-amba-apotheek-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/studio-amba~apotheek-scraper/runs": {
            "post": {
                "operationId": "runs-sync-studio-amba-apotheek-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/studio-amba~apotheek-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-studio-amba-apotheek-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": {
                    "searchQueries": {
                        "title": "Search Queries",
                        "type": "array",
                        "description": "List of search queries — city names, postal codes, or addresses (e.g., 'Brussel', '1000', 'Antwerpen'). Each query returns the closest pharmacies.",
                        "default": [
                            "Brussel"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxResults": {
                        "title": "Max Results",
                        "minimum": 1,
                        "maximum": 10000,
                        "type": "integer",
                        "description": "Maximum total number of pharmacies to return across all queries.",
                        "default": 100
                    },
                    "proxyConfiguration": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Proxy settings for the scraper."
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
