Open Data NHS Scotland API
Overview
Open Data NHS Scotland is a free public data platform maintained by Public Health Scotland, offering datasets on hospitals, patient activity, waiting times, and health statistics across Scotland. All datasets are available via a REST API with no authentication needed and can be exported as JSON or CSV. It is a great resource for researchers, journalists, and health tech developers.
Beginner Tip
Browse the dataset catalog at opendata.nhs.scot first to find the resource ID for the dataset you want, then use that ID in the /api/3/action/datastore_search endpoint.
Available Data
Example Response
{
"status": "success",
"data": {
"result": "Data from Open Data NHS Scotland",
"description": "Medical reference data and statistics by Public Health Scotland",
"timestamp": "2025-01-15T10:00:00Z"
}
} Field Reference
result Container object holding the query results and metadata. records Array of data rows matching the query. total Total number of records available in the dataset. fields Schema information describing each column name and data type. _id Auto-incremented row identifier within the datastore. Implementation Example
const url = "https://www.opendata.nhs.scot/";
const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data); What Can You Build?
Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.
Common Errors & Troubleshooting
Matrix Score Breakdown
Fully tested on Apr 5, 2026
Technical Specifications
Related Tags
Similar APIs
View All →Coronavirus
This Coronavirus API provides the latest global Covid-19 case counts, deaths, and recoveries aggregated from public health sources.
Coronavirus in the UK
The Coronavirus in the UK API provides official UK Government data on Covid-19 cases, deaths, and vaccinations broken down by region and nation.
Covid Tracking Project
⭐ Beginner's PickThe Covid Tracking Project API provides historical US Covid-19 data including tests, hospitalizations, and deaths at the state and national level.
Covid-19
Covid-19 provides programmatic access to covid 19 spread, infection and recovery via REST API.
Covid-19
⭐ Beginner's PickThe Covid-19 API by M-Media Group provides daily case counts, deaths, and recoveries for every country in the world.