Question about retrieving Studies from remote modality

I would like to understand what is the optimal way to follow to address the below task:
I have an orthanc instance that has a remote modality configured.
I get a list of AccessionNumbers. I can query them to find the StudyInstanceUID and its respective SeriesInstanceUIDs. I want to receive them to the orthanc instance and then download them for local processing.
I need some guidance on the latter. What is the recommended way?

Hi Nikos,

I would write a python script to query the Orthanc API to do that kind of thing.

Regards,