## Get top or trending domains `radar.ranking.top(RankingTopParams**kwargs) -> RankingTopResponse` **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 - `date: Optional[SequenceNotStr[Union[null, null]]]` Filters results by the specified array of dates. - `domain_category: Optional[SequenceNotStr[str]]` Filters results by domain category. - `format: Optional[Literal["JSON", "CSV"]]` Format in which results will be returned. - `"JSON"` - `"CSV"` - `limit: Optional[int]` Limits the number of objects returned in the response. - `location: Optional[SequenceNotStr[str]]` Filters results by location. Specify a comma-separated list of alpha-2 location codes. - `name: Optional[SequenceNotStr[str]]` Array of names used to label the series in the response. - `ranking_type: Optional[Literal["POPULAR", "TRENDING_RISE", "TRENDING_STEADY"]]` The ranking type. - `"POPULAR"` - `"TRENDING_RISE"` - `"TRENDING_STEADY"` ### Returns - `class RankingTopResponse: …` - `meta: Meta` - `confidence_info: Optional[MetaConfidenceInfo]` - `annotations: List[MetaConfidenceInfoAnnotation]` - `data_source: Literal["ALL", "AI_BOTS", "AI_GATEWAY", 22 more]` Data source for annotations. - `"ALL"` - `"AI_BOTS"` - `"AI_GATEWAY"` - `"BGP"` - `"BOTS"` - `"CONNECTION_ANOMALY"` - `"CT"` - `"DNS"` - `"DNS_MAGNITUDE"` - `"DNS_AS112"` - `"DOS"` - `"EMAIL_ROUTING"` - `"EMAIL_SECURITY"` - `"FW"` - `"FW_PG"` - `"HTTP"` - `"HTTP_CONTROL"` - `"HTTP_CRAWLER_REFERER"` - `"HTTP_ORIGINS"` - `"IQI"` - `"LEAKED_CREDENTIALS"` - `"NET"` - `"ROBOTS_TXT"` - `"SPEED"` - `"WORKERS_AI"` - `description: str` - `end_date: datetime` - `event_type: Literal["EVENT", "GENERAL", "OUTAGE", 3 more]` Event type for annotations. - `"EVENT"` - `"GENERAL"` - `"OUTAGE"` - `"PARTIAL_PROJECTION"` - `"PIPELINE"` - `"TRAFFIC_ANOMALY"` - `is_instantaneous: bool` Whether event is a single point in time or a time range. - `linked_url: str` - `start_date: datetime` - `level: int` Provides an indication of how much confidence Cloudflare has in the data. - `date_range: List[MetaDateRange]` - `end_time: datetime` Adjusted end of date range. - `start_time: datetime` Adjusted start of date range. - `last_updated: datetime` Timestamp of the last dataset update. - `normalization: Literal["PERCENTAGE", "MIN0_MAX", "MIN_MAX", 5 more]` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `"PERCENTAGE"` - `"MIN0_MAX"` - `"MIN_MAX"` - `"RAW_VALUES"` - `"PERCENTAGE_CHANGE"` - `"ROLLING_AVERAGE"` - `"OVERLAPPED_PERCENTAGE"` - `"RATIO"` - `units: List[MetaUnit]` Measurement units for the results. - `name: str` - `value: str` - `top_0: List[Top0]` - `categories: List[Top0Category]` - `id: float` - `name: str` - `super_category_id: float` - `domain: str` - `rank: int` - `pct_rank_change: Optional[float]` Only available in TRENDING rankings. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.radar.ranking.top() print(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 } ```