Skip to main content
Shun Takase
MVP ⭐️⭐️⭐️⭐️⭐️
MVP ⭐️⭐️⭐️⭐️⭐️
Apr 15, 2025 9:42 AM UTC
Question

Is there a way to retrieve multiple time series at once using the SDK?

When retrieving time-series data registered in CDF using the SDK, I use the following code.

client.time_series.search(name="some name")

In this case, if I want to take 100 time series, I would need to run the above code 100 times, 
but is there any SDK that allows me to retrieve this in a list format or something similar?

1 reply

jtfrandsen
Seasoned ⭐️⭐️
Seasoned ⭐️⭐️
Apr 15, 2025 2:33 PM UTC

Would you be open to retrieving the time series using their external IDs instead of their name? If so, you could use the following code as an example:

 

client.time_series.retrieve_multiple(external_ids=["abc", "def"]

 

Otherwise, you could use filters to send all 100 names in a single request. Here’s some documentation for filters: https://cognite-sdk-python.readthedocs-hosted.com/en/latest/time_series.html#filter-time-series