## Get top user agents by HTTP requests `client.Radar.HTTP.Top.Browser(ctx, query) (*HTTPTopBrowserResponse, error)` **get** `/radar/http/top/browser` Retrieves the top user agents by HTTP requests. ### Parameters - `query HTTPTopBrowserParams` - `ASN param.Field[[]string]` Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356. - `BotClass param.Field[[]HTTPTopBrowserParamsBotClass]` Filters results by bot class. Refer to [Bot classes](https://developers.cloudflare.com/radar/concepts/bot-classes/). - `const HTTPTopBrowserParamsBotClassLikelyAutomated HTTPTopBrowserParamsBotClass = "LIKELY_AUTOMATED"` - `const HTTPTopBrowserParamsBotClassLikelyHuman HTTPTopBrowserParamsBotClass = "LIKELY_HUMAN"` - `BrowserFamily param.Field[[]HTTPTopBrowserParamsBrowserFamily]` Filters results by browser family. - `const HTTPTopBrowserParamsBrowserFamilyChrome HTTPTopBrowserParamsBrowserFamily = "CHROME"` - `const HTTPTopBrowserParamsBrowserFamilyEdge HTTPTopBrowserParamsBrowserFamily = "EDGE"` - `const HTTPTopBrowserParamsBrowserFamilyFirefox HTTPTopBrowserParamsBrowserFamily = "FIREFOX"` - `const HTTPTopBrowserParamsBrowserFamilySafari HTTPTopBrowserParamsBrowserFamily = "SAFARI"` - `Continent param.Field[[]string]` Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA. - `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. - `DeviceType param.Field[[]HTTPTopBrowserParamsDeviceType]` Filters results by device type. - `const HTTPTopBrowserParamsDeviceTypeDesktop HTTPTopBrowserParamsDeviceType = "DESKTOP"` - `const HTTPTopBrowserParamsDeviceTypeMobile HTTPTopBrowserParamsDeviceType = "MOBILE"` - `const HTTPTopBrowserParamsDeviceTypeOther HTTPTopBrowserParamsDeviceType = "OTHER"` - `Format param.Field[HTTPTopBrowserParamsFormat]` Format in which results will be returned. - `const HTTPTopBrowserParamsFormatJson HTTPTopBrowserParamsFormat = "JSON"` - `const HTTPTopBrowserParamsFormatCsv HTTPTopBrowserParamsFormat = "CSV"` - `GeoID param.Field[[]string]` Filters results by Geolocation. Specify a comma-separated list of GeoNames IDs. Prefix with `-` to exclude geoIds from results. For example, `-2267056,360689` excludes results from the 2267056 (Lisbon), but includes results from 5128638 (New York). - `HTTPProtocol param.Field[[]HTTPTopBrowserParamsHTTPProtocol]` Filters results by HTTP protocol (HTTP vs. HTTPS). - `const HTTPTopBrowserParamsHTTPProtocolHTTP HTTPTopBrowserParamsHTTPProtocol = "HTTP"` - `const HTTPTopBrowserParamsHTTPProtocolHTTPS HTTPTopBrowserParamsHTTPProtocol = "HTTPS"` - `HTTPVersion param.Field[[]HTTPTopBrowserParamsHTTPVersion]` Filters results by HTTP version. - `const HTTPTopBrowserParamsHTTPVersionHttPv1 HTTPTopBrowserParamsHTTPVersion = "HTTPv1"` - `const HTTPTopBrowserParamsHTTPVersionHttPv2 HTTPTopBrowserParamsHTTPVersion = "HTTPv2"` - `const HTTPTopBrowserParamsHTTPVersionHttPv3 HTTPTopBrowserParamsHTTPVersion = "HTTPv3"` - `IPVersion param.Field[[]HTTPTopBrowserParamsIPVersion]` Filters results by IP version (Ipv4 vs. IPv6). - `const HTTPTopBrowserParamsIPVersionIPv4 HTTPTopBrowserParamsIPVersion = "IPv4"` - `const HTTPTopBrowserParamsIPVersionIPv6 HTTPTopBrowserParamsIPVersion = "IPv6"` - `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 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT. - `Name param.Field[[]string]` Array of names used to label the series in the response. - `OS param.Field[[]HTTPTopBrowserParamsOS]` Filters results by operating system. - `const HTTPTopBrowserParamsOSWindows HTTPTopBrowserParamsOS = "WINDOWS"` - `const HTTPTopBrowserParamsOSMacosx HTTPTopBrowserParamsOS = "MACOSX"` - `const HTTPTopBrowserParamsOSIos HTTPTopBrowserParamsOS = "IOS"` - `const HTTPTopBrowserParamsOSAndroid HTTPTopBrowserParamsOS = "ANDROID"` - `const HTTPTopBrowserParamsOSChromeos HTTPTopBrowserParamsOS = "CHROMEOS"` - `const HTTPTopBrowserParamsOSLinux HTTPTopBrowserParamsOS = "LINUX"` - `const HTTPTopBrowserParamsOSSmartTv HTTPTopBrowserParamsOS = "SMART_TV"` - `TLSVersion param.Field[[]HTTPTopBrowserParamsTLSVersion]` Filters results by TLS version. - `const HTTPTopBrowserParamsTLSVersionTlSv1_0 HTTPTopBrowserParamsTLSVersion = "TLSv1_0"` - `const HTTPTopBrowserParamsTLSVersionTlSv1_1 HTTPTopBrowserParamsTLSVersion = "TLSv1_1"` - `const HTTPTopBrowserParamsTLSVersionTlSv1_2 HTTPTopBrowserParamsTLSVersion = "TLSv1_2"` - `const HTTPTopBrowserParamsTLSVersionTlSv1_3 HTTPTopBrowserParamsTLSVersion = "TLSv1_3"` - `const HTTPTopBrowserParamsTLSVersionTlSvQuic HTTPTopBrowserParamsTLSVersion = "TLSvQUIC"` ### Returns - `type HTTPTopBrowserResponse struct{…}` - `Meta HTTPTopBrowserResponseMeta` Metadata for the results. - `ConfidenceInfo HTTPTopBrowserResponseMetaConfidenceInfo` - `Annotations []HTTPTopBrowserResponseMetaConfidenceInfoAnnotation` - `DataSource HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceAll HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceAIBots HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceBGP HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceBots HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceCT HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceDNS HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceDos HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceFw HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceFwPg HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceHTTP HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceIQI HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceNet HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceSpeed HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsEventTypeEvent HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsEventTypeGeneral HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsEventTypeOutage HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsEventTypePipeline HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsEventType = "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 []HTTPTopBrowserResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization HTTPTopBrowserResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const HTTPTopBrowserResponseMetaNormalizationPercentage HTTPTopBrowserResponseMetaNormalization = "PERCENTAGE"` - `const HTTPTopBrowserResponseMetaNormalizationMin0Max HTTPTopBrowserResponseMetaNormalization = "MIN0_MAX"` - `const HTTPTopBrowserResponseMetaNormalizationMinMax HTTPTopBrowserResponseMetaNormalization = "MIN_MAX"` - `const HTTPTopBrowserResponseMetaNormalizationRawValues HTTPTopBrowserResponseMetaNormalization = "RAW_VALUES"` - `const HTTPTopBrowserResponseMetaNormalizationPercentageChange HTTPTopBrowserResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const HTTPTopBrowserResponseMetaNormalizationRollingAverage HTTPTopBrowserResponseMetaNormalization = "ROLLING_AVERAGE"` - `const HTTPTopBrowserResponseMetaNormalizationOverlappedPercentage HTTPTopBrowserResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const HTTPTopBrowserResponseMetaNormalizationRatio HTTPTopBrowserResponseMetaNormalization = "RATIO"` - `Units []HTTPTopBrowserResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Top0 []HTTPTopBrowserResponseTop0` - `Name string` - `Value 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.HTTP.Top.Browser(context.TODO(), radar.HTTPTopBrowserParams{ }) 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": [ { "name": "chrome", "value": "value" } ] }, "success": true } ```