HELP CENTER

What is top_categories_count in the Domain Metrics By Categories endpoint?

Our new Domain Metrics By Categories endpoint has one metric that can cause confusion — top_categories_count. In the following paragraphs, we would like to explain what the parameter means and how it works.

In a nutshell, top_categories_count is the number of additional domain categories you can receive a list of domains for. By using this parameter, you will obtain domains relevant to categories that are not specified in category_codes in a POST request.

By default, top_categories_count is equal to the number of categories indicated in the category_codes array. Thus, when ignoring the field, you will get domains relevant only to categories you specified.

Let us clarify things with the following example. Take a look at the POST request below:

[
  {
    "location_code": 2840,
    "language_code": "en",
    "category_codes": [
      13418
    ],
    "first_date": "2021-06-01",
    "second_date": "2021-10-01"
  }
]

As you can see, there is only one category specified (13418) and the top_categories_count parameter is ignored. It means that in the API response, you will get a list of domains that are relevant only to the category mentioned above. Consequently, domains that have more than one category (e.g., 13418 and 11494) won’t be listed in the API response.

With the top_categories_count parameter, you can expand the list without having to specify any additional categories in a POST request.

[
  {
    "location_code": 2840,
    "language_code": "en",
    "category_codes": [
      13418
    ],
    "first_date": "2021-06-01",
    "second_date": "2021-10-01",
    "top_categories_count": 5
  }
]

In this case, you will receive a list of domains relevant to five different categories, one of which is 13418.

Embed DataForSeo widget on your website


Embed code:
Preview: