cuery.seo.brands#

Functions to identify competitors and fetch brand information.

Attributes#

DEFAULT_SEARCH_MODEL

COMPETITORS_PROMPT

Used in first step identifying competitors of a brand.

BRAND_PROMPT

Prompt to extract detailed information for a single brand.

Classes#

Brand

Identifier for a brand.

Brands

List of brands.

Product

Represents a product or service offered by a brand.

BrandInfo

Represents a brand and its attributes.

BrandSearchConfig

Configuration for GEO analysis (LLM brand mentions and ranks).

Functions#

find_competitors(brand, sector, market[, strict, ...])

Identify main competitors for a given brand.

fetch_brand_info(brand, **kwds)

Fetch detailed information for a given brand.

search_brands(cfg[, to_pandas])

Fetch detailed information for a list of brands.

Module Contents#

cuery.seo.brands.DEFAULT_SEARCH_MODEL = 'openai/gpt-4.1'#
cuery.seo.brands.COMPETITORS_PROMPT = ''#

Used in first step identifying competitors of a brand.

cuery.seo.brands.BRAND_PROMPT = ''#

Prompt to extract detailed information for a single brand.

class cuery.seo.brands.Brand(/, **data)#

Bases: cuery.response.Response

Identifier for a brand.

Parameters:

data (Any)

name: str#

Name of the brand.

description: str#

Brief description of the brand.

class cuery.seo.brands.Brands(/, **data)#

Bases: cuery.response.Response

List of brands.

Parameters:

data (Any)

brands: list[Brand]#

List of brands.

class cuery.seo.brands.Product(/, **data)#

Bases: cuery.response.Response

Represents a product or service offered by a brand.

Parameters:

data (Any)

name: str#

Name of the product or service.

category: str | None#

Category of the product or service.

class cuery.seo.brands.BrandInfo(/, **data)#

Bases: cuery.response.Response

Represents a brand and its attributes.

Parameters:

data (Any)

name: str#

Name of the brand.

short_name: str | None#

Short, common/canonical name of the brand, if different from the official name. E.g. “Tesla” instead of “Tesla, Inc.”, or “Peugoet” instead of “Automobiles Peugeot.

description: str#

Description of the brand.

domain: str = None#

Official website of the brand.

portfolio: list[Product]#

List of products or services offered by the brand.

market_position: Literal['leader', 'challenger', 'niche', 'follower']#

Market position of the brand.

favicon: str | None#

URL of the brand’s favicon, if available.

async cuery.seo.brands.find_competitors(brand, sector, market, strict=True, instructions=None, **kwds)#

Identify main competitors for a given brand.

Parameters:
  • brand (str | list[str])

  • sector (str | None)

  • market (str | None)

  • strict (bool)

  • instructions (str | None)

Return type:

list[Brands]

async cuery.seo.brands.fetch_brand_info(brand, **kwds)#

Fetch detailed information for a given brand.

Parameters:

brand (Brand)

Return type:

BrandInfo

class cuery.seo.brands.BrandSearchConfig(/, **data)#

Bases: cuery.utils.Configurable

Configuration for GEO analysis (LLM brand mentions and ranks).

Parameters:

data (Any)

brand: str | list[str]#

Initial brand or list of brands to find competitors for.

sector: str | None#

Sector or industry the brand operates in, e.g. ‘electric cars’, ‘soft drinks’.

market: str | None#

Geographical market or region, e.g. ‘Spain’, ‘global’.

strict_competitors: bool = True#

Whether to exclude competitors from the same parent company.

instructions: str | None = None#

Additional instructions to guide the competitor search.

search_kwargs: dict | None = None#

Additional keyword arguments to pass to the search function.

async cuery.seo.brands.search_brands(cfg, to_pandas=False)#

Fetch detailed information for a list of brands.

Parameters:
Return type:

cuery.response.ResponseSet | pandas.DataFrame