How to Run Your Own Prescribing Data Analysis on OpenPrescribing
Updated
OpenPrescribing provides a flexible query form that lets you pull custom prescribing data instead of relying only on the pre-built dashboards. Use it when you have a specific question — a particular drug, practice, time period, or comparison — that the standard dashboards don't answer. The site is built by the Bennett Institute for Applied Data Science at the University of Oxford, and it repackages the anonymised GP prescription data that NHS England publishes monthly (roughly 17 million rows per month in the raw files).
What the custom analysis tool is for
The dashboards cover standard prescribing measures for every ICB, Sub-ICB Location, practice, and hospital. The query form is the escape hatch for everything else: ad-hoc questions, unusual combinations of filters, or data you want to extract and work with yourself.
Typical reasons to use it:
- You want prescribing data for a specific drug or BNF section that isn't on a standard dashboard.
- You want to compare several practices or areas on a measure you define.
- You want to check a trend over a custom time window.
- You want the underlying numbers rather than a chart.
Step-by-step: running a query
- Go to the query form. From the OpenPrescribing homepage, select Start analysing under "Run your own analyses." This opens the flexible query form.
- Choose what you're measuring. Select the drug, chemical, BNF section, or prescribing measure you're interested in. The form is built around BNF coding, so knowing the relevant BNF section or chemical name helps.
- Set the scope. Pick the organisation level you want — practice, PCN, Sub-ICB Location, ICB, regional team, hospital, or All England.
- Set the time period. Choose the months or date range you want included.
- Run the query. The form returns the data for your selection, which you can then read on screen or take further.
- Verify the result. Sanity-check the output against a known dashboard figure for the same organisation and period. If the numbers diverge, your filters are probably narrower or broader than you intended.
Expected result: a dataset scoped exactly to your question, rather than the fixed view a dashboard gives you.
Other entry points worth knowing
The query form isn't the only way in. Depending on your question, one of these may be faster:
| If you want to… | Use |
|---|---|
| See standard measures for a practice | Find a practice |
| See standard measures for a Sub-ICB Location | Find a Sub-ICB Location |
| See national trends for a drug or BNF section | Find a drug (Trends) |
| Look at hospital drug data | Find a hospital |
| Check Drug Tariff prices and concessions (England, from 2010) | Look at prices |
| Pull data programmatically | The API |
The API is the right choice if you need to automate pulls or feed data into another tool. The query form is better for one-off exploration.
Practical points and common snags
- BNF coding is the backbone. Queries are organised by BNF section and chemical, so unfamiliar drug names may need checking against the dm+d or BNF structure first.
- The data is anonymised and published monthly. It reflects prescriptions issued by GPs in England; it is not real-time.
- Cite it properly. If you use the data or graphs, the site asks you to cite: OpenPrescribing.net, Bennett Institute for Applied Data Science, University of Oxford, 2026.
- Read the usage guidelines. The site points to its guidelines for using the data and its FAQ — worth checking before publishing anything derived from it.
- Hospital data is newer. Hospital drug data has been added more recently than the GP data, and new measures continue to launch (for example, an anticoagulation measure and an AIR/MART inhaler measure in September 2026), so coverage varies by dataset.
When to use the query form vs. a dashboard
Use a dashboard when your question matches a standard prescribing measure for a practice, PCN, Sub-ICB Location, ICB, regional team, or hospital — it's faster and already contextualised. Use the query form when your question is bespoke, when you need a custom combination of drug, geography, and time, or when you want the raw numbers to analyse yourself. If you're unsure, start with the dashboard for the organisation and see whether it already answers you; if not, move to the query form.