- Home
- Article Catalog
- Find content and functionality using Refinitiv Data Library with Eikon Advanced Search

Have you ever had a workflow that requires searching for any content that matches your criteria?
For example,
The search criteria for Kungfu bonds, or Chinese-issued U.S. dollar bonds are dollar-denominated bonds issued by Chinese financial institutions and corporations.:
1 ) Parent Domicile includes China (Mainland), Hong Kong
2 ) Principal Currency includes USD
3 ) Country of Issue excludes China
This article is going to show you how to:
1 ) Use the "Advanced Search" app on Eikon/Workspace desktop to define a search criteria
2 ) Export the query for the specific search as a Python Code for RDP libraries - search function
3 ) Convert the exported query to a Python code for RD Library for Python, which has much-improved error/session handling than RDP Library once it is released.
For a position statement on the older RDP Library please see the overview page.
Advanced Search Application
Advanced Search - Government and Corporate Bonds App is an application available in Eikon Desktop/ Refinitiv Workspace app. It allows discovering any instruments that match the criteria specified in the app, available filters are listed below
Field | Note/Example of available value |
---|---|
Universe |
|
Search |
|
Filters | To put the criteria of
|
After the search criteria are applied, you can save them for the future use, add/remove columns of the search results, and export the result as a CSV file, or export the search criteria as a code to be used with RDP Libraries, which we will export and convert it to the Python code for RD Library in this article.
To launch the application, follow the steps below
1) Type in "Advanced Search" or "AS" on Eikon/Workspace search bar and press enter
Advanced Search app is going to be launched, here's a screenshot of the app
2) Apply filters on the app, in this article, I'm going to search for Kungfu bonds, or Chinese-issued U.S. dollars bonds, which are dollar-denominated bonds issued by Chinese financial institutions and corporations, with the criteria below
1. Parent Domicile includes China (Mainland), Hong Kong
2. Principal Currency includes USD
3. Country of Issue excludes China
3 ) Now the search results are Kungfu bonds based on the filters applied, these results can be exported to a CSV file or exported as a query, which is focused on this article.
To export the query, click the dropdown at the top right (number 4 in the screenshot below) and select Export Query
Here’s the screenshot of Advanced Search app with the filters applied
The Export query window will pop up, click the CODEBOOK tab to get the Python code, then click Copy.
Here's the code we get,
- The properties under select parameter were adjusted to be the properties needed for an analysis
- Update number in top parameter to 10000 to get all result of the bonds
rdp.search(
  view = rdp.SearchViews.GovCorpInstruments,
  top = 10000,
  filter = "((DbType eq 'GOVT' or DbType eq 'CORP' or DbType eq 'AGNC' or DbType eq 'OMUN' or DbType eq 'OTHR') and IsActive eq true and (RCSParentDomicileGenealogy in ('G:53' 'G:3H') and RCSCurrencyLeaf eq 'US Dollar' and RCSCountryGenealogy ne 'M:DQ\G:B6'))",
  select = "RIC,RCSTRBC2012Leaf,IssueDate,EOMAmountOutstanding,PricingRedemDate,IssuerLegalName,PricingClosingYield, CurrentYield, FaceIssuedTotal,EOMPriceChange,RCSBondGradeLeaf,EOMPriceReturn"
)
4 ) Then as we'd like to use Refinitiv Data Library (RD Library) instead of RDP one, we need to adjust the code a bit to make it works by converting the exported query to a Python code for RD Library for Python, as in the code below.
An example code of RD Library for Python usage is available in the CODEBOOK app or you can follow this RD Library - Tutorial, please note that the Eikon Desktop or Workspace app needed to be running to be able to open the Desktop Session of the RD library as the code below
import refinitiv.data as rd
from refinitiv.data.content import search
Â
rd.open_session()
Â
response = search.Definition(
  view = search.SearchViews.GOV_CORP_INSTRUMENTS,
  top = 10000,
  filter = "((DbType eq 'GOVT' or DbType eq 'CORP' or DbType eq 'AGNC' or DbType eq 'OMUN' or DbType eq 'OTHR') and IsActive eq true and (RCSParentDomicileGenealogy in ('G:53' 'G:3H') and RCSCurrencyLeaf eq 'US Dollar' and RCSCountryGenealogy ne 'M:DQ\G:B6'))",
  select = "RIC,RCSTRBC2012Leaf,IssueDate,EOMAmountOutstanding,PricingRedemDate,IssuerLegalName,PricingClosingYield, CurrentYield, FaceIssuedTotal,EOMPriceChange,RCSBondGradeLeaf,EOMPriceReturn"
).get_data()
response.data.df
Here's an output of the code
Conclusion
With this functionality of Eikon Advanced Search, the search query code can be generated within just a few clicks then the code is ready to be integrated into your workflow. I hope you enjoy this article and that it helps you in discovering what you're looking for.
If you have any questions regarding an API usage. Please feel free to leave it in the Q&A Forum (Developer Community). We're more than happy to help!