cuery.seo.funnels#
Attributes#
A prompts to customize the generic marketing funnel and categories, |
|
Classes#
A category of Google search keywords within a marketing funnel stage. |
|
A stage in the marketing funnel containing multiple keyword categories. |
|
A complete marketing funnel with multiple stages. |
|
A list of seed keywords for a particular funnel category. |
|
A class representing a marketing funnel with stages and categories. |
Functions#
|
"Customize a generic marketing funnel to a specific sector and market using an LLM. |
|
Merge stage and category dictionaries into a single flat dictionary. |
|
Module Contents#
- cuery.seo.funnels.FUNNEL#
- cuery.seo.funnels.CUSTOM_PROMPT = ''#
A prompts to customize the generic marketing funnel and categories, given a specific industrial sector and geographic market.
- cuery.seo.funnels.EXAMPLES_PROMPT = ''#
- cuery.seo.funnels.PARAPHRASE_PROMPT = ''#
- class cuery.seo.funnels.FunnelCategory(/, **data)#
Bases:
cuery.ResponseA category of Google search keywords within a marketing funnel stage.
- Parameters:
data (Any)
- name: str#
The name of a keyword category within a marketing funnel stage.
- description: str#
A brief description of the category and its purpose.
- keyword_patterns: list[str]#
Common keyword patterns or phrases associated with this category.
- intent: str#
The primary search intent for this category (e.g., Informational, Commercial, Transactional, Navigational).
- examples: list[str]#
Example Google search keywords that fit within this category.
- class cuery.seo.funnels.FunnelStage(/, **data)#
Bases:
cuery.ResponseA stage in the marketing funnel containing multiple keyword categories.
- Parameters:
data (Any)
- stage: str#
The name of the marketing funnel stage (e.g., Awareness, Consideration).
- goal: str#
The primary goal or objective of this funnel stage.
- categories: list[FunnelCategory]#
A list of keyword categories within this funnel stage.
- class cuery.seo.funnels.Funnel(/, **data)#
Bases:
cuery.ResponseA complete marketing funnel with multiple stages.
- Parameters:
data (Any)
- stages: list[FunnelStage]#
- class cuery.seo.funnels.Seeds(/, **data)#
Bases:
cuery.ResponseA list of seed keywords for a particular funnel category.
- Parameters:
data (Any)
- seeds: list[str] = None#
- async cuery.seo.funnels.custom(sector, language, country='global', model='openai/gpt-4.1', funnel=FUNNEL)#
“Customize a generic marketing funnel to a specific sector and market using an LLM.
- cuery.seo.funnels.flatten_level(stage, category)#
Merge stage and category dictionaries into a single flat dictionary.
- Parameters:
stage (dict)
category (dict)
- Return type:
dict
- async cuery.seo.funnels.paraphrase(phrase)#
- Parameters:
phrase (str)
- Return type:
list[str]
- class cuery.seo.funnels.KeywordFunnel(/, **data)#
Bases:
cuery.utils.ConfigurableA class representing a marketing funnel with stages and categories.
- Parameters:
data (Any)
- brand: str | list[str]#
Brand or list of brands to contextualize the funnel.
- sector: str#
Sector to contextualize the funnel.
- language: str#
Language for keyword generation as 2-letter ISO code, e.g. ‘en’.
- country: str | None = None#
Country to contextualize the funnel as 2-letter ISO code, e.g. ‘us’.
- max_ideas_per_category: int = 10000#
Maximum number of keyword ideas to generate per category.
- stages: list[str] | None = None#
List of stage names to filter keyword generation. If None, all stages are processed.
- funnel: list[dict]#
List of funnel stages and their categories.
- forced_seeds: str | list[str] | None = None#
Additional keywords to always include in the keyword generation.
- sector_seed: bool = True#
Whether to include the sector as a keyword seed.
- brand_seed: bool = True#
Whether to include the brand(s) as keyword seeds.
- classmethod deep_copy_funnel(v)#
Deep copy the funnel to prevent mutation of the original.
- Parameters:
v (list[dict])
- Return type:
list[dict]
- __len__()#
Return the total number of categories across all stages in the funnel.
- Return type:
int
- __iter__()#
Make the Funnel iterable over all stages and categories.
- Return type:
collections.abc.Iterator[dict]
- enumerate()#
Make the Funnel iterable over all stages and categories, yielding index and item.
- Return type:
collections.abc.Iterator[tuple[int, int, dict]]
- get(state, category)#
Get funnel subcategory details by stage index or name and category name.
- Parameters:
state (int | str)
category (str | int | None)
- Return type:
dict
- __getitem__(key)#
Get funnel subcategory details by stage index or name and category name.
- Parameters:
key (str | int | tuple[int | str, str | int | None])
- Return type:
dict
- to_pandas()#
Convert the funnel structure to a pandas DataFrame for analysis.
- Return type:
pandas.DataFrame
- async _seeds(level)#
Generate initial keyword examples for a particular funnel stage and category
- Parameters:
level (dict)
- Return type:
list[str]
- async seed()#
Generate initial keyword seeds for all funnel categories.
- Return type:
- iter_seeds()#
Iterate over all funnel categories and their seed keywords.
- Return type:
collections.abc.Iterator[tuple[str, str, str]]
- async explicit_seeds()#
- Return type:
list[str]
- keyword_ideas(seed, stage=None, category=None)#
Generate keyword ideas for a given seed keyword using Google Keyword Planner.
- Parameters:
seed (str)
stage (str | None)
category (str | None)
- Return type:
pandas.DataFrame | None
- async keywords()#
Generate keyword ideas for all funnel categories using the seed keywords.
- Return type:
pandas.DataFrame
- hierarchy()#
Return the funnel hierarchy as a nested dictionary.
- Return type:
dict
- async categorize(keywords)#
Categorize keywords into funnel stages and categories using an LLM.
- Parameters:
keywords (pandas.DataFrame)
- Return type:
pandas.DataFrame
- async run()#
Customize the funnel and generate keyword ideas.