Skip to content

Commit 00dfe41

Browse files
committed
new code version
1 parent 69caf38 commit 00dfe41

249 files changed

Lines changed: 2053 additions & 1948 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

dataforseo_client/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def __init__(
6262
self.default_headers[header_name] = header_value
6363
self.cookie = cookie
6464
# Set default User-Agent.
65-
self.user_agent = 'python-client/2.0.22'
65+
self.user_agent = 'python-client/2.0.23'
6666
self.client_side_validation = configuration.client_side_validation
6767

6868
def __enter__(self):

dataforseo_client/models/ai_mode_ai_overview_shopping_element_info.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ class AiModeAiOverviewShoppingElementInfo(BaseModel):
1919
""" # noqa: E501
2020
type: Optional[StrictStr] = Field(default=None, description=r"type of element")
2121
product_id: Optional[StrictStr] = Field(default=None, description=r"")
22+
data_docid: Optional[StrictStr] = Field(default=None, description=r"")
23+
gid: Optional[StrictStr] = Field(default=None, description=r"")
2224
title: Optional[StrictStr] = Field(default=None, description=r"title of the element")
2325
url: Optional[StrictStr] = Field(default=None, description=r"reference page URL")
2426
domain: Optional[StrictStr] = Field(default=None, description=r"domain in link")
@@ -32,6 +34,8 @@ class AiModeAiOverviewShoppingElementInfo(BaseModel):
3234
__properties: ClassVar[List[str]] = [
3335
"type",
3436
"product_id",
37+
"data_docid",
38+
"gid",
3539
"title",
3640
"url",
3741
"domain",
@@ -70,6 +74,8 @@ def to_dict(self) -> Dict[str, Any]:
7074

7175
_dict['type'] = self.type
7276
_dict['product_id'] = self.product_id
77+
_dict['data_docid'] = self.data_docid
78+
_dict['gid'] = self.gid
7379
_dict['title'] = self.title
7480
_dict['url'] = self.url
7581
_dict['domain'] = self.domain
@@ -94,6 +100,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
94100
_obj = cls.model_validate({
95101
"type": obj.get("type"),
96102
"product_id": obj.get("product_id"),
103+
"data_docid": obj.get("data_docid"),
104+
"gid": obj.get("gid"),
97105
"title": obj.get("title"),
98106
"url": obj.get("url"),
99107
"domain": obj.get("domain"),

dataforseo_client/models/ai_monthly_searches.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class AiMonthlySearches(BaseModel):
1717
""" # noqa: E501
1818
year: Optional[StrictInt] = Field(default=None, description=r"year")
1919
month: Optional[StrictInt] = Field(default=None, description=r"month")
20-
ai_search_volume: Optional[StrictInt] = Field(default=None, description=r"AI search volume rate in a certain month of a year. learn more about this metric here")
20+
ai_search_volume: Optional[StrictInt] = Field(default=None, description=r"AI search volume rate in a certain month of a yearlearn more about this metric here")
2121
__properties: ClassVar[List[str]] = [
2222
"year",
2323
"month",

dataforseo_client/models/ai_optimization_ai_keyword_data_keywords_search_volume_live_item.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ class AiOptimizationAiKeywordDataKeywordsSearchVolumeLiveItem(BaseModel):
1717
AiOptimizationAiKeywordDataKeywordsSearchVolumeLiveItem
1818
""" # noqa: E501
1919
keyword: Optional[StrictStr] = Field(default=None, description=r"specified keyword")
20-
ai_search_volume: Optional[StrictInt] = Field(default=None, description=r"current AI search volume rate of a keyword. learn more about this metric here")
21-
ai_monthly_searches: Optional[List[Optional[AiMonthlySearches]]] = Field(default=None, description=r"monthly AI search volume rates. array of objects with AI search volume rates in a certain month of a year")
20+
ai_search_volume: Optional[StrictInt] = Field(default=None, description=r"current AI search volume rate of a keywordlearn more about this metric here")
21+
ai_monthly_searches: Optional[List[Optional[AiMonthlySearches]]] = Field(default=None, description=r"monthly AI search volume ratesarray of objects with AI search volume rates in a certain month of a year")
2222
__properties: ClassVar[List[str]] = [
2323
"keyword",
2424
"ai_search_volume",

dataforseo_client/models/ai_optimization_ai_keyword_data_keywords_search_volume_live_request_info.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ class AiOptimizationAiKeywordDataKeywordsSearchVolumeLiveRequestInfo(BaseModel):
1515
"""
1616
AiOptimizationAiKeywordDataKeywordsSearchVolumeLiveRequestInfo
1717
""" # noqa: E501
18-
keywords: Optional[List[Optional[StrictStr]]] = Field(default=None, description=r"keywords. required field. UTF-8 encoding. The maximum number of keywords you can specify: 1000;. The maximum number of characters in a single keyword: 250;. The keywords will be converted to lowercase format;. learn more about rules and limitations of keyword and keywords fields in DataForSEO APIs in this Help Center article")
19-
location_name: Optional[StrictStr] = Field(default=None, description=r"full name of the location. required field if you dont specify location_code. Note: it is required to specify either location_name or location_code. you can receive the list of available locations with their location_name by making a separate request to the. https://api.dataforseo.com/v3/ai_optimization/ai_keyword_data/locations_and_languages. example:. United Kingdom")
20-
location_code: Optional[StrictInt] = Field(default=None, description=r"unique location identifier. required field if you dont specify location_name. Note: it is required to specify either location_name or location_code. you can receive the list of available locations with their location_code by making a separate request to the. https://api.dataforseo.com/v3/ai_optimization/ai_keyword_data/locations_and_languages. example:. 2840")
21-
language_name: Optional[StrictStr] = Field(default=None, description=r"full name of the language. required field if you dont specify language_code. if you use this field, you dont need to specify language_code. you can receive the list of available languages with their language_name by making a separate request to the. https://api.dataforseo.com/v3/ai_optimization/ai_keyword_data/locations_and_languages. example:. English")
22-
language_code: Optional[StrictStr] = Field(default=None, description=r"language code. required field if you dont specify language_name. if you use this field, you dont need to specify language_name. you can receive the list of available languages with their language_code by making a separate request to the. https://api.dataforseo.com/v3/ai_optimization/ai_keyword_data/locations_and_languages. example:. en")
23-
tag: Optional[StrictStr] = Field(default=None, description=r"user-defined task identifier. optional field. the character limit is 255. you can use this parameter to identify the task and match it with the result. you will find the specified tag value in the data object of the response")
18+
keywords: Optional[List[Optional[StrictStr]]] = Field(default=None, description=r"keywordsrequired fieldUTF-8 encodingThe maximum number of keywords you can specify: 1000;The maximum number of characters in a single keyword: 250;The keywords will be converted to lowercase format;learn more about rules and limitations of keyword and keywords fields in DataForSEO APIs in this Help Center article")
19+
location_name: Optional[StrictStr] = Field(default=None, description=r"full name of the locationrequired field if you don't specify location_codeNote: it is required to specify either location_name or location_codeyou can receive the list of available locations with their location_name by making a separate request to thehttps://api.dataforseo.com/v3/ai_optimization/ai_keyword_data/locations_and_languagesexample:United Kingdom")
20+
location_code: Optional[StrictInt] = Field(default=None, description=r"unique location identifierrequired field if you don't specify location_nameNote: it is required to specify either location_name or location_codeyou can receive the list of available locations with their location_code by making a separate request to the https://api.dataforseo.com/v3/ai_optimization/ai_keyword_data/locations_and_languagesexample:2840")
21+
language_name: Optional[StrictStr] = Field(default=None, description=r"full name of the languagerequired field if you don't specify language_codeif you use this field, you don't need to specify language_codeyou can receive the list of available languages with their language_name by making a separate request to thehttps://api.dataforseo.com/v3/ai_optimization/ai_keyword_data/locations_and_languagesexample:English")
22+
language_code: Optional[StrictStr] = Field(default=None, description=r"language coderequired field if you don't specify language_nameif you use this field, you don't need to specify language_nameyou can receive the list of available languages with their language_code by making a separate request to thehttps://api.dataforseo.com/v3/ai_optimization/ai_keyword_data/locations_and_languagesexample:en")
23+
tag: Optional[StrictStr] = Field(default=None, description=r"user-defined task identifieroptional fieldthe character limit is 255you can use this parameter to identify the task and match it with the resultyou will find the specified tag value in the data object of the response")
2424
__properties: ClassVar[List[str]] = [
2525
"keywords",
2626
"location_name",

dataforseo_client/models/ai_optimization_chat_gpt_llm_responses_live_request_info.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@ class AiOptimizationChatGptLlmResponsesLiveRequestInfo(BaseModel):
1616
"""
1717
AiOptimizationChatGptLlmResponsesLiveRequestInfo
1818
""" # noqa: E501
19-
user_prompt: Optional[StrictStr] = Field(default=None, description=r"prompt for the AI model. required field. the question or task you want to send to the AI model;. you can specify up to 500 characters in the user_prompt field")
20-
model_name: Optional[StrictStr] = Field(default=None, description=r"name of the AI model. required field. model_nameconsists of the actual model name and version name;. if the basic model name is specified, its latest version will be set by default;. for example, if gpt-4.1 is specified, the gpt-4.1-2025-04-14 will be set as model_name automatically;. you can receive the list of available LLM models by making a separate request to the https://api.dataforseo.com/v3/ai_optimization/chat_gpt/llm_responses/models")
21-
max_output_tokens: Optional[StrictInt] = Field(default=None, description=r"maximum number of tokens in the AI response. optional field. minimum value for reasoning models (e.g., reasoning is true in the Models endpoint): 1024;. minimum value for non-reasoning models: 16;. maximum value: 4096;. default value: 2048. Note: if web_search is set to true or the reasoning model is specified in the request, the output token count may exceed the specified max_output_tokens limit")
22-
temperature: Optional[StrictFloat] = Field(default=None, description=r"randomness of the AI response. optional field. higher values make output more diverse;. lower values make output more focused;. minimum value: 0. maximum value: 2. default value: 0.94. Note: not supported in reasoning models")
23-
top_p: Optional[StrictFloat] = Field(default=None, description=r"diversity of the AI response. optional field. controls diversity of the response by limiting token selection;. minimum value: 0. maximum value: 1. default value: 0.92. Note: not supported in reasoning models")
24-
web_search: Optional[StrictBool] = Field(default=None, description=r"enable web search. optional field. when enabled, the AI model can access and cite current web information;. default value: false;. Note: refer to the Models endpoint for a list of models that support web_search;")
25-
force_web_search: Optional[StrictBool] = Field(default=None, description=r"force AI agent to use web search. optional field. to enable this parameter, web_search must also be enabled;. when enabled, the AI model is forced to access and cite current web information;. default value: false;. Note: even if the parameter is set to true, there is no guarantee web sources will be cited in the response. Note #2: not supported in reasoning models")
26-
web_search_country_iso_code: Optional[StrictStr] = Field(default=None, description=r"ISO country code of the location. optional field. required if web_search_city is specified;. to enable this parameter, web_search must also be enabled;. when enabled, the AI model will search the web from the country you specify;. Note: not supported in o3-mini, o1-pro, o1 models")
27-
web_search_city: Optional[StrictStr] = Field(default=None, description=r"city name of the location. optional field. Note: specify web_search_country_iso_code to use this parameter. Note #2: not supported in o3-mini, o1-pro, o1 models")
28-
system_message: Optional[StrictStr] = Field(default=None, description=r"instructions for the AI behaviour. optional field. defines the AIs role, tone, or specific behavior. you can specify up to 500 characters in the system_message field")
19+
user_prompt: Optional[StrictStr] = Field(default=None, description=r"prompt for the AI modelrequired fieldthe question or task you want to send to the AI model;you can specify up to 500 characters in the user_prompt field")
20+
model_name: Optional[StrictStr] = Field(default=None, description=r"name of the AI modelrequired fieldmodel_nameconsists of the actual model name and version name;if the basic model name is specified, its latest version will be set by default;for example, if gpt-4.1 is specified, the gpt-4.1-2025-04-14 will be set as model_name automatically;you can receive the list of available LLM models by making a separate request to the https://api.dataforseo.com/v3/ai_optimization/chat_gpt/llm_responses/models")
21+
max_output_tokens: Optional[StrictInt] = Field(default=None, description=r"maximum number of tokens in the AI responseoptional fieldminimum value for reasoning models (e.g., reasoning is true in the Models endpoint): 1024;minimum value for non-reasoning models: 16;maximum value: 4096;default value: 2048Note: if web_search is set to true or the reasoning model is specified in the request, the output token count may exceed the specified max_output_tokens limit")
22+
temperature: Optional[StrictFloat] = Field(default=None, description=r"randomness of the AI responseoptional fieldhigher values make output more diverse; lower values make output more focused;minimum value: 0maximum value: 2default value: 0.94Note: not supported in reasoning models")
23+
top_p: Optional[StrictFloat] = Field(default=None, description=r"")
24+
web_search: Optional[StrictBool] = Field(default=None, description=r"enable web searchoptional fieldwhen enabled, the AI model can access and cite current web information;default value: false;Note: refer to the Models endpoint for a list of models that support web_search;")
25+
force_web_search: Optional[StrictBool] = Field(default=None, description=r"force AI agent to use web searchoptional fieldto enable this parameter, web_search must also be enabled;when enabled, the AI model is forced to access and cite current web information;default value: false;Note: even if the parameter is set to true, there is no guarantee web sources will be cited in the response Note #2: not supported in reasoning models")
26+
web_search_country_iso_code: Optional[StrictStr] = Field(default=None, description=r"ISO country code of the locationoptional fieldrequired if web_search_city is specified;to enable this parameter, web_search must also be enabled;when enabled, the AI model will search the web from the country you specify;Note: not supported in o3-mini, o1-pro, o1 models")
27+
web_search_city: Optional[StrictStr] = Field(default=None, description=r"city name of the locationoptional fieldNote: specify web_search_country_iso_code to use this parameterNote #2: not supported in o3-mini, o1-pro, o1 models")
28+
system_message: Optional[StrictStr] = Field(default=None, description=r"instructions for the AI behaviouroptional fielddefines the AI's role, tone, or specific behavior you can specify up to 500 characters in the system_message field")
2929
message_chain: Optional[List[Optional[LlmMessageChainItem]]] = Field(default=None, description=r"conversation history. optional field. array of message objects representing previous conversation turns;. each object must contain:. role string with either user or ai role;. message string with message content (max 500 characters);. you can specify maximum of 10 message objects in the array;. Note: for Perplexity models, messages must strictly alternate between user and AI roles (user → ai);. example:. 'message_chain': [{'role':'user','message':'Hello, what’s up?'},{'role':'ai','message':'Hello! I’m doing well, thank you. How can I assist you today?'}]")
30-
tag: Optional[StrictStr] = Field(default=None, description=r"user-defined task identifier. optional field. the character limit is 255. you can use this parameter to identify the task and match it with the result. you will find the specified tag value in the data object of the response")
30+
tag: Optional[StrictStr] = Field(default=None, description=r"user-defined task identifieroptional fieldthe character limit is 255you can use this parameter to identify the task and match it with the resultyou will find the specified tag value in the data object of the response")
3131
__properties: ClassVar[List[str]] = [
3232
"user_prompt",
3333
"model_name",

dataforseo_client/models/ai_optimization_chat_gpt_llm_responses_live_result_info.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ class AiOptimizationChatGptLlmResponsesLiveResultInfo(BaseModel):
1717
AiOptimizationChatGptLlmResponsesLiveResultInfo
1818
""" # noqa: E501
1919
model_name: Optional[StrictStr] = Field(default=None, description=r"name of the AI model used")
20-
input_tokens: Optional[StrictInt] = Field(default=None, description=r"number of tokens in the input. total count of tokens processed")
21-
output_tokens: Optional[StrictInt] = Field(default=None, description=r"number of tokens in the output. total count of tokens generated in the AI response")
22-
reasoning_tokens: Optional[StrictInt] = Field(default=None, description=r"number of reasoning tokens. total count of tokens used to generate reasoning content")
20+
input_tokens: Optional[StrictInt] = Field(default=None, description=r"number of tokens in the inputtotal count of tokens processed")
21+
output_tokens: Optional[StrictInt] = Field(default=None, description=r"number of tokens in the outputtotal count of tokens generated in the AI response")
22+
reasoning_tokens: Optional[StrictInt] = Field(default=None, description=r"number of reasoning tokenstotal count of tokens used to generate reasoning content")
2323
web_search: Optional[StrictBool] = Field(default=None, description=r"indicates if web search was used")
24-
money_spent: Optional[StrictFloat] = Field(default=None, description=r"cost of AI tokens, USD. the price charged by the third-party AI model provider for according to its Pricing")
25-
datetime: Optional[StrictStr] = Field(default=None, description=r"date and time when the result was received. in the UTC format: “yyyy-mm-dd hh-mm-ss +00:00”. example:. 2019-11-15 12:57:46 +00:00")
26-
items: Optional[List[Optional[BaseAiOptimizationLlmResponseElementItem]]] = Field(default=None, description=r"array of response items. contains structured AI response data")
27-
fan_out_queries: Optional[List[Optional[StrictStr]]] = Field(default=None, description=r"array of fan-out queries. contains related search queries derived from the main query to provide a more comprehensive response")
24+
money_spent: Optional[StrictFloat] = Field(default=None, description=r"cost of AI tokens, USDthe price charged by the third-party AI model provider for according to its Pricing")
25+
datetime: Optional[StrictStr] = Field(default=None, description=r"date and time when the result was receivedin the UTC format: “yyyy-mm-dd hh-mm-ss +00:00”example:2019-11-15 12:57:46 +00:00")
26+
items: Optional[List[Optional[BaseAiOptimizationLlmResponseElementItem]]] = Field(default=None, description=r"array of response itemscontains structured AI response data")
27+
fan_out_queries: Optional[List[Optional[StrictStr]]] = Field(default=None, description=r"array of fan-out queriescontains related search queries derived from the main query to provide a more comprehensive response")
2828
__properties: ClassVar[List[str]] = [
2929
"model_name",
3030
"input_tokens",

0 commit comments

Comments
 (0)