import os os.environ["RD_LIB_CONFIG_PATH"] = "Example.DataLibrary.Python-main/Configuration" import eikon as ek import pandas as pd import refinitiv.data as rd from refinitiv.data.content import search import json ek.set_app_key('...') rd.open_session() ## this is a small part of the companies but the code still accept it. Going over couple hundreds it gives a syntax error bc probably it is not meant for that much imput. company_names = ['Apple Inc','LVMH Moet Hennessy Louis Vuitton SE', 'Danone SA', 'Discoverie Group PLC', 'Accor SA', 'Christian Dior SE','Accenture PLC','Iberdrola SA','Diageo PLC', 'Allianz SE','Atlas Copco AB' ] filter_expression = " or ".join([f"CommonName xeq '{name}' and IsPublic eq true" for name in company_names]) company = rd.discovery.search( view=search.Views.ORGANISATIONS, filter=filter_expression, select="PrimaryRIC" ) print(company) ## already here it produces the output (RIC codes) for just 10 companies. I think also from the biggest companies since Apple with LVMH are always on the top but alphabetically it should not be. if not company.empty: rics = company['PrimaryRIC'].tolist() # Ensure this column name matches your results result = rd.get_data( rics, fields=[ 'TR.CommonName', 'TR.FormerlyKnownAsName', 'TR.ISPeriodEndDate', 'TR.CompanyIncorpDate', 'TR.TotalRevenue', 'TR.NormalizedEbit', 'TR.AssetTurnover', 'TR.F.RnD', 'TR.NetIncomeBeforeExtraItems', 'TR.CashAndSTInvestments', 'TR.TotalAssets', 'TR.TotalEquity', 'TR.TotalDebt', 'TR.PropertyPlantEquipmentNet', 'TR.TotalUtilityPlantNet', 'TR.TotalLiabilities', 'TR.Employees', 'TR.CashFromOperatingAct', 'TR.CapitalExpenditures' ], parameters={'SDate': '2008-01-01', 'EDate': '2008-12-31', 'Frq': 'FY'} ) print(result)