OpenPrescribing Measures API

Standardised NHS prescribing-quality and safety measures.

Operations 7

GET /measure/ Global (all-England) measure values #
GET /measure_by_regional_team/ Measure values by Regional Team #
GET /measure_by_icb/ Measure values by ICB (STP) #
GET /measure_by_sicbl/ Measure values by Sub-ICB Location (CCG) #
GET /measure_by_pcn/ Measure values by Primary Care Network (PCN) #
GET /measure_by_practice/ Measure values by GP practice #
GET /measure_numerators_by_org/ Measure numerator breakdown by organisation #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/openprescribing-measures-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

openprescribing-measures-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: OpenPrescribing Measures API
  version: '1.0'
  summary: Free, open, key-less REST API over English NHS primary-care prescribing data.
  description: OpenPrescribing.net exposes NHS England primary-care (GP) prescribing data as a free, public, RESTful API. It is built and operated by the Bennett Institute for Applied Data Science at the University of Oxford on top of the English Prescribing Dataset published monthly by the NHS Business Services Authority. The API returns prescribing spending, quantity and item counts by BNF code and by NHS organisation (practice, PCN, Sub-ICB Location / CCG, ICB / STP, Regional Team), standardised prescribing-quality measures, drug-tariff and price-per-unit data, ghost-generic savings, and organisation reference and boundary lookups. Responses are JSON or CSV; organisation-location endpoints return GeoJSON. No registration, API key or OAuth is required. This specification was generated by API Evangelist by reading the public, MIT-licensed Django source (openprescribing/api/urls.py and the api/views_*.py modules); it is not a provider-published spec.
  license:
    name: MIT
    url: https://github.com/bennettoxford/openprescribing/blob/main/LICENSE.txt
  contact:
    name: Bennett Institute for Applied Data Science
    url: https://openprescribing.net/api/
servers:
- url: https://openprescribing.net/api/1.0
  description: Production
tags:
- name: Measures
  description: Standardised NHS prescribing-quality and safety measures.
