Skip to content
Start here

Get top or trending domains

client.Radar.Ranking.Top(ctx, query) (*RankingTopResponse, error)
GET/radar/ranking/top

Retrieves the top or trending domains based on their rank. Popular domains are domains of broad appeal based on how people use the Internet. Trending domains are domains that are generating a surge in interest. For more information on top domains, see https://blog.cloudflare.com/radar-domain-rankings/.

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
query RankingTopParams
Date param.Field[[]Time]optional

Filters results by the specified array of dates.

DomainCategory param.Field[[]string]optional

Filters results by domain category.

Format param.Field[RankingTopParamsFormat]optional

Format in which results will be returned.

const RankingTopParamsFormatJson RankingTopParamsFormat = "JSON"
const RankingTopParamsFormatCsv RankingTopParamsFormat = "CSV"
Limit param.Field[int64]optional

Limits the number of objects returned in the response.

Location param.Field[[]string]optional

Filters results by location. Specify a comma-separated list of alpha-2 location codes.

Name param.Field[[]string]optional

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

RankingType param.Field[RankingTopParamsRankingType]optional

The ranking type.

const RankingTopParamsRankingTypePopular RankingTopParamsRankingType = "POPULAR"
const RankingTopParamsRankingTypeTrendingRise RankingTopParamsRankingType = "TRENDING_RISE"
const RankingTopParamsRankingTypeTrendingSteady RankingTopParamsRankingType = "TRENDING_STEADY"
ReturnsExpand Collapse
type RankingTopResponse struct{…}
Meta RankingTopResponseMeta
ConfidenceInfo RankingTopResponseMetaConfidenceInfo
Annotations []RankingTopResponseMetaConfidenceInfoAnnotation
DataSource RankingTopResponseMetaConfidenceInfoAnnotationsDataSource

Data source for annotations.

One of the following:
const RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceAll RankingTopResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"
const RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceAIBots RankingTopResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"
const RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway RankingTopResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"
const RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceBGP RankingTopResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"
const RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceBots RankingTopResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"
const RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly RankingTopResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"
const RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceCT RankingTopResponseMetaConfidenceInfoAnnotationsDataSource = "CT"
const RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceDNS RankingTopResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"
const RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude RankingTopResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"
const RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 RankingTopResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"
const RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceDos RankingTopResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"
const RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting RankingTopResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"
const RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity RankingTopResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"
const RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceFw RankingTopResponseMetaConfidenceInfoAnnotationsDataSource = "FW"
const RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceFwPg RankingTopResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"
const RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceHTTP RankingTopResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"
const RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl RankingTopResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"
const RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer RankingTopResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"
const RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins RankingTopResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"
const RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceIQI RankingTopResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"
const RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials RankingTopResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"
const RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceNet RankingTopResponseMetaConfidenceInfoAnnotationsDataSource = "NET"
const RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT RankingTopResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"
const RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceSpeed RankingTopResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"
const RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI RankingTopResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"
Description string
EndDate Time
formatdate-time
EventType RankingTopResponseMetaConfidenceInfoAnnotationsEventType

Event type for annotations.

One of the following:
const RankingTopResponseMetaConfidenceInfoAnnotationsEventTypeEvent RankingTopResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"
const RankingTopResponseMetaConfidenceInfoAnnotationsEventTypeGeneral RankingTopResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"
const RankingTopResponseMetaConfidenceInfoAnnotationsEventTypeOutage RankingTopResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"
const RankingTopResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection RankingTopResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"
const RankingTopResponseMetaConfidenceInfoAnnotationsEventTypePipeline RankingTopResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"
const RankingTopResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly RankingTopResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"
IsInstantaneous bool

Whether event is a single point in time or a time range.

LinkedURL string
formaturi
StartDate Time
formatdate-time
Level int64

Provides an indication of how much confidence Cloudflare has in the data.

DateRange []RankingTopResponseMetaDateRange
EndTime Time

Adjusted end of date range.

formatdate-time
StartTime Time

