from ceic_api_client.api_client import ApiClient
from ceic_api_client.apis.dictionary_api import DictionaryApi
from ceic_api_client.apis.series_api import SeriesApi
from ceic_api_client.apis.insights_api import InsightsApi
access_token = "ENTER YOUR API KEY HERE"
api_client = ApiClient()
series_api = SeriesApi(api_client=api_client)
key_words = ["KEYWORD 1", "KEYWORD 2", "KEYWORD 3", "KEYWORD 4"]
series_search_result = series_api.search_series(keyword=", ".join(key_words), token=access_token)
# Access series search results data
series_search_items = series_search_result.data.items
second_item_series_id = series_search_items[1].metadata.id
# OR
series_search_items = series_search_result.to_dict()["data"]["items"]
second_item_series_id = series_search_items[1]["metadata"]["id"]