Skip to main content
Question

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

  • April 15, 2025
  • 1 reply
  • 45 views

Shun Takase
MVP
Forum|alt.badge.img

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
Committed
Forum|alt.badge.img
  • Committed
  • April 15, 2025

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