ODS FHIR API 422 Unprocessable Entity retrieving larger amounts of data

Hi, previously we’ve been using the ODS data dumps from TRUD for practitioner and org data and converting them to FHIR.
We’re looking to switch to the Organisation Data Terminology FHIR API but are encountering an issue - “Response exceeds APIM size limit”, code “too-costly”.

I tried paging the data using the _count parameter but that fails reporting that it’s an unsupported search parameter (the /metadata CapabilityStatement suggests it should work though).

Are there static exports of this data available? Realistically we need the full data locally so can’t just query the API for each item as needed, and this is occurring when attempting to access the CodeSystem/practitioner-relationship-instance-2025-03-27 CodeSystem.

Hi Robert

The Organisation Data Terminology FHIR R4 API feeds our user interface - ODS Data Search and Export.

ODS Data Search and Export

This UI provides predefined reports that mirror our .csv files and data packs on TRUD. You can export packs of reports via the UI, or it has its own API endpoint where you can schedule/automate report downloads (replicating TRUD functionality).

If you open DSE and click on Help and Guidance<DSE Reports<Automate/Schedule the Download of Report Packages, this will tell you more. We are asking users to raise an access request through our Helpdesk just so that we can gather user intelligence.

Communications are being sent out (hopefully this week) to all those subscribed to the Org Ref Data TRUD pack, explaining how to obtain equivalent data via DSE so you should receive this too.

Many thanks

Laura, ODS

Hi Laura,

Does this mean the FHIR data is not available for download, only for querying via the API? If we need the full data then it’s still CSV files?

Many thanks,

Rob

Hi Rob

Yes, data is only available in FHIR format via the API.

If you would like to share the query you were making to the practitioner-relationship-instance CodeSystem that returned the ‘too costly’ error, then I can liaise with our Technical Team to try to advise you on how to obtain the data you require via the API.

If you would like to message me directly my email address is: laura.reeves@nhs.net.

Thanks

Laura

Hi Laura,

It’s alright I think we’ve just got a use-case that’s not a good fit for the API.

We’ll continue with mapping the CSV files for now.

Many thanks,

Rob