Doctors & Health Professionals (Spain)
Registered health professionals in Spain — degree, specialty titles, job category and practice centres with municipality, province and region — flagged by whether they are physicians.
148,666 rows in the dataset
Download the dataset
Get every row this scraper has collected as one CSV or JSONL file. If the data is older than maxAgeHours, the scraper is re-run with its configured settings first. The key needs the datasets:export scope.
DOWNLOAD_ID=$(curl -s -X POST "https://api.pandorlabs.com/v1/datasets/doctors-spain/downloads" \ -H "Authorization: Bearer $PANDORLABS_KEY" \ -H "Content-Type: application/json" \ -d '{"maxAgeHours":24,"format":"csv"}' | jq -r '.id')while true; do STATUS=$(curl -s "https://api.pandorlabs.com/v1/downloads/$DOWNLOAD_ID" \ -H "Authorization: Bearer $PANDORLABS_KEY" | jq -r '.status') [ "$STATUS" != "refreshing" ] && break sleep 5donecurl -s "https://api.pandorlabs.com/v1/downloads/$DOWNLOAD_ID/file" \ -H "Authorization: Bearer $PANDORLABS_KEY" \ -o dataset.csvAt its current 148,666 rows, this download costs 1,487 credits when the data is fresh enough, or 2,974 credits when it has to be refreshed first.
The rate is 1 credit per 100 rows cached and 2 credits live, charged on the rows in the dataset when the download becomes ready. A failed refresh is not charged. The file stays downloadable for 24 hours. See pricing.
Start a run
To choose the targets yourself, send the parameters below as input. The call returns 202 with the run; the key needs the scrapers:run scope and the account a positive credit balance.
curl -X POST "https://api.pandorlabs.com/v1/scrapers/doctors-spain/runs" \ -H "Authorization: Bearer $PANDORLABS_KEY" \ -H "Content-Type: application/json" \ -d '{ "input": { "provinces": [ "01" ], "physiciansOnly": false, "refreshAfterDays": 0, "concurrency": 2 } }'A run is billed at the live rate once it finishes: 2 credits per 100 rows it collected. A run that collects nothing costs nothing.
Parameters
Every parameter is optional. Anything you leave out uses the default shown here; an unknown name or an invalid value is rejected with a 400 that lists each problem.
Targeting
provincesenum[]
Provinces
Empty walks all 52 provinces (~541k registered professionals of every profession).
- Default
- none
- Allowed values
01020304050607080910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
physiciansOnlyboolean
Physicians only
The list has no profession filter, so every professional still costs a detail request; this only decides what is stored.
- Default
false
refreshAfterDaysnumber
Skip records refreshed within (days)
Zero refetches everyone. A full pass is several days of detail requests, so a re-run can skip anyone already fetched recently.
- Default
0- Range
- 0 to 3650
Advanced
concurrencynumber
Parallel detail requests
REPS is a slow shared government service. Keep this low.
- Default
2- Range
- 1 to 6
pageSizenumber
List page size
1,000 takes ~30 s per list call; 5,000 times out.
- Default
500- Range
- 10 to 1000
maxRecordsnumber
Max records per run
- Default
1000000- Range
- 1 to 1000000
Input as JSON Schema
The same schema the API validates against. Use it as a tool input schema or to generate a typed client.
{ "type": "object", "additionalProperties": false, "properties": { "provinces": { "type": "array", "items": { "type": "string", "enum": [ "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52" ] }, "uniqueItems": true, "title": "Provinces", "description": "Empty walks all 52 provinces (~541k registered professionals of every profession).", "default": [] }, "physiciansOnly": { "type": "boolean", "title": "Physicians only", "description": "The list has no profession filter, so every professional still costs a detail request; this only decides what is stored.", "default": false }, "refreshAfterDays": { "type": "number", "minimum": 0, "maximum": 3650, "title": "Skip records refreshed within (days)", "description": "Zero refetches everyone. A full pass is several days of detail requests, so a re-run can skip anyone already fetched recently.", "default": 0 }, "concurrency": { "type": "number", "minimum": 1, "maximum": 6, "title": "Parallel detail requests", "description": "REPS is a slow shared government service. Keep this low.", "default": 2 }, "pageSize": { "type": "number", "minimum": 10, "maximum": 1000, "title": "List page size", "description": "1,000 takes ~30 s per list call; 5,000 times out.", "default": 500 }, "maxRecords": { "type": "number", "minimum": 1, "maximum": 1000000, "title": "Max records per run", "default": 1000000 } }}Run, poll, read rows
The run is asynchronous. Poll it until it reaches a terminal status and its billing is paid, then page through its rows. Until then the rows endpoint answers 409 (still queued or running) or 402 (payment required).
RUN_ID=$(curl -s -X POST "https://api.pandorlabs.com/v1/scrapers/doctors-spain/runs" \ -H "Authorization: Bearer $PANDORLABS_KEY" \ -H "Content-Type: application/json" \ -d '{ "input": { "provinces": [ "01" ], "physiciansOnly": false, "refreshAfterDays": 0, "concurrency": 2 } }' | jq -r '.id')while true; do RUN=$(curl -s "https://api.pandorlabs.com/v1/runs/$RUN_ID" \ -H "Authorization: Bearer $PANDORLABS_KEY") STATUS=$(echo "$RUN" | jq -r '.status') BILLING=$(echo "$RUN" | jq -r '.billing.status') case "$STATUS" in queued|running) ;; *) [ "$BILLING" != "pending" ] && break ;; esac sleep 5doneecho "$RUN" | jq '{status, rowCount, billing}'curl -s "https://api.pandorlabs.com/v1/runs/$RUN_ID/rows?page=1&limit=100" \ -H "Authorization: Bearer $PANDORLABS_KEY"See the API reference for pagination, cancelling and listing runs.
Output fields
Rows have no fixed schema; these are the fields observed in the rows collected so far. Coverage is the share of rows where the field is present.
| Field | Type | Coverage |
|---|---|---|
| categories | array | 100% |
| centre_name | string | 100% |
| centres | array | 100% |
| degrees | array | 100% |
| dependency | string | 100% |
| first_name | string | 100% |
| full_name | string | 100% |
| functions | array | 100% |
| is_physician | boolean | 100% |
| last_name | string | 100% |
| list_provinces | array | 100% |
| municipality | string | 100% |
| postal_code | string | 100% |
| practitioner_id | number | 100% |
| province | string | 100% |
| province_code | string | 100% |
| region | string | 100% |
| specialties | array | 100% |
| specialties_in_training | array | 100% |
| titles | array | 100% |
| vocational_titles | array | 100% |
| created_at | date | 100% |
| first_seen_at | date | 100% |
| last_seen_at | date | 100% |
| updated_at | date | 100% |
| _id | string | 100% |
