데이터 API / DataForSEO / Content Analysis
Content Analysis – Sentiment Analysis API
Sentiment distributions for the citations of a keyword: positive_connotation_distribution (positive, negative, neutral) and sentiment_connotation_distribution (anger, happiness, love, sadness, share, fun). positive_connotation_threshold and sentiments_connotation_threshold set how confident a classification must be to count. ⚠️ Both blocks are already inside post_dataforseo_content_summary_live, which costs the same and adds domains, categories, countries and languages - prefer it unless the smaller response matters. To see the sentiment split by star rating use post_dataforseo_content_rating_distribution_live.
파라미터
경로, 쿼리, 헤더 파라미터가 없습니다.
요청 본문
keywordstring필수target keyword required field UTF-8 encoding the keywords will be converted to a lowercase format; Note: to match an exact phrase instead of a stand-alone keyword, use double quotes and backslashes; example: "keyword": "\"tesla palo alto\"" learn more about rules and limitations of keyword and keywords fields in DataForSEO APIs in this Help Center article
keyword_fieldsobject선택target keyword fields and target keywords optional field use this parameter to filter the dataset by keywords that certain fields should contain; fields you can specify: title, main_title, previous_title, snippet you can indicate several fields; Note: to match an exact phrase instead of a stand-alone keyword, use double quotes and backslashes; example: "keyword_fields": { "snippet": "\"logitech mouse\"", "main_title": "sale" }
titlestring선택main_titlestring선택previous_titlestring선택snippetstring선택page_typestring[]선택target page types optional field use this parameter to filter the dataset by page types possible values: "ecommerce", "news", "blogs", "message-boards", "organization"
internal_list_limitinteger선택maximum number of elements within internal arrays optional field you can use this field to limit the number of elements within the following arrays: top_domains text_categories page_categories countries languages default value: 1 maximum value: 20
positive_connotation_thresholdnumber선택positive connotation threshold optional field specified as the probability index threshold for positive sentiment related to the citation content if you specify this field, connotation_types object in the response will only contain data on citations with positive sentiment probability more than or equal to the specified value possible values: from 0 to 1 default value: 0.4
sentiments_connotation_thresholdnumber선택sentiment connotation threshold optional field specified as the probability index threshold for sentiment connotations related to the citation content if you specify this field, sentiment_connotations object in the response will only contain data on citations where the probability per each sentiment is more than or equal to the specified value possible values: from 0 to 1 default value: 0.4
initial_dataset_filtersarray선택initial dataset filtering parameters optional field initial filtering parameters that apply to fields in the Search endpoint you can add several filters at once (8 filters maximum) you should set a logical operator and, or between the conditions the following operators are supported: regex, not_regex, , , >, >=, =, , in, not_in, like,not_like, has, has_not, match, not_match you can use the % operator with like and not_like to match any string of zero or more characters example: ["domain","", "logitech.com"] [["domain","","logitech.com"],"and",["content_info.connotation_types.negative",">",1000]] [["domain","","logitech.com"]], "and", [["content_info.connotation_types.negative",">",1000], "or", ["content_info.text_category","has",10994]]] for more information about filters, please refer to Content Analysis API – Filters learn more about the initial dataset filters in this help center article.
rank_scalestring선택defines the scale used for calculating and displaying the rank values optional field you can use this parameter to choose whether rank values are presented on a 0–100 or 0–1000 scale possible values: one_hundred — rank values are displayed on a 0–100 scale one_thousand — rank values are displayed on a 0–1000 scale default value: one_thousand learn more about how this parameter works in this Help Center article
tagstring선택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
요청 예시
curl -X POST "https://openapi.felo.ai/v1/beta/dataforseo/content_analysis/sentiment_analysis/live" \
-H "Authorization: Bearer $FELO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"keyword": "<string>",
"keyword_fields": {},
"page_type": [
"<string>"
],
"internal_list_limit": 0,
"positive_connotation_threshold": 0,
"sentiments_connotation_threshold": 0,
"initial_dataset_filters": "<string>",
"rank_scale": "<string>"
}'응답
응답 필드
versionstring선택the current version of the API
status_codeinteger선택general status code you can find the full list of the response codes here Note: we strongly recommend designing a necessary system for handling related exceptional or error conditions
status_messagestring선택general informational message you can find the full list of general informational messages here
timestring선택execution time, seconds
costnumber선택total tasks cost, USD
tasks_countinteger선택the number of tasks in the tasks array
tasks_errorinteger선택the number of tasks in the tasks array returned with an error
tasksstring[]선택array of tasks
idstring선택task identifier unique task identifier in our system in the UUID format
status_codeinteger선택status code of the task generated by DataForSEO; can be within the following range: 10000-60000 you can find the full list of the response codes here
status_messagestring선택informational message of the task you can find the full list of general informational messages here
timestring선택execution time, seconds
costnumber선택cost of the task, USD
result_countinteger선택number of elements in the result array
pathstring[]선택URL path
dataobject선택contains the same parameters that you specified in the POST request
resultstring[]선택array of results
typestring선택type of element = ‘content_analysis_sentiment_analysis’
positive_connotation_distributionobject선택citation distribution by sentiment connotation types contains objects with citation counts and relevant data distributed by types of sentiments (sentiment polarity); possible sentiment connotation types: positive, negative, neutral
$positiveobject선택positive, negative, or neutral connotations variable can take the following values: positive, negative, neutral
typestring선택type of element = ‘content_analysis_summary’
total_countinteger선택total number of relevant results
rankinteger선택rank of all relevant URLs
top_domainsstring[]선택top relevant domains contains objects with top relevant domains and the number of citations per each domain
sentiment_connotationsobject선택sentiment connotations contains relevant sentiments (emotional reactions) and the number of citations per each sentiment; possible connotations: "anger", "happiness", "love", "sadness", "share", "fun"
connotation_typesobject선택connotation types contains types of sentiments (sentiment polarity) related to the keyword citation and citation count per each sentiment type; possible connotation types: "positive", "negative", "neutral"
text_categoriesstring[]선택text categories contains text categories and citation count in each text category to obtain a full list of available categories, refer to the Categories endpoint
page_categoriesstring[]선택page categories contains objects with page categories and citation count in each page category to obtain a full list of available categories, refer to the Categories endpoint
page_typesobject선택page types contains page types and citation count per each page type
countriesobject선택countries contains countries and citation count in each country to obtain a full list of available countries, refer to the Locations endpoint
languagesobject선택languages to obtain a full list of available languages, refer to the Languages endpoint
sentiment_connotation_distributionobject선택citation distribution by sentiment connotations contains objects with citation counts and relevant data distributed by sentiments (emotional reactions); possible sentiment connotation types: anger, happiness, love, sadness, share, fun
$angerobject선택sentiment name variable can take the following values: anger, happiness, love, sadness, share, fun
typestring선택type of element = ‘content_analysis_summary’
total_countinteger선택total number of relevant results
rankinteger선택rank of all relevant URLs
top_domainsstring[]선택top relevant domains contains objects with top relevant domains and the number of citations per each domain
sentiment_connotationsobject선택sentiment connotations contains relevant sentiments (emotional reactions) and the number of citations per each sentiment; possible connotations: "anger", "happiness", "love", "sadness", "share", "fun"
connotation_typesobject선택connotation types contains types of sentiments (sentiment polarity) related to the keyword citation and citation count per each sentiment type; possible connotation types: "positive", "negative", "neutral"
text_categoriesstring[]선택text categories contains text categories and citation count in each text category to obtain a full list of available categories, refer to the Categories endpoint
page_categoriesstring[]선택page categories contains objects with page categories and citation count in each page category to obtain a full list of available categories, refer to the Categories endpoint
page_typesobject선택page types contains page types and citation count per each page type
countriesobject선택countries contains countries and citation count in each country to obtain a full list of available countries, refer to the Locations endpoint
languagesobject선택languages to obtain a full list of available countries, refer to the Languages endpoint