# Ranking ## Get domains rank time series `client.Radar.Ranking.TimeseriesGroups(ctx, query) (*RankingTimeseriesGroupsResponse, error)` **get** `/radar/ranking/timeseries_groups` Retrieves domains rank over time. ### Parameters - `query RankingTimeseriesGroupsParams` - `DateEnd param.Field[[]Time]` End of the date range (inclusive). - `DateRange param.Field[[]string]` Filters results by date range. For example, use `7d` and `7dcontrol` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters). - `DateStart param.Field[[]Time]` Start of the date range. - `DomainCategory param.Field[[]string]` Filters results by domain category. - `Domains param.Field[[]string]` Filters results by domain name. Specify a comma-separated list of domain names. - `Format param.Field[RankingTimeseriesGroupsParamsFormat]` Format in which results will be returned. - `const RankingTimeseriesGroupsParamsFormatJson RankingTimeseriesGroupsParamsFormat = "JSON"` - `const RankingTimeseriesGroupsParamsFormatCsv RankingTimeseriesGroupsParamsFormat = "CSV"` - `Limit param.Field[int64]` Limits the number of objects returned in the response. - `Location param.Field[[]string]` Filters results by location. Specify a comma-separated list of alpha-2 location codes. - `Name param.Field[[]string]` Array of names used to label the series in the response. - `RankingType param.Field[RankingTimeseriesGroupsParamsRankingType]` The ranking type. - `const RankingTimeseriesGroupsParamsRankingTypePopular RankingTimeseriesGroupsParamsRankingType = "POPULAR"` - `const RankingTimeseriesGroupsParamsRankingTypeTrendingRise RankingTimeseriesGroupsParamsRankingType = "TRENDING_RISE"` - `const RankingTimeseriesGroupsParamsRankingTypeTrendingSteady RankingTimeseriesGroupsParamsRankingType = "TRENDING_STEADY"` ### Returns - `type RankingTimeseriesGroupsResponse struct{…}` - `Meta RankingTimeseriesGroupsResponseMeta` Metadata for the results. - `AggInterval RankingTimeseriesGroupsResponseMetaAggInterval` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). - `const RankingTimeseriesGroupsResponseMetaAggIntervalFifteenMinutes RankingTimeseriesGroupsResponseMetaAggInterval = "FIFTEEN_MINUTES"` - `const RankingTimeseriesGroupsResponseMetaAggIntervalOneHour RankingTimeseriesGroupsResponseMetaAggInterval = "ONE_HOUR"` - `const RankingTimeseriesGroupsResponseMetaAggIntervalOneDay RankingTimeseriesGroupsResponseMetaAggInterval = "ONE_DAY"` - `const RankingTimeseriesGroupsResponseMetaAggIntervalOneWeek RankingTimeseriesGroupsResponseMetaAggInterval = "ONE_WEEK"` - `const RankingTimeseriesGroupsResponseMetaAggIntervalOneMonth RankingTimeseriesGroupsResponseMetaAggInterval = "ONE_MONTH"` - `ConfidenceInfo RankingTimeseriesGroupsResponseMetaConfidenceInfo` - `Annotations []RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotation` - `DataSource RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAll RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAIBots RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceBGP RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceBots RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceCT RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNS RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDos RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceFw RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceFwPg RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTP RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceIQI RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceNet RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceSpeed RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeEvent RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeGeneral RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeOutage RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypePipeline RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []RankingTimeseriesGroupsResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization RankingTimeseriesGroupsResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const RankingTimeseriesGroupsResponseMetaNormalizationPercentage RankingTimeseriesGroupsResponseMetaNormalization = "PERCENTAGE"` - `const RankingTimeseriesGroupsResponseMetaNormalizationMin0Max RankingTimeseriesGroupsResponseMetaNormalization = "MIN0_MAX"` - `const RankingTimeseriesGroupsResponseMetaNormalizationMinMax RankingTimeseriesGroupsResponseMetaNormalization = "MIN_MAX"` - `const RankingTimeseriesGroupsResponseMetaNormalizationRawValues RankingTimeseriesGroupsResponseMetaNormalization = "RAW_VALUES"` - `const RankingTimeseriesGroupsResponseMetaNormalizationPercentageChange RankingTimeseriesGroupsResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const RankingTimeseriesGroupsResponseMetaNormalizationRollingAverage RankingTimeseriesGroupsResponseMetaNormalization = "ROLLING_AVERAGE"` - `const RankingTimeseriesGroupsResponseMetaNormalizationOverlappedPercentage RankingTimeseriesGroupsResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const RankingTimeseriesGroupsResponseMetaNormalizationRatio RankingTimeseriesGroupsResponseMetaNormalization = "RATIO"` - `Units []RankingTimeseriesGroupsResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Serie0 RankingTimeseriesGroupsResponseSerie0` - `Timestamps []Time` ### Example ```go 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.TimeseriesGroups(context.TODO(), radar.RankingTimeseriesGroupsParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Meta) } ``` #### Response ```json { "result": { "meta": { "aggInterval": "FIFTEEN_MINUTES", "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" } ] }, "serie_0": { "timestamps": [ "2019-12-27T18:11:19.117Z" ] } }, "success": true } ``` ## 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/. ### Parameters - `query RankingTopParams` - `Date param.Field[[]Time]` Filters results by the specified array of dates. - `DomainCategory param.Field[[]string]` Filters results by domain category. - `Format param.Field[RankingTopParamsFormat]` Format in which results will be returned. - `const RankingTopParamsFormatJson RankingTopParamsFormat = "JSON"` - `const RankingTopParamsFormatCsv RankingTopParamsFormat = "CSV"` - `Limit param.Field[int64]` Limits the number of objects returned in the response. - `Location param.Field[[]string]` Filters results by location. Specify a comma-separated list of alpha-2 location codes. - `Name param.Field[[]string]` Array of names used to label the series in the response. - `RankingType param.Field[RankingTopParamsRankingType]` The ranking type. - `const RankingTopParamsRankingTypePopular RankingTopParamsRankingType = "POPULAR"` - `const RankingTopParamsRankingTypeTrendingRise RankingTopParamsRankingType = "TRENDING_RISE"` - `const RankingTopParamsRankingTypeTrendingSteady RankingTopParamsRankingType = "TRENDING_STEADY"` ### Returns - `type RankingTopResponse struct{…}` - `Meta RankingTopResponseMeta` - `ConfidenceInfo RankingTopResponseMetaConfidenceInfo` - `Annotations []RankingTopResponseMetaConfidenceInfoAnnotation` - `DataSource RankingTopResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `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` - `EventType RankingTopResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `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` - `StartDate Time` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []RankingTopResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization RankingTopResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `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 float64` Only available in TRENDING rankings. ### Example ```go 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) } ``` #### Response ```json { "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 } ``` # Domain ## Get domain rank details `client.Radar.Ranking.Domain.Get(ctx, domain, query) (*RankingDomainGetResponse, error)` **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. ### Parameters - `domain string` Domain name. - `query RankingDomainGetParams` - `Date param.Field[[]Time]` Filters results by the specified array of dates. - `Format param.Field[RankingDomainGetParamsFormat]` Format in which results will be returned. - `const RankingDomainGetParamsFormatJson RankingDomainGetParamsFormat = "JSON"` - `const RankingDomainGetParamsFormatCsv RankingDomainGetParamsFormat = "CSV"` - `IncludeTopLocations param.Field[bool]` Includes top locations in the response. - `Limit param.Field[int64]` Limits the number of objects returned in the response. - `Name param.Field[[]string]` Array of names used to label the series in the response. - `RankingType param.Field[RankingDomainGetParamsRankingType]` The ranking type. - `const RankingDomainGetParamsRankingTypePopular RankingDomainGetParamsRankingType = "POPULAR"` - `const RankingDomainGetParamsRankingTypeTrendingRise RankingDomainGetParamsRankingType = "TRENDING_RISE"` - `const RankingDomainGetParamsRankingTypeTrendingSteady RankingDomainGetParamsRankingType = "TRENDING_STEADY"` ### Returns - `type RankingDomainGetResponse struct{…}` - `Details0 RankingDomainGetResponseDetails0` - `Categories []RankingDomainGetResponseDetails0Category` - `ID int64` - `Name string` - `SuperCategoryID int64` - `Bucket string` Only available in POPULAR ranking for the most recent ranking. - `Rank int64` - `TopLocations []RankingDomainGetResponseDetails0TopLocation` - `LocationCode string` - `LocationName string` - `Rank int64` - `Meta RankingDomainGetResponseMeta` - `DateRange []RankingDomainGetResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. ### Example ```go 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"), ) domain, err := client.Radar.Ranking.Domain.Get( context.TODO(), "google.com", radar.RankingDomainGetParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", domain.Details0) } ``` #### Response ```json { "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 } ``` # Internet Services ## Get Internet services rank time series `client.Radar.Ranking.InternetServices.TimeseriesGroups(ctx, query) (*RankingInternetServiceTimeseriesGroupsResponse, error)` **get** `/radar/ranking/internet_services/timeseries_groups` Retrieves Internet Services rank update changes over time. ### Parameters - `query RankingInternetServiceTimeseriesGroupsParams` - `DateEnd param.Field[[]Time]` End of the date range (inclusive). - `DateRange param.Field[[]string]` Filters results by date range. For example, use `7d` and `7dcontrol` to compare this week with the previous week. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters). - `DateStart param.Field[[]Time]` Start of the date range. - `Format param.Field[RankingInternetServiceTimeseriesGroupsParamsFormat]` Format in which results will be returned. - `const RankingInternetServiceTimeseriesGroupsParamsFormatJson RankingInternetServiceTimeseriesGroupsParamsFormat = "JSON"` - `const RankingInternetServiceTimeseriesGroupsParamsFormatCsv RankingInternetServiceTimeseriesGroupsParamsFormat = "CSV"` - `Limit param.Field[int64]` Limits the number of objects returned in the response. - `Name param.Field[[]string]` Array of names used to label the series in the response. - `ServiceCategory param.Field[[]string]` Filters results by Internet service category. ### Returns - `type RankingInternetServiceTimeseriesGroupsResponse struct{…}` - `Meta RankingInternetServiceTimeseriesGroupsResponseMeta` Metadata for the results. - `AggInterval RankingInternetServiceTimeseriesGroupsResponseMetaAggInterval` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). - `const RankingInternetServiceTimeseriesGroupsResponseMetaAggIntervalFifteenMinutes RankingInternetServiceTimeseriesGroupsResponseMetaAggInterval = "FIFTEEN_MINUTES"` - `const RankingInternetServiceTimeseriesGroupsResponseMetaAggIntervalOneHour RankingInternetServiceTimeseriesGroupsResponseMetaAggInterval = "ONE_HOUR"` - `const RankingInternetServiceTimeseriesGroupsResponseMetaAggIntervalOneDay RankingInternetServiceTimeseriesGroupsResponseMetaAggInterval = "ONE_DAY"` - `const RankingInternetServiceTimeseriesGroupsResponseMetaAggIntervalOneWeek RankingInternetServiceTimeseriesGroupsResponseMetaAggInterval = "ONE_WEEK"` - `const RankingInternetServiceTimeseriesGroupsResponseMetaAggIntervalOneMonth RankingInternetServiceTimeseriesGroupsResponseMetaAggInterval = "ONE_MONTH"` - `ConfidenceInfo RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfo` - `Annotations []RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotation` - `DataSource RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAll RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAIBots RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceBGP RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceBots RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceCT RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNS RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDos RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceFw RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceFwPg RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTP RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceIQI RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceNet RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceSpeed RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeEvent RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeGeneral RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeOutage RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypePipeline RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []RankingInternetServiceTimeseriesGroupsResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization RankingInternetServiceTimeseriesGroupsResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const RankingInternetServiceTimeseriesGroupsResponseMetaNormalizationPercentage RankingInternetServiceTimeseriesGroupsResponseMetaNormalization = "PERCENTAGE"` - `const RankingInternetServiceTimeseriesGroupsResponseMetaNormalizationMin0Max RankingInternetServiceTimeseriesGroupsResponseMetaNormalization = "MIN0_MAX"` - `const RankingInternetServiceTimeseriesGroupsResponseMetaNormalizationMinMax RankingInternetServiceTimeseriesGroupsResponseMetaNormalization = "MIN_MAX"` - `const RankingInternetServiceTimeseriesGroupsResponseMetaNormalizationRawValues RankingInternetServiceTimeseriesGroupsResponseMetaNormalization = "RAW_VALUES"` - `const RankingInternetServiceTimeseriesGroupsResponseMetaNormalizationPercentageChange RankingInternetServiceTimeseriesGroupsResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const RankingInternetServiceTimeseriesGroupsResponseMetaNormalizationRollingAverage RankingInternetServiceTimeseriesGroupsResponseMetaNormalization = "ROLLING_AVERAGE"` - `const RankingInternetServiceTimeseriesGroupsResponseMetaNormalizationOverlappedPercentage RankingInternetServiceTimeseriesGroupsResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const RankingInternetServiceTimeseriesGroupsResponseMetaNormalizationRatio RankingInternetServiceTimeseriesGroupsResponseMetaNormalization = "RATIO"` - `Units []RankingInternetServiceTimeseriesGroupsResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Serie0 RankingInternetServiceTimeseriesGroupsResponseSerie0` - `Timestamps []Time` ### Example ```go 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.InternetServices.TimeseriesGroups(context.TODO(), radar.RankingInternetServiceTimeseriesGroupsParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Meta) } ``` #### Response ```json { "result": { "meta": { "aggInterval": "FIFTEEN_MINUTES", "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" } ] }, "serie_0": { "timestamps": [ "2019-12-27T18:11:19.117Z" ] } }, "success": true } ``` ## Get top Internet services `client.Radar.Ranking.InternetServices.Top(ctx, query) (*RankingInternetServiceTopResponse, error)` **get** `/radar/ranking/internet_services/top` Retrieves top Internet services based on their rank. ### Parameters - `query RankingInternetServiceTopParams` - `Date param.Field[[]Time]` Filters results by the specified array of dates. - `Format param.Field[RankingInternetServiceTopParamsFormat]` Format in which results will be returned. - `const RankingInternetServiceTopParamsFormatJson RankingInternetServiceTopParamsFormat = "JSON"` - `const RankingInternetServiceTopParamsFormatCsv RankingInternetServiceTopParamsFormat = "CSV"` - `Limit param.Field[int64]` Limits the number of objects returned in the response. - `Name param.Field[[]string]` Array of names used to label the series in the response. - `ServiceCategory param.Field[[]string]` Filters results by Internet service category. ### Returns - `type RankingInternetServiceTopResponse struct{…}` - `Meta RankingInternetServiceTopResponseMeta` - `ConfidenceInfo RankingInternetServiceTopResponseMetaConfidenceInfo` - `Annotations []RankingInternetServiceTopResponseMetaConfidenceInfoAnnotation` - `DataSource RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceAll RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceAIBots RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceBGP RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceBots RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceCT RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceDNS RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceDos RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceFw RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceFwPg RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceHTTP RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceIQI RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceNet RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceSpeed RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsEventTypeEvent RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsEventTypeGeneral RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsEventTypeOutage RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsEventTypePipeline RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []RankingInternetServiceTopResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization RankingInternetServiceTopResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const RankingInternetServiceTopResponseMetaNormalizationPercentage RankingInternetServiceTopResponseMetaNormalization = "PERCENTAGE"` - `const RankingInternetServiceTopResponseMetaNormalizationMin0Max RankingInternetServiceTopResponseMetaNormalization = "MIN0_MAX"` - `const RankingInternetServiceTopResponseMetaNormalizationMinMax RankingInternetServiceTopResponseMetaNormalization = "MIN_MAX"` - `const RankingInternetServiceTopResponseMetaNormalizationRawValues RankingInternetServiceTopResponseMetaNormalization = "RAW_VALUES"` - `const RankingInternetServiceTopResponseMetaNormalizationPercentageChange RankingInternetServiceTopResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const RankingInternetServiceTopResponseMetaNormalizationRollingAverage RankingInternetServiceTopResponseMetaNormalization = "ROLLING_AVERAGE"` - `const RankingInternetServiceTopResponseMetaNormalizationOverlappedPercentage RankingInternetServiceTopResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const RankingInternetServiceTopResponseMetaNormalizationRatio RankingInternetServiceTopResponseMetaNormalization = "RATIO"` - `Units []RankingInternetServiceTopResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Top0 []RankingInternetServiceTopResponseTop0` - `Rank int64` - `Service string` ### Example ```go 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.InternetServices.Top(context.TODO(), radar.RankingInternetServiceTopParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Meta) } ``` #### Response ```json { "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": [ { "rank": 1, "service": "Google" } ] }, "success": true } ``` ## List Internet services categories `client.Radar.Ranking.InternetServices.Categories(ctx, query) (*RankingInternetServiceCategoriesResponse, error)` **get** `/radar/ranking/internet_services/categories` Retrieves the list of Internet services categories. ### Parameters - `query RankingInternetServiceCategoriesParams` - `Date param.Field[[]Time]` Filters results by the specified array of dates. - `Format param.Field[RankingInternetServiceCategoriesParamsFormat]` Format in which results will be returned. - `const RankingInternetServiceCategoriesParamsFormatJson RankingInternetServiceCategoriesParamsFormat = "JSON"` - `const RankingInternetServiceCategoriesParamsFormatCsv RankingInternetServiceCategoriesParamsFormat = "CSV"` - `Limit param.Field[int64]` Limits the number of objects returned in the response. - `Name param.Field[[]string]` Array of names used to label the series in the response. ### Returns - `type RankingInternetServiceCategoriesResponse struct{…}` - `Categories0 []RankingInternetServiceCategoriesResponseCategories0` - `Name string` ### Example ```go 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.InternetServices.Categories(context.TODO(), radar.RankingInternetServiceCategoriesParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Categories0) } ``` #### Response ```json { "result": { "categories_0": [ { "name": "Generative AI" } ] }, "success": true } ```