NHS Organisation Data Service
App · 8 actions
Look up NHS and social care organisations in England and Wales in NHS England's Organisation Data Service: find trusts, GP practices, pharmacies, care homes and integrated care boards by name, postcode or role, read one's address, roles, relationships and history by its ODS code, and run a workflow when a record changes. No account or API key required.
Actions
| Action | What it does |
|---|---|
| Get organisation | Get one organisation's full ODS record by its ODS code: name, status, address, phone, website, the dates it opened and closed, its roles, its relationships to other organisations, and the organisations it replaced or that replaced it, every code named. |
| List changed organisations | List the ODS code of every organisation whose record changed on or after a day, up to 185 days ago, to keep your own copy of the ODS up to date. |
| List deleted organisations | List the organisation records the ODS deleted in the past 185 days, with the day and the reason, so you can remove them from your own records too. |
| List record classes | List the ODS record classes: RC1 for organisations and RC2 for their sites. |
| List related organisations | List the organisations with a relationship to another one, such as those an integrated care board commissions or those located in its area. |
| List relationship types | List every kind of relationship one organisation can have to another in the ODS, such as IS COMMISSIONED BY (RE4), with its code. |
| List roles | List every role an organisation can have in the ODS, such as NHS TRUST (RO197) or GP PRACTICE (RO76), with its code. |
| Search organisations | Find NHS and social care organisations in England and Wales by name, postcode, role (such as NHS trust, GP practice or pharmacy), status, record type or the day their record last changed. |
Get organisation
Get one organisation's full ODS record by its ODS code: name, status, address, phone, website, the dates it opened and closed, its roles, its relationships to other organisations, and the organisations it replaced or that replaced it, every code named.
Inputs
- ODS code
ods_codetextRequired - The organisation's ODS code, e.g. RR8 for Leeds Teaching Hospitals, or the address of its record.
Outputs
addressobject- Its address, line by line.
address_texttext- The address on one line.
api_urltext- The address of its full record in the ODS API (JSON).
contactslist- Every contact recorded for it.
last_change_datetext- The day its ODS record last changed (YYYY-MM-DD).
legal_endtext- The day it legally ceased, when recorded.
legal_starttext- The day it legally came into being, when recorded.
nametext- The organisation's name, in capitals as the ODS holds it.
ods_codetext- The organisation's ODS code, e.g. 'RR8'.
operational_endtext- The day it stopped operating, or null if it still does.
operational_starttext- The day it started operating (YYYY-MM-DD).
phonetext- Its phone number, when recorded.
predecessorslist- The organisations it took over from.
primary_roletext- The name of its main role, e.g. 'NHS TRUST'.
primary_role_idtext- The code of its main role, e.g. 'RO197'.
record_classtext- 'RC1' for an organisation or 'RC2' for one of its sites.
record_typetext- 'Organisation' or 'Site'.
relationshipslist- Its relationships to other organisations, active ones first, newest first.
roleslist- Its roles, the main one first, then active ones, newest first.
statustext- 'Active' or 'Inactive' (closed or replaced).
successorslist- The organisations that took over from it.
summarytext- One line: its name, code, main role, since when and postcode.
websitetext- Its website, when recorded.
Example output
{
"address": {
"country": "ENGLAND",
"county": null,
"line_1": "ST. JAMES'S UNIVERSITY HOSPITAL",
"line_2": "BECKETT STREET",
"line_3": null,
"postcode": "LS9 7TF",
"town": "LEEDS",
"uprn": 72016246
},
"address_text": "ST. JAMES'S UNIVERSITY HOSPITAL, BECKETT STREET, LEEDS, LS9 7TF",
"api_url": "https://directory.spineservices.nhs.uk/ORD/2-0-0/organisations/RR8",
"contacts": [
{
"type": "Phone",
"value": "0113 243 3144"
},
{
"type": "Website",
"value": "https://www.leedsth.nhs.uk/"
}
],
"last_change_date": "2023-11-14",
"legal_end": null,
"legal_start": null,
"name": "LEEDS TEACHING HOSPITALS NHS TRUST",
"ods_code": "RR8",
"operational_end": null,
"operational_start": "1998-04-01",
"phone": "0113 243 3144",
"predecessors": [
{
"effective_date": "1998-04-01",
"ods_code": "RQR",
"primary_role": "NHS TRUST",
"primary_role_id": "RO197"
},
{
"effective_date": "1998-04-01",
"ods_code": "RQS",
"primary_role": "NHS TRUST",
"primary_role_id": "RO197"
}
],
"primary_role": "NHS TRUST",
"primary_role_id": "RO197",
"record_class": "RC1",
"record_type": "Organisation",
"relationships": [
{
"end": null,
"relationship": "IS PARTNER TO",
"relationship_id": "RE8",
"start": "2023-07-01",
"status": "Active",
"target_ods_code": "QWO",
"target_primary_role": "STRATEGIC PARTNERSHIP",
"target_primary_role_id": "RO261"
},
{
"end": null,
"relationship": "IS LOCATED IN THE GEOGRAPHY OF",
"relationship_id": "RE5",
"start": "2020-04-01",
"status": "Active",
"target_ods_code": "QWO",
"target_primary_role": "STRATEGIC PARTNERSHIP",
"target_primary_role_id": "RO261"
},
{
"end": "2020-03-31",
"relationship": "IS LOCATED IN THE GEOGRAPHY OF",
"relationship_id": "RE5",
"start": "2015-04-01",
"status": "Inactive",
"target_ods_code": "Q72",
"target_primary_role": "NHS ENGLAND (REGION, LOCAL OFFICE)",
"target_primary_role_id": "RO210"
},
{
"end": "2015-03-31",
"relationship": "IS LOCATED IN THE GEOGRAPHY OF",
"relationship_id": "RE5",
"start": "2014-08-14",
"status": "Inactive",
"target_ods_code": "Q52",
"target_primary_role": "NHS ENGLAND (REGION, LOCAL OFFICE)",
"target_primary_role_id": "RO210"
},
{
"end": "2014-08-31",
"relationship": "IS LOCATED IN THE GEOGRAPHY OF",
"relationship_id": "RE5",
"start": "2006-07-01",
"status": "Inactive",
"target_ods_code": "Q32",
"target_primary_role": "HEALTH AUTHORITY (HA)",
"target_primary_role_id": "RO132"
},
{
"end": "2006-06-30",
"relationship": "IS LOCATED IN THE GEOGRAPHY OF",
"relationship_id": "RE5",
"start": "2002-04-01",
"status": "Inactive",
"target_ods_code": "Q12",
"target_primary_role": "HEALTH AUTHORITY (HA)",
"target_primary_role_id": "RO132"
},
{
"end": "2002-03-31",
"relationship": "IS LOCATED IN THE GEOGRAPHY OF",
"relationship_id": "RE5",
"start": "1998-04-01",
"status": "Inactive",
"target_ods_code": "QDH",
"target_primary_role": "HEALTH AUTHORITY (HA)",
"target_primary_role_id": "RO132"
}
],
"roles": [
{
"end": null,
"primary": true,
"role": "NHS TRUST",
"role_id": "RO197",
"start": "1998-04-01",
"status": "Active"
}
],
"status": "Active",
"successors": [],
"summary": "LEEDS TEACHING HOSPITALS NHS TRUST (RR8): NHS TRUST, active since 1998-04-01, LS9 7TF.",
"website": "https://www.leedsth.nhs.uk/"
}List changed organisations
List the ODS code of every organisation whose record changed on or after a day, up to 185 days ago, to keep your own copy of the ODS up to date.
Inputs
- Changed on or after
changed_sincedateRequired - The first day to include, at most 185 days ago.
Outputs
changed_sincetext- The day the list starts from (YYYY-MM-DD).
countnumber- How many organisations changed.
ods_codeslist- The ODS code of every organisation changed on or after that day.
summarytext- One line saying how many changed.
Example output
{
"changed_since": "2026-10-30",
"count": 4,
"ods_codes": [
"A4J2T",
"B2T5Q",
"C3H3L",
"E0R6S"
],
"summary": "4 organisations changed on or after 2026-10-30."
}List deleted organisations
List the organisation records the ODS deleted in the past 185 days, with the day and the reason, so you can remove them from your own records too.
Inputs
None.
Outputs
countnumber- How many organisations were deleted.
organisationslist- The deleted organisations, most recently deleted first.
summarytext- One line saying how many.
Example output
{
"count": 2,
"organisations": [
{
"deleted_on": "2026-09-03",
"ods_code": "E2I6T",
"primary_role": "PHARMACY HEADQUARTER",
"primary_role_id": "RO181",
"reason": "HUMAN ERROR"
},
{
"deleted_on": "2026-04-22",
"ods_code": "EE133098",
"primary_role": "SCHOOL",
"primary_role_id": "RO221",
"reason": "HUMAN ERROR"
}
],
"summary": "2 organisations were deleted in the past 185 days."
}List record classes
List the ODS record classes: RC1 for organisations and RC2 for their sites.
Inputs
None.
Outputs
countnumber- How many record classes there are.
record_classeslist- Every record class.
Example output
{
"count": 2,
"record_classes": [
{
"code": "1",
"name": "HSCOrg",
"record_class": "RC1",
"record_type": "Organisation"
},
{
"code": "2",
"name": "HSCSite",
"record_class": "RC2",
"record_type": "Site"
}
]
}List related organisations
List the organisations with a relationship to another one, such as those an integrated care board commissions or those located in its area. Returns a page at a time.
Inputs
- Related to (ODS code)
ods_codetextRequired - The ODS code of the organisation they relate to, e.g. QWO for NHS West Yorkshire Integrated Care Board.
- Relationship
relationshiptextRequired - How they relate to it, e.g. IS COMMISSIONED BY or IS LOCATED IN THE GEOGRAPHY OF.
- Relationship status
relationship_statustext - Only relationships that are still active, or only ended ones. Leave blank for both.One of:
Active,Inactive(Ended). - Changed on or after
last_changed_sincedate - Only organisations whose record changed on or after this day, at most 185 days ago.
- Limit
limitnumber - How many organisations to return, from 1 to 1,000. Defaults to 20.From 1 to 1000. Default:
20. - Offset
offsetnumber - How many matches to skip, for the next page: use the previous answer's next offset. Defaults to 0.From 0 to 1000000. Default:
0.
Outputs
countnumber- How many organisations are on this page.
has_moretrue/false- True when more matches follow this page.
limitnumber- The most organisations a page holds.
next_offsetnumber- The offset for the next page, or null on the last page.
offsetnumber- How many matches were skipped before this page.
organisationslist- The organisations on this page, in the order the ODS lists them.
related_totext- The ODS code of the organisation they are related to.
relationshiptext- The relationship's name, e.g. 'IS COMMISSIONED BY'.
relationship_idtext- The code of the relationship, e.g. 'RE4'.
summarytext- One line saying how many matched and which are shown.
totalnumber- How many organisations match in all.
Example output
{
"count": 2,
"has_more": true,
"limit": 2,
"next_offset": 2,
"offset": 0,
"organisations": [
{
"api_url": "https://directory.spineservices.nhs.uk/ORD/2-0-0/organisations/209",
"last_change_date": "2026-06-09",
"name": "CITY OF BRADFORD METROPOLITAN DISTRICT COUNCIL",
"ods_code": "209",
"postcode": "BD1 1HX",
"primary_role": "LOCAL AUTHORITY",
"primary_role_id": "RO141",
"record_class": "RC1",
"record_type": "Organisation",
"status": "Active"
},
{
"api_url": "https://directory.spineservices.nhs.uk/ORD/2-0-0/organisations/210",
"last_change_date": "2026-06-09",
"name": "CALDERDALE METROPOLITAN BOROUGH COUNCIL",
"ods_code": "210",
"postcode": "HX1 1UJ",
"primary_role": "LOCAL AUTHORITY",
"primary_role_id": "RO141",
"record_class": "RC1",
"record_type": "Organisation",
"status": "Active"
}
],
"related_to": "QWO",
"relationship": "IS PARTNER TO",
"relationship_id": "RE8",
"summary": "Found 17 organisations that are partner to QWO; showing 1 to 2.",
"total": 17
}List relationship types
List every kind of relationship one organisation can have to another in the ODS, such as IS COMMISSIONED BY (RE4), with its code.
Inputs
None.
Outputs
countnumber- How many relationship types there are.
relationship_typeslist- Every relationship type, by name.
Example output
{
"count": 9,
"relationship_types": [
{
"code": "2",
"name": "IS A SUB-DIVISION OF",
"relationship_id": "RE2"
},
{
"code": "4",
"name": "IS COMMISSIONED BY",
"relationship_id": "RE4"
},
{
"code": "11",
"name": "IS CONSTITUENT OF",
"relationship_id": "RE11"
},
{
"code": "10",
"name": "IS COVID NOMINATED PAYEE FOR",
"relationship_id": "RE10"
},
{
"code": "3",
"name": "IS DIRECTED BY",
"relationship_id": "RE3"
},
{
"code": "5",
"name": "IS LOCATED IN THE GEOGRAPHY OF",
"relationship_id": "RE5"
},
{
"code": "9",
"name": "IS NOMINATED PAYEE FOR",
"relationship_id": "RE9"
},
{
"code": "6",
"name": "IS OPERATED BY",
"relationship_id": "RE6"
},
{
"code": "8",
"name": "IS PARTNER TO",
"relationship_id": "RE8"
}
]
}List roles
List every role an organisation can have in the ODS, such as NHS TRUST (RO197) or GP PRACTICE (RO76), with its code.
Inputs
None.
Outputs
countnumber- How many roles there are.
roleslist- Every role, by name.
Example output
{
"count": 10,
"roles": [
{
"code": "98",
"name": "CLINICAL COMMISSIONING GROUP",
"primary": true,
"role_id": "RO98"
},
{
"code": "76",
"name": "GP PRACTICE",
"primary": false,
"role_id": "RO76"
},
{
"code": "132",
"name": "HEALTH AUTHORITY (HA)",
"primary": true,
"role_id": "RO132"
},
{
"code": "210",
"name": "NHS ENGLAND (REGION, LOCAL OFFICE)",
"primary": true,
"role_id": "RO210"
},
{
"code": "197",
"name": "NHS TRUST",
"primary": true,
"role_id": "RO197"
},
{
"code": "198",
"name": "NHS TRUST SITE",
"primary": true,
"role_id": "RO198"
},
{
"code": "181",
"name": "PHARMACY HEADQUARTER",
"primary": true,
"role_id": "RO181"
},
{
"code": "177",
"name": "PRESCRIBING COST CENTRE",
"primary": true,
"role_id": "RO177"
},
{
"code": "221",
"name": "SCHOOL",
"primary": true,
"role_id": "RO221"
},
{
"code": "261",
"name": "STRATEGIC PARTNERSHIP",
"primary": true,
"role_id": "RO261"
}
]
}Search organisations
Find NHS and social care organisations in England and Wales by name, postcode, role (such as NHS trust, GP practice or pharmacy), status, record type or the day their record last changed. Each comes with its ODS code, main role, status and postcode. Returns a page at a time.
Inputs
- Name contains
nametext - Part of the organisation's name, at least 3 letters, e.g. leeds teaching. Leave blank for any name.
- Postcode
postcodetext - A full postcode, e.g. LS9 7TF, or its start, e.g. LS9. Leave blank for anywhere.
- Role
roletext - Only organisations with this role, as their main role or another one, e.g. NHS TRUST or GP PRACTICE. Leave blank for every role.
- Status
statustext - Only active organisations, or only closed and replaced ones. Leave blank for both.One of:
Active,Inactive(Inactive (closed or replaced)). - Record type
record_classtext - Only organisations, or only their sites (a hospital or clinic of a trust, for example). Leave blank for both.One of:
RC1(Organisations),RC2(Sites). - Changed on or after
last_changed_sincedate - Only organisations whose record changed on or after this day, at most 185 days ago.
- Limit
limitnumber - How many organisations to return, from 1 to 1,000. Defaults to 20.From 1 to 1000. Default:
20. - Offset
offsetnumber - How many matches to skip, for the next page: use the previous answer's next offset. Defaults to 0.From 0 to 1000000. Default:
0.
Outputs
countnumber- How many organisations are on this page.
has_moretrue/false- True when more matches follow this page.
limitnumber- The most organisations a page holds.
next_offsetnumber- The offset for the next page, or null on the last page.
offsetnumber- How many matches were skipped before this page.
organisationslist- The organisations on this page, in the order the ODS lists them.
summarytext- One line saying how many matched and which are shown.
totalnumber- How many organisations match in all.
Example output
{
"count": 1,
"has_more": false,
"limit": 5,
"next_offset": null,
"offset": 0,
"organisations": [
{
"api_url": "https://directory.spineservices.nhs.uk/ORD/2-0-0/organisations/RR8",
"last_change_date": "2023-11-14",
"name": "LEEDS TEACHING HOSPITALS NHS TRUST",
"ods_code": "RR8",
"postcode": "LS9 7TF",
"primary_role": "NHS TRUST",
"primary_role_id": "RO197",
"record_class": "RC1",
"record_type": "Organisation",
"status": "Active"
}
],
"summary": "Found 1 organisation; showing 1 to 1.",
"total": 1
}