How to get all the search result from refinitiv.data.discovery.search?

I ran below search. But got Error message: refinitiv.data._errors.RDError: Error code 400 | Validation error: json.Top in body should be less than or equal to 10000

rd.discovery.search(
view = rd.discovery.Views.FUND_QUOTES,
top = 56364,
filter = "(AssetState ne 'DC' and SearchAllCategoryv2 eq 'Funds' and (RCSAssetCategoryGenealogy in ('A:KZ') and (RCSIssueCountryRegisteredForSale xeq 'G:6V' or RCSIssueCountryRegisteredForSale xeq 'G:90' or RCSIssueCountryRegisteredForSale xeq 'G:19' or RCSIssueCountryRegisteredForSale xeq 'G:3N')))",
select = "DTSubjectName,RIC,BusinessEntity,PI,SearchAllCategoryv3,SearchAllCategoryv2,SearchAllCategory,IssueISIN,IssueLipperGlobalSchemeName,RCSAssetCategoryLeaf,RCSIssuerDomicileCountryLeaf,RCSIssueCountryRegisteredForSale,RCSCurrencyLeaf,ExchangeName,iNAVRIC,RCSAssetCategoryGenealogy"
)

Is there a way to dice and slice the result and get all the rows in batches?

Best Answer

  • @yang.yang01 Thanks for your question - we have written an article on working with our search functions - and in particular on working within the limit of 10,000 results per search API call. We also have an accompanying jupyter notebook you can use which is filled with example code. Please let us know if this of use. I hope this can help.

Answers