paths:
  /measure/:
    get:
      operationId: getMeasures
      summary: Global (all-England) measure values
      description: National (all-England) values for one or more standardised prescribing measures.
      tags:
      - Measures
      parameters:
      - $ref: '#/components/parameters/measure'
      - $ref: '#/components/parameters/tags'
      - $ref: '#/components/parameters/format'
      responses:
        '200':
          $ref: '#/components/responses/MeasureList'
  /measure_by_regional_team/:
    get:
      operationId: getMeasureByRegionalTeam
      summary: Measure values by Regional Team
      tags:
      - Measures
      parameters:
      - $ref: '#/components/parameters/measure'
      - $ref: '#/components/parameters/tags'
      - $ref: '#/components/parameters/orgList'
      - $ref: '#/components/parameters/parentOrgType'
      - $ref: '#/components/parameters/aggregate'
      - $ref: '#/components/parameters/format'
      responses:
        '200':
          $ref: '#/components/responses/MeasureList'
        '400':
          $ref: '#/components/responses/BadRequest'
  /measure_by_icb/:
    get:
      operationId: getMeasureByIcb
      summary: Measure values by ICB (STP)
      tags:
      - Measures
      parameters:
      - $ref: '#/components/parameters/measure'
      - $ref: '#/components/parameters/tags'
      - $ref: '#/components/parameters/orgList'
      - $ref: '#/components/parameters/parentOrgType'
      - $ref: '#/components/parameters/aggregate'
      - $ref: '#/components/parameters/format'
      responses:
        '200':
          $ref: '#/components/responses/MeasureList'
        '400':
          $ref: '#/components/responses/BadRequest'
  /measure_by_sicbl/:
    get:
      operationId: getMeasureBySicbl
      summary: Measure values by Sub-ICB Location (CCG)
      tags:
      - Measures
      parameters:
      - $ref: '#/components/parameters/measure'
      - $ref: '#/components/parameters/tags'
      - $ref: '#/components/parameters/orgList'
      - $ref: '#/components/parameters/parentOrgType'
      - $ref: '#/components/parameters/aggregate'
      - $ref: '#/components/parameters/format'
      responses:
        '200':
          $ref: '#/components/responses/MeasureList'
        '400':
          $ref: '#/components/responses/BadRequest'
  /measure_by_pcn/:
    get:
      operationId: getMeasureByPcn
      summary: Measure values by Primary Care Network (PCN)
      tags:
      - Measures
      parameters:
      - $ref: '#/components/parameters/measure'
      - $ref: '#/components/parameters/tags'
      - $ref: '#/components/parameters/orgList'
      - $ref: '#/components/parameters/parentOrgType'
      - $ref: '#/components/parameters/aggregate'
      - $ref: '#/components/parameters/format'
      responses:
        '200':
          $ref: '#/components/responses/MeasureList'
        '400':
          $ref: '#/components/responses/BadRequest'
  /measure_by_practice/:
    get:
      operationId: getMeasureByPractice
      summary: Measure values by GP practice
      tags:
      - Measures
      parameters:
      - $ref: '#/components/parameters/measure'
      - $ref: '#/components/parameters/tags'
      - $ref: '#/components/parameters/orgList'
      - $ref: '#/components/parameters/parentOrgType'
      - $ref: '#/components/parameters/aggregate'
      - $ref: '#/components/parameters/format'
      responses:
        '200':
          $ref: '#/components/responses/MeasureList'
        '400':
          $ref: '#/components/responses/BadRequest'
  /measure_numerators_by_org/:
    get:
      operationId: getMeasureNumeratorsByOrg
      summary: Measure numerator breakdown by organisation
      description: The individual presentations that make up a measure's numerator, broken down for a given organisation.
      tags:
      - Measures
      parameters:
      - name: measure
        in: query
        required: true
        schema:
          type: string
        description: Single measure id.
      - name: org_type
        in: query
        schema:
          type: string
        description: Organisation type.
      - name: org
        in: query
        schema:
          type: string
        description: Organisation code.
      - $ref: '#/components/parameters/format'
      responses:
        '200':
          $ref: '#/components/responses/GenericList'
        '400':
          $ref: '#/components/responses/BadRequest'
components:
  schemas:
    MeasureValue:
      type: object
      properties:
        measure:
          type: string
        org_type:
          type: string
        org_id:
          type: string
        org_name:
          type: string
        date:
          type: string
          format: date
        numerator:
          type: number
        denominator:
          type: number
        calc_value:
          type:
          - number
          - 'null'
        percentile:
          type:
          - number
          - 'null'
    Error:
      type: object
      description: Django REST Framework error envelope.
      properties:
        detail:
          type: string
  parameters:
    orgList:
      name: org
      in: query
      schema:
        type: string
      description: Comma-separated list of NHS organisation codes.
    parentOrgType:
      name: parent_org_type
      in: query
      schema:
        type: string
      description: Parent organisation type to scope the query to.
    format:
      name: format
      in: query
      schema:
        type: string
        enum:
        - json
        - csv
        default: json
      description: Response format. May also be supplied as a URL suffix (.json / .csv) via DRF format_suffix_patterns.
    tags:
      name: tags
      in: query
      schema:
        type: string
      description: Comma-separated list of measure tags to filter by.
    measure:
      name: measure
      in: query
      schema:
        type: string
      description: Comma-separated list of measure ids.
    aggregate:
      name: aggregate
      in: query
      schema:
        type: boolean
      description: Aggregate values across all organisations of the requested type.
  responses:
    GenericList:
      description: A list of result objects.
      content:
        application/json:
          schema:
            type: array
            items:
              type: object
        text/csv:
          schema:
            type: string
    MeasureList:
      description: A list of measure values.
      content:
        application/json:
          schema:
            type: array
            items:
              $ref: '#/components/schemas/MeasureValue'
        text/csv:
          schema:
            type: string
    BadRequest:
      description: Invalid request (bad/missing parameter, unrecognised org type, invalid code).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'