I learnt how do it with simple keywords (single word) following this article: https://developers.refinitiv.com/en/article-catalog/article/find-your-right-companies-with-screener-eikon-data-apis-python.
But there is an issue when the keyword is compound (spelled with two different words). I will give an example to illustrate the issue. Applying the filters in the lower left (note the compound keyword "laser solutions"), I find one company shown in the image:
Now in order to get SCREENER syntax, I press the little arrow next to the green excel button and select "Export All as Formulas".
This gives the following formula:
=TR("SCREEN(U(IN(Private(OrgType(COM, UNK, MKP)))/*UNV:Private*/), IN(TR.HQCountryCode,""GB""), IN(TR.TRBCEconSectorCode,""56""), IN(TR.TRBCIndustryCode,""56101010""), Contains(TR.BusinessSummary,""laser solutions""), CURN=USD,TR.Organizati"&"onStatusCode=Act)","TR.CommonName;TR.HeadquartersCountry;TR.TRBCEconomicSector;TR.TRBCIndustry;TR.BusinessSummary","curn=USD RH=In CH=Fd")
Now, following the steps in https://developers.refinitiv.com/en/article-catalog/article/find-your-right-companies-with-screener-eikon-data-apis-python, I extract SCREENER syntax and format it in Python:
syntax = "SCREEN(U(IN(Private(OrgType(COM, UNK, MKP)))), IN(TR.HQCountryCode,""GB""), IN(TR.TRBCEconSectorCode,""56""), IN(TR.TRBCIndustryCode,""56101010""), Contains(TR.BusinessSummary,""laser solutions""), CURN=USD, TR.OrganizationStatusCode=Act)"
fields = ["TR.CommonName","TR.HeadquartersCountry","TR.TRBCEconomicSector","TR.TRBCIndustry","TR.BusinessSummary"]
df, e = ek.get_data(syntax, fields)
But the df I get is:
If everything was fine, I should have gotten the same company I get when I use the Refinitiv desktop. I noticed that if instead of using the compound keyword "laser solutions", I use the simple keyword "laser", I find the right company, i.e. I get the same result in the desktop and in my jupyter notebook.
How can I filter using the API, based a compound keyword, and get the same result as with the desktop?