Adjusted start of date range.

formatdate-time
LastUpdated Time

Timestamp of the last dataset update.

formatdate-time
Normalization RankingTopResponseMetaNormalization

Normalization method applied to the results. Refer to Normalization methods.

One of the following:
const RankingTopResponseMetaNormalizationPercentage RankingTopResponseMetaNormalization = "PERCENTAGE"
const RankingTopResponseMetaNormalizationMin0Max RankingTopResponseMetaNormalization = "MIN0_MAX"
const RankingTopResponseMetaNormalizationMinMax RankingTopResponseMetaNormalization = "MIN_MAX"
const RankingTopResponseMetaNormalizationRawValues RankingTopResponseMetaNormalization = "RAW_VALUES"
const RankingTopResponseMetaNormalizationPercentageChange RankingTopResponseMetaNormalization = "PERCENTAGE_CHANGE"
const RankingTopResponseMetaNormalizationRollingAverage RankingTopResponseMetaNormalization = "ROLLING_AVERAGE"
const RankingTopResponseMetaNormalizationOverlappedPercentage RankingTopResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"
const RankingTopResponseMetaNormalizationRatio RankingTopResponseMetaNormalization = "RATIO"
Units []RankingTopResponseMetaUnit

Measurement units for the results.

Name string
Value string
Top0 []RankingTopResponseTop0
Categories []RankingTopResponseTop0Category
ID float64
Name string
SuperCategoryID float64
Domain string
Rank int64
PctRankChange float64optional

Only available in TRENDING rankings.

Get top or trending domains

package main

import (
  "context"
  "fmt"

  "github.com/cloudflare/cloudflare-go"
  "github.com/cloudflare/cloudflare-go/option"
  "github.com/cloudflare/cloudflare-go/radar"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  response, err := client.Radar.Ranking.Top(context.TODO(), radar.RankingTopParams{

  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response.Meta)
}
{
  "result": {
    "meta": {
      "confidenceInfo": {
        "annotations": [
          {
            "dataSource": "ALL",
            "description": "Cable cut in Tonga",
            "endDate": "2019-12-27T18:11:19.117Z",
            "eventType": "EVENT",
            "isInstantaneous": true,
            "linkedUrl": "https://example.com",
            "startDate": "2019-12-27T18:11:19.117Z"
          }
        ],
        "level": 0
      },
      "dateRange": [
        {
          "endTime": "2022-09-17T10:22:57.555Z",
          "startTime": "2022-09-16T10:22:57.555Z"
        }
      ],
      "lastUpdated": "2019-12-27T18:11:19.117Z",
      "normalization": "PERCENTAGE",
      "units": [
        {
          "name": "*",
          "value": "requests"
        }
      ]
    },
    "top_0": [
      {
        "categories": [
          {
            "id": 81,
            "name": "Content Servers",
            "superCategoryId": 26
          }
        ],
        "domain": "google.com",
        "rank": 1,
        "pctRankChange": 10.8
      }
    ]
  },
  "success": true
}
Returns Examples
{
  "result": {
    "meta": {
      "confidenceInfo": {
        "annotations": [
          {
            "dataSource": "ALL",
            "description": "Cable cut in Tonga",
            "endDate": "2019-12-27T18:11:19.117Z",
            "eventType": "EVENT",
            "isInstantaneous": true,
            "linkedUrl": "https://example.com",
            "startDate": "2019-12-27T18:11:19.117Z"
          }
        ],
        "level": 0
      },
      "dateRange": [
        {
          "endTime": "2022-09-17T10:22:57.555Z",
          "startTime": "2022-09-16T10:22:57.555Z"
        }
      ],
      "lastUpdated": "2019-12-27T18:11:19.117Z",
      "normalization": "PERCENTAGE",
      "units": [
        {
          "name": "*",
          "value": "requests"
        }
      ]
    },
    "top_0": [
      {
        "categories": [
          {
            "id": 81,
            "name": "Content Servers",
            "superCategoryId": 26
          }
        ],
        "domain": "google.com",
        "rank": 1,
        "pctRankChange": 10.8
      }
    ]
  },
  "success": true
}