Skip to content
Start here

Search for locations, ASes, reports, and more

client.Radar.Search.Global(ctx, query) (*SearchGlobalResponse, error)
GET/radar/search/global

Searches for locations, autonomous systems, reports, bots, certificate logs, certificate authorities, industries and verticals. Location names can be localized by sending an Accept-Language HTTP header with a BCP 47 language tag (e.g., Accept-Language: pt-PT). The full quality-value chain is supported (e.g., pt-PT,pt;q=0.9,en;q=0.8).

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 SearchGlobalParams
Query param.Field[string]

String used to perform the search operation.

Exclude param.Field[[]SearchGlobalParamsExclude]optional

Search types excluded from results.

const SearchGlobalParamsExcludeAdm1S SearchGlobalParamsExclude = "ADM1S"
const SearchGlobalParamsExcludeASNs SearchGlobalParamsExclude = "ASNS"
const SearchGlobalParamsExcludeBots SearchGlobalParamsExclude = "BOTS"
const SearchGlobalParamsExcludeCertificateAuthorities SearchGlobalParamsExclude = "CERTIFICATE_AUTHORITIES"
const SearchGlobalParamsExcludeCertificateLogs SearchGlobalParamsExclude = "CERTIFICATE_LOGS"
const SearchGlobalParamsExcludeOrigins SearchGlobalParamsExclude = "ORIGINS"
const SearchGlobalParamsExcludeOriginRegions SearchGlobalParamsExclude = "ORIGIN_REGIONS"
const SearchGlobalParamsExcludeIndustries SearchGlobalParamsExclude = "INDUSTRIES"
const SearchGlobalParamsExcludeLocations SearchGlobalParamsExclude = "LOCATIONS"
const SearchGlobalParamsExcludeNotebooks SearchGlobalParamsExclude = "NOTEBOOKS"
const SearchGlobalParamsExcludeTLDs SearchGlobalParamsExclude = "TLDS"
const SearchGlobalParamsExcludeVerticals SearchGlobalParamsExclude = "VERTICALS"
Format param.Field[SearchGlobalParamsFormat]optional

Format in which results will be returned.

const SearchGlobalParamsFormatJson SearchGlobalParamsFormat = "JSON"
const SearchGlobalParamsFormatCsv SearchGlobalParamsFormat = "CSV"
Include param.Field[[]SearchGlobalParamsInclude]optional

Search types included in results.

const SearchGlobalParamsIncludeAdm1S SearchGlobalParamsInclude = "ADM1S"
const SearchGlobalParamsIncludeASNs SearchGlobalParamsInclude = "ASNS"
const SearchGlobalParamsIncludeBots SearchGlobalParamsInclude = "BOTS"
const SearchGlobalParamsIncludeCertificateAuthorities SearchGlobalParamsInclude = "CERTIFICATE_AUTHORITIES"
const SearchGlobalParamsIncludeCertificateLogs SearchGlobalParamsInclude = "CERTIFICATE_LOGS"
const SearchGlobalParamsIncludeOrigins SearchGlobalParamsInclude = "ORIGINS"
const SearchGlobalParamsIncludeOriginRegions SearchGlobalParamsInclude = "ORIGIN_REGIONS"
const SearchGlobalParamsIncludeIndustries SearchGlobalParamsInclude = "INDUSTRIES"
const SearchGlobalParamsIncludeLocations SearchGlobalParamsInclude = "LOCATIONS"
const SearchGlobalParamsIncludeNotebooks SearchGlobalParamsInclude = "NOTEBOOKS"
const SearchGlobalParamsIncludeTLDs SearchGlobalParamsInclude = "TLDS"
const SearchGlobalParamsIncludeVerticals SearchGlobalParamsInclude = "VERTICALS"
Limit param.Field[int64]optional

Limits the number of objects returned in the response.

exclusiveMinimum
minimum0
LimitPerGroup param.Field[float64]optional

Limits the number of objects per search category.

ReturnsExpand Collapse
type SearchGlobalResponse struct{…}

Search for locations, ASes, reports, and more

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.Search.Global(context.TODO(), radar.SearchGlobalParams{
    Query: cloudflare.F("United"),
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response.Search)
}
{
  "result": {
    "search": [
      {
        "code": "13335",
        "name": "Cloudflare",
        "type": "asn"
      }
    ]
  },
  "success": true
}
Returns Examples
{
  "result": {
    "search": [
      {
        "code": "13335",
        "name": "Cloudflare",
        "type": "asn"
      }
    ]
  },
  "success": true
}