Skip to content
Start here

Get domain rank details

radar.ranking.domain.get(strdomain, DomainGetParams**kwargs) -> DomainGetResponse
GET/radar/ranking/domain/{domain}

Retrieves domain rank details. Cloudflare provides an ordered rank for the top 100 domains, but for the remainder it only provides ranking buckets like top 200 thousand, top one million, etc.. These are available through Radar datasets endpoints.

Security
API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example:X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
Accepted Permissions (at least one required)
User Details WriteUser Details Read
ParametersExpand Collapse
domain: str

Domain name.

date: Optional[Sequence[Union[null, null]]]

Filters results by the specified array of dates.

format: Optional[Literal["JSON", "CSV"]]

Format in which results will be returned.

One of the following:
"JSON"
"CSV"
include_top_locations: Optional[bool]

Includes top locations in the response.

limit: Optional[int]

Limits the number of objects returned in the response.

exclusiveMinimum
minimum0
name: Optional[Sequence[str]]

Array of names used to label the series in the response.

ranking_type: Optional[Literal["POPULAR", "TRENDING_RISE", "TRENDING_STEADY"]]

The ranking type.

One of the following:
"POPULAR"
"TRENDING_RISE"
"TRENDING_STEADY"
ReturnsExpand Collapse
class DomainGetResponse:
details_0: Details0
categories: List[Details0Category]
id: int
name: str
super_category_id: int
bucket: Optional[str]

Only available in POPULAR ranking for the most recent ranking.

rank: Optional[int]
top_locations: Optional[List[Details0TopLocation]]
location_code: str
location_name: str
rank: int
meta: Meta
date_range: List[MetaDateRange]
end_time: datetime

Adjusted end of date range.

formatdate-time
start_time: datetime

Adjusted start of date range.

formatdate-time

Get domain rank details

import os
from cloudflare import Cloudflare

client = Cloudflare(
    api_token=os.environ.get("CLOUDFLARE_API_TOKEN"),  # This is the default and can be omitted
)
domain = client.radar.ranking.domain.get(
    domain="google.com",
)
print(domain.details_0)
{
  "result": {
    "details_0": {
      "categories": [
        {
          "id": 81,
          "name": "Content Servers",
          "superCategoryId": 26
        }
      ],
      "bucket": "2000",
      "rank": 3,
      "top_locations": [
        {
          "locationCode": "US",
          "locationName": "United States",
          "rank": 1
        }
      ]
    },
    "meta": {
      "dateRange": [
        {
          "endTime": "2022-09-17T10:22:57.555Z",
          "startTime": "2022-09-16T10:22:57.555Z"
        }
      ]
    }
  },
  "success": true
}
Returns Examples
{
  "result": {
    "details_0": {
      "categories": [
        {
          "id": 81,
          "name": "Content Servers",
          "superCategoryId": 26
        }
      ],
      "bucket": "2000",
      "rank": 3,
      "top_locations": [
        {
          "locationCode": "US",
          "locationName": "United States",
          "rank": 1
        }
      ]
    },
    "meta": {
      "dateRange": [
        {
          "endTime": "2022-09-17T10:22:57.555Z",
          "startTime": "2022-09-16T10:22:57.555Z"
        }
      ]
    }
  },
  "success": true
}