Skip to content
Start here

List logo matches

client.BrandProtection.V2.LogoMatches.Get(ctx, params) (*V2LogoMatchGetResponse, error)
GET/accounts/{account_id}/cloudforce-one/v2/brand-protection/logo/matches

Lists images that matched a saved logo query, most recently matched first by default. Set download=true to include each matched image as base64 data.

Security

API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
Accepted Permissions (at least one required)
Cloudforce One WriteCloudforce One Read
ParametersExpand Collapse
params V2LogoMatchGetParams
AccountID param.Field[string]

Path param

minLength1
QueryID param.Field[string]

Query param: ID of the logo query whose matches to list.

minLength1
Download param.Field[string]Optional

Query param: Set to true to include each matched image as base64 data in image_data, with its MIME type in content_type.

Limit param.Field[string]Optional

Query param: Maximum number of matches to return. Defaults to 50.

Offset param.Field[string]Optional

Query param: Number of matches to skip, for pagination. Defaults to 0.

Order param.Field[V2LogoMatchGetParamsOrder]Optional

Query param: Sort direction: asc or desc. Defaults to desc.

const V2LogoMatchGetParamsOrderAsc V2LogoMatchGetParamsOrder = "asc"
const V2LogoMatchGetParamsOrderDesc V2LogoMatchGetParamsOrder = "desc"
OrderBy param.Field[V2LogoMatchGetParamsOrderBy]Optional

Query param: Field to sort by: matchedAt, domain, similarityScore, or registrar. Defaults to matchedAt.

const V2LogoMatchGetParamsOrderByMatchedAt V2LogoMatchGetParamsOrderBy = "matchedAt"
const V2LogoMatchGetParamsOrderByDomain V2LogoMatchGetParamsOrderBy = "domain"
const V2LogoMatchGetParamsOrderBySimilarityScore V2LogoMatchGetParamsOrderBy = "similarityScore"
const V2LogoMatchGetParamsOrderByRegistrar V2LogoMatchGetParamsOrderBy = "registrar"
ReturnsExpand Collapse
type V2LogoMatchGetResponse struct{…}
Matches []V2LogoMatchGetResponseMatch
ID int64

ID of the logo match.

Domain string

Domain where the matching image was found, if known.

MatchedAt string

When the match was recorded.

QueryID int64

ID of the logo query that produced this match.

Registrar string

Registrar of domain, if known.

SimilarityScore float64

Visual similarity between the matched image and the query logo. Higher is closer.

URLScanID string
ContentType stringOptional

MIME type of the matched image (only present when download=true)

ImageData stringOptional

Base64-encoded matched image (only present when download=true)

Total int64
minimum0

List logo matches

package main

import (
  "context"
  "fmt"

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

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  logoMatch, err := client.BrandProtection.V2.LogoMatches.Get(context.TODO(), brand_protection.V2LogoMatchGetParams{
    AccountID: cloudflare.F("x"),
    QueryID: cloudflare.F("x"),
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", logoMatch.Matches)
}
{
  "matches": [
    {
      "id": 0,
      "domain": "domain",
      "matched_at": "matched_at",
      "query_id": 0,
      "registrar": "registrar",
      "similarity_score": 0,
      "url_scan_id": "url_scan_id",
      "content_type": "content_type",
      "image_data": "image_data"
    }
  ],
  "total": 0
}
Returns Examples
{
  "matches": [
    {
      "id": 0,
      "domain": "domain",
      "matched_at": "matched_at",
      "query_id": 0,
      "registrar": "registrar",
      "similarity_score": 0,
      "url_scan_id": "url_scan_id",
      "content_type": "content_type",
      "image_data": "image_data"
    }
  ],
  "total": 0
}