Skip to content
Start here

Get domain rank details

client.radar.ranking.domain.get(stringdomain, DomainGetParams { date, format, includeTopLocations, 3 more } query?, RequestOptionsoptions?): DomainGetResponse { details_0, meta }
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: string

Domain name.

query: DomainGetParams { date, format, includeTopLocations, 3 more }
date?: Array<string>

Filters results by the specified array of dates.

format?: "JSON" | "CSV"

Format in which results will be returned.

One of the following:
"JSON"
"CSV"
includeTopLocations?: boolean

Includes top locations in the response.

limit?: number

Limits the number of objects returned in the response.

exclusiveMinimum
minimum0
name?: Array<string>

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

rankingType?: "POPULAR" | "TRENDING_RISE" | "TRENDING_STEADY"

The ranking type.

One of the following:
"POPULAR"
"TRENDING_RISE"
"TRENDING_STEADY"
ReturnsExpand Collapse
DomainGetResponse { details_0, meta }
details_0: Details0 { categories, bucket, rank, top_locations }
categories: Array<Category>
id: number
name: string
superCategoryId: number
bucket?: string

Only available in POPULAR ranking for the most recent ranking.

rank?: number
top_locations?: Array<TopLocation>
locationCode: string
locationName: string
rank: number
meta: Meta { dateRange }
dateRange: Array<DateRange>
endTime: string

Adjusted end of date range.

formatdate-time
startTime: string

Adjusted start of date range.

formatdate-time

Get domain rank details

import Cloudflare from 'cloudflare';

const client = new Cloudflare({
  apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted
});

const domain = await client.radar.ranking.domain.get('google.com');

console.log(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
}