Is there a way via API to search for studies based on values in metadata?

What about a way to pull metadata in a list of studies, for example from the API call GET “studies?expand&since=0&limit=101”

I agree it would be really helpful to manage stored data according to custom metadata (in particular with the tools find API).

As far as I know this doesn't exist.


You can use the Dicom Web plugin and perform queries on custom metadata. I’ve done it a (very long) while ago. Not sure whether you must setup custom dictionaries.

The URL will look something like this:

http://localhost:8042/dicom-web/studies?00690010=random value&includefield=00690010

Where 00690010 is your custom yeah. The reason for the includefield being for the plugin to include your tag because it’s not a standard one.

On a side note, make sure you set your reservation tag properly.


Based on the syntax of your query, it almost looks like that is searching dicom tags and not metadata (which is stored only in the DB, not the dicom itself). Is that the case?


I was under the impression you referred to Dicom tags. I apologise for the confusion.

Would you mind giving a concrete example of what you’d like to accomplish, a use case?


Hi Luiz,

When you have a big collection of DICOMs you want to labelled them.
For example you have one orthanc server and in it you have 300 Patients :
50 patients are for Study for Breast Cancer
50 patient are for a study for Prostate Cancer
100 patients are patient comming from another center for another purpose etc…

Orthanc offers a decent way to label the ressources using Metadata.
Unfortunatly we do not have a search function that will select ressources according to a metadata value.

I guess the metadata value should be stored somewhere in orthanc’s databases (sqlite or external db) so probably that some plugins that will query orthanc’s internal database should be a nice way to do it.
The cleanest way would maybe add a metadata filter field to the tool/find APIs.
However still some work to do for this …

Best regards,


Dear Salim,

I have just added a sample in the Orthanc Book showing how metadata can be retrieved/filtered using a Python plugin:


Thank you so much Sébastien,

That IS a real good feature, will look at this python implementation for sure.

For now i'm busy on Orthanc-Tools-JS but we are making huge progress on it, will go to the python plugin in few weeks.

Best regards,