question

Upvotes
Accepted
6 2 3 5

Can I request property meta data for search API result values?

For example when I request a property of the quotes view:

Search.Definition(Search.View.Quotes).Filter(<some filter>).Select("AssetCategory")

I get results like "ORD" or "EIF"

Is there a way too lookup possible values (and what they mean) for this specific property, or other properties in general?

I tried the meta data lookup for views but could not see a way to request information for the properties themselves.


rdp-apirefinitiv-data-platform.netsearchrefinitiv-data-platform-librariesmetadata
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvote
Accepted
39.2k 75 11 27

@martin.grunwald

Search API has the concept of Navigators to help you with this task. Take a look at the section on Navigators in the Reference documentation for the Search API endpoint (/discovery/search/v1/) on https://apidocs.refinitiv.com/Apps/ApiDocs

E.g. the following request asks for all documents in the Quotes view excluding the documents where AssetCategory property equals 'UNC' (unclassified) to be grouped into buckets by the value of AssetCategory property. AssetCategoryName property, which is more descriptive than the short code in AssetCategory property, is included as a subnavigator.

{
  "View": "Quotes",
  "Filter": "AssetCategory ne 'UNC'",
  "Top": 0,
  "Navigators": "AssetCategory(sub:AssetCategoryName)"
}

The result (abridged to top 3 entries) is

{
  "Total": 76631676,
  "Hits": [],
  "Navigators": {
    "AssetCategory": {
      "Buckets": [
        {
          "Label": "EIW",
          "Count": 30560496,
          "AssetCategoryName": {
            "Buckets": [
              {
                "Label": "Equity/Equity/Index Warrant",
                "Count": 30560496
              }
            ]
          }
        },
        {
          "Label": "EFU",
          "Count": 5277788,
          "AssetCategoryName": {
            "Buckets": [
              {
                "Label": "Energy/Energy Future",
                "Count": 5277788
              }
            ]
          }
        },
        {
          "Label": "FIN",
          "Count": 4539266,
          "AssetCategoryName": {
            "Buckets": [
              {
                "Label": "Fixed Income",
                "Count": 4539266
              }
            ]
          }
        },
...

Effectively this gives you the list of values (or labels) used for AssetCategory property and the corresponding value of AssetCategoryName property.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Thank you, this is great suggestion, just what I was looking for

Upvotes
7.6k 15 6 9

@martin.grunwald

From my understanding, you can find some description of the property on https://apidocs.refinitiv.com/Apps/ApiDocs

and go to

/discovery/search/v1/metadata/views/{view}

The result from search metadata just provide you some flag, for example,

 "AssetCategory": {
      "Type": "String",
      "Searchable": true,
      "Navigable": true,
      "Exact": true
    },

And it has the details about the flag on the reference section from https://apidocs.refinitiv.com/Apps/ApiDocs

The possible capability flags are:

Searchable : the property supports searching in a Filter or Boost parameter

Sortable : the property supports sorting in an OrderBy parameter

Navigable : bucketed breakdowns can be requested for this property in a Navigators parameter

Groupable : the property supports grouping using the GroupBy and GroupCount parameters

Exact : the property supports exact-match searching in a Filter or Boost parameter

Symbol : the property represents a symbol, and can be used in lookup's Scope parameter

Anyway, I'm unable to find a service which can request the meaning for you. It looks like no such information available using API call now.



apidocs.png (169.3 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea