curl --request POST \
--url https://api.aisa.one/apis/v1/dataforseo/content_analysis/rating_distribution/live \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"keyword": "<string>",
"keyword_fields": {
"title": "<string>",
"main_title": "<string>",
"previous_title": "<string>",
"snippet": "<string>"
},
"page_type": [
"<string>"
],
"internal_list_limit": 123,
"search_mode": "<string>",
"positive_connotation_threshold": 123,
"sentiments_connotation_threshold": 123,
"initial_dataset_filters": [
"<unknown>"
],
"rank_scale": "<string>",
"tag": "<string>"
}
]
'import requests
url = "https://api.aisa.one/apis/v1/dataforseo/content_analysis/rating_distribution/live"
payload = [
{
"keyword": "<string>",
"keyword_fields": {
"title": "<string>",
"main_title": "<string>",
"previous_title": "<string>",
"snippet": "<string>"
},
"page_type": ["<string>"],
"internal_list_limit": 123,
"search_mode": "<string>",
"positive_connotation_threshold": 123,
"sentiments_connotation_threshold": 123,
"initial_dataset_filters": ["<unknown>"],
"rank_scale": "<string>",
"tag": "<string>"
}
]
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify([
{
keyword: '<string>',
keyword_fields: {
title: '<string>',
main_title: '<string>',
previous_title: '<string>',
snippet: '<string>'
},
page_type: ['<string>'],
internal_list_limit: 123,
search_mode: '<string>',
positive_connotation_threshold: 123,
sentiments_connotation_threshold: 123,
initial_dataset_filters: ['<unknown>'],
rank_scale: '<string>',
tag: '<string>'
}
])
};
fetch('https://api.aisa.one/apis/v1/dataforseo/content_analysis/rating_distribution/live', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/dataforseo/content_analysis/rating_distribution/live",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
[
'keyword' => '<string>',
'keyword_fields' => [
'title' => '<string>',
'main_title' => '<string>',
'previous_title' => '<string>',
'snippet' => '<string>'
],
'page_type' => [
'<string>'
],
'internal_list_limit' => 123,
'search_mode' => '<string>',
'positive_connotation_threshold' => 123,
'sentiments_connotation_threshold' => 123,
'initial_dataset_filters' => [
'<unknown>'
],
'rank_scale' => '<string>',
'tag' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/dataforseo/content_analysis/rating_distribution/live"
payload := strings.NewReader("[\n {\n \"keyword\": \"<string>\",\n \"keyword_fields\": {\n \"title\": \"<string>\",\n \"main_title\": \"<string>\",\n \"previous_title\": \"<string>\",\n \"snippet\": \"<string>\"\n },\n \"page_type\": [\n \"<string>\"\n ],\n \"internal_list_limit\": 123,\n \"search_mode\": \"<string>\",\n \"positive_connotation_threshold\": 123,\n \"sentiments_connotation_threshold\": 123,\n \"initial_dataset_filters\": [\n \"<unknown>\"\n ],\n \"rank_scale\": \"<string>\",\n \"tag\": \"<string>\"\n }\n]")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/dataforseo/content_analysis/rating_distribution/live")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"keyword\": \"<string>\",\n \"keyword_fields\": {\n \"title\": \"<string>\",\n \"main_title\": \"<string>\",\n \"previous_title\": \"<string>\",\n \"snippet\": \"<string>\"\n },\n \"page_type\": [\n \"<string>\"\n ],\n \"internal_list_limit\": 123,\n \"search_mode\": \"<string>\",\n \"positive_connotation_threshold\": 123,\n \"sentiments_connotation_threshold\": 123,\n \"initial_dataset_filters\": [\n \"<unknown>\"\n ],\n \"rank_scale\": \"<string>\",\n \"tag\": \"<string>\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/dataforseo/content_analysis/rating_distribution/live")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"keyword\": \"<string>\",\n \"keyword_fields\": {\n \"title\": \"<string>\",\n \"main_title\": \"<string>\",\n \"previous_title\": \"<string>\",\n \"snippet\": \"<string>\"\n },\n \"page_type\": [\n \"<string>\"\n ],\n \"internal_list_limit\": 123,\n \"search_mode\": \"<string>\",\n \"positive_connotation_threshold\": 123,\n \"sentiments_connotation_threshold\": 123,\n \"initial_dataset_filters\": [\n \"<unknown>\"\n ],\n \"rank_scale\": \"<string>\",\n \"tag\": \"<string>\"\n }\n]"
response = http.request(request)
puts response.read_body{
"version": "<string>",
"status_code": 123,
"status_message": "<string>",
"time": "<string>",
"cost": 123,
"tasks_count": 123,
"tasks_error": 123,
"tasks": [
"<string>"
],
"tasks.id": "<string>",
"tasks.status_code": 123,
"tasks.status_message": "<string>",
"tasks.time": "<string>",
"tasks.cost": 123,
"tasks.result_count": 123,
"tasks.path": [
"<string>"
],
"tasks.data": {},
"tasks.result": [
"<string>"
],
"tasks.result.type": "<string>",
"tasks.result.min": 123,
"tasks.result.max": 123,
"tasks.result.metrics": {},
"tasks.result.metrics.type": "<string>",
"tasks.result.metrics.total_count": 123,
"tasks.result.metrics.rank": 123,
"tasks.result.metrics.top_domains": [
"<string>"
],
"tasks.result.metrics.sentiment_connotations": {},
"tasks.result.metrics.connotation_types": {},
"tasks.result.metrics.text_categories": [
"<string>"
],
"tasks.result.metrics.page_categories": [
"<string>"
],
"tasks.result.metrics.page_types": {},
"tasks.result.metrics.countries": {},
"tasks.result.metrics.languages": {}
}内容分析 – 评分分布 API
把某关键词的引用按评分分桶,每个桶给出完整指标集。
curl --request POST \
--url https://api.aisa.one/apis/v1/dataforseo/content_analysis/rating_distribution/live \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"keyword": "<string>",
"keyword_fields": {
"title": "<string>",
"main_title": "<string>",
"previous_title": "<string>",
"snippet": "<string>"
},
"page_type": [
"<string>"
],
"internal_list_limit": 123,
"search_mode": "<string>",
"positive_connotation_threshold": 123,
"sentiments_connotation_threshold": 123,
"initial_dataset_filters": [
"<unknown>"
],
"rank_scale": "<string>",
"tag": "<string>"
}
]
'import requests
url = "https://api.aisa.one/apis/v1/dataforseo/content_analysis/rating_distribution/live"
payload = [
{
"keyword": "<string>",
"keyword_fields": {
"title": "<string>",
"main_title": "<string>",
"previous_title": "<string>",
"snippet": "<string>"
},
"page_type": ["<string>"],
"internal_list_limit": 123,
"search_mode": "<string>",
"positive_connotation_threshold": 123,
"sentiments_connotation_threshold": 123,
"initial_dataset_filters": ["<unknown>"],
"rank_scale": "<string>",
"tag": "<string>"
}
]
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify([
{
keyword: '<string>',
keyword_fields: {
title: '<string>',
main_title: '<string>',
previous_title: '<string>',
snippet: '<string>'
},
page_type: ['<string>'],
internal_list_limit: 123,
search_mode: '<string>',
positive_connotation_threshold: 123,
sentiments_connotation_threshold: 123,
initial_dataset_filters: ['<unknown>'],
rank_scale: '<string>',
tag: '<string>'
}
])
};
fetch('https://api.aisa.one/apis/v1/dataforseo/content_analysis/rating_distribution/live', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/dataforseo/content_analysis/rating_distribution/live",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
[
'keyword' => '<string>',
'keyword_fields' => [
'title' => '<string>',
'main_title' => '<string>',
'previous_title' => '<string>',
'snippet' => '<string>'
],
'page_type' => [
'<string>'
],
'internal_list_limit' => 123,
'search_mode' => '<string>',
'positive_connotation_threshold' => 123,
'sentiments_connotation_threshold' => 123,
'initial_dataset_filters' => [
'<unknown>'
],
'rank_scale' => '<string>',
'tag' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/dataforseo/content_analysis/rating_distribution/live"
payload := strings.NewReader("[\n {\n \"keyword\": \"<string>\",\n \"keyword_fields\": {\n \"title\": \"<string>\",\n \"main_title\": \"<string>\",\n \"previous_title\": \"<string>\",\n \"snippet\": \"<string>\"\n },\n \"page_type\": [\n \"<string>\"\n ],\n \"internal_list_limit\": 123,\n \"search_mode\": \"<string>\",\n \"positive_connotation_threshold\": 123,\n \"sentiments_connotation_threshold\": 123,\n \"initial_dataset_filters\": [\n \"<unknown>\"\n ],\n \"rank_scale\": \"<string>\",\n \"tag\": \"<string>\"\n }\n]")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/dataforseo/content_analysis/rating_distribution/live")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"keyword\": \"<string>\",\n \"keyword_fields\": {\n \"title\": \"<string>\",\n \"main_title\": \"<string>\",\n \"previous_title\": \"<string>\",\n \"snippet\": \"<string>\"\n },\n \"page_type\": [\n \"<string>\"\n ],\n \"internal_list_limit\": 123,\n \"search_mode\": \"<string>\",\n \"positive_connotation_threshold\": 123,\n \"sentiments_connotation_threshold\": 123,\n \"initial_dataset_filters\": [\n \"<unknown>\"\n ],\n \"rank_scale\": \"<string>\",\n \"tag\": \"<string>\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/dataforseo/content_analysis/rating_distribution/live")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"keyword\": \"<string>\",\n \"keyword_fields\": {\n \"title\": \"<string>\",\n \"main_title\": \"<string>\",\n \"previous_title\": \"<string>\",\n \"snippet\": \"<string>\"\n },\n \"page_type\": [\n \"<string>\"\n ],\n \"internal_list_limit\": 123,\n \"search_mode\": \"<string>\",\n \"positive_connotation_threshold\": 123,\n \"sentiments_connotation_threshold\": 123,\n \"initial_dataset_filters\": [\n \"<unknown>\"\n ],\n \"rank_scale\": \"<string>\",\n \"tag\": \"<string>\"\n }\n]"
response = http.request(request)
puts response.read_body{
"version": "<string>",
"status_code": 123,
"status_message": "<string>",
"time": "<string>",
"cost": 123,
"tasks_count": 123,
"tasks_error": 123,
"tasks": [
"<string>"
],
"tasks.id": "<string>",
"tasks.status_code": 123,
"tasks.status_message": "<string>",
"tasks.time": "<string>",
"tasks.cost": 123,
"tasks.result_count": 123,
"tasks.path": [
"<string>"
],
"tasks.data": {},
"tasks.result": [
"<string>"
],
"tasks.result.type": "<string>",
"tasks.result.min": 123,
"tasks.result.max": 123,
"tasks.result.metrics": {},
"tasks.result.metrics.type": "<string>",
"tasks.result.metrics.total_count": 123,
"tasks.result.metrics.rank": 123,
"tasks.result.metrics.top_domains": [
"<string>"
],
"tasks.result.metrics.sentiment_connotations": {},
"tasks.result.metrics.connotation_types": {},
"tasks.result.metrics.text_categories": [
"<string>"
],
"tasks.result.metrics.page_categories": [
"<string>"
],
"tasks.result.metrics.page_types": {},
"tasks.result.metrics.countries": {},
"tasks.result.metrics.languages": {}
}min、max 和一个 metrics 对象,其中是 total_count、rank、top_domains(每项含 domain 和 count)、sentiment_connotations(anger / happiness / love / sadness / share / fun)、connotation_types(positive / negative / neutral)、text_categories、page_categories、page_types、countries 和 languages。10 个桶实测 6.1 KB——本家族最大的响应,因为每个桶都把整套指标重复一遍。响应统一包在 DataForSEO 的信封里——数据在 tasks[0].result。 rank_scale 决定分桶方式。要不分桶的同一套指标用 post_dataforseo_content_summary_live;只要情感用 post_dataforseo_content_sentiment_analysis_live。
示例
curl -X POST "https://api.aisa.one/apis/v1/dataforseo/content_analysis/rating_distribution/live" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '[{"keyword": "...", "keyword_fields": "...", "page_type": "..."}]'
// 把整段复制给 Claude Code、Codex、Cursor 或任意 coding agent。
// 连接、授权、跑通这个例子需要的东西都在里面 ——
// 不用粘贴任何 key,浏览器里点一次 Allow 就好。
{
"operation_id": "post_dataforseo_content_rating_distribution_live",
"arguments": {},
"max_price_usd": 0.05
}
// ── for the agent ─────────────────────────────────────────────────────────
// Register the AIsa MCP server, then call its `use` tool with the JSON above.
// name aisa
// endpoint https://mcp.aisa.one/mcp
// transport streamable-http
// auth OAuth. The server publishes RFC 9728 metadata, so open a
// browser and the user clicks Allow once — nothing to paste.
// If AISA_API_KEY is set, send it as a bearer header instead.
// Use your own MCP mechanism, not a hand-edited config file:
// Codex codex mcp add aisa --url https://mcp.aisa.one/mcp
// Claude Code claude mcp add --transport http -s user aisa https://mcp.aisa.one/mcp
// Cursor / VS Code a "url" entry for https://mcp.aisa.one/mcp in the MCP config
// The server lists five tools over https://mcp.aisa.one/servers worth of APIs:
// search, get_details, use, batch_use, list_categories. search and
// get_details are free; use is billed per call and max_price_usd refuses
// anything above the cap before spending. This operation's full contract —
// every argument, the response shape, the price and the pitfalls — is at
// https://aisa.one/docs/zh/api-reference/dataforseo/post_dataforseo-content-analysis-rating-distribution-live.md
// Then run the call and show me the result.
https://mcp.aisa.one/mcp —— Claude Code、
Codex、Cursor、VS Code 都可以。鉴权走 OAuth:客户端打开浏览器,你点一次
Allow,不需要粘贴任何 key。各客户端的具体命令和每次调用的价格见
aisa.one/zh-cn/mcp。授权
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
请求体
目标关键词,必填字段,采用 UTF-8 编码。关键词将转换为小写格式;注意:如需匹配完整短语而非独立关键词,请使用双引号和反斜杠;示例:"keyword": ""tesla palo alto""。有关 DataForSEO API 中 keyword 和 keywords 字段的规则与限制,请参阅此帮助中心文章。
目标关键词字段和目标关键词,可选字段。使用此参数可按特定字段应包含的关键词筛选数据集;可指定的字段:title、main_title、previous_title、snippet。您可以指定多个字段;注意:若要匹配完整短语而非独立关键词,请使用双引号和反斜杠;示例:"keyword_fields": { "snippet": ""logitech mouse"", "main_title": "sale" }
Show child attributes
Show child attributes
目标页面类型,可选字段。使用此参数按页面类型筛选数据集;可能的值:"ecommerce"、"news"、"blogs"、"message-boards"、"organization"
内部数组中的最大元素数量,可选字段;你可以使用此字段限制以下数组中的元素数量:top_domains、text_categories、page_categories、countries、languages;默认值:1;最大值:20
结果分组类型。可选字段,可能的分组类型:as_is – 返回目标关键词的所有引用;one_per_domain – 每个域名返回一条该关键词的引用。默认值:as_is
正面倾向阈值。可选字段。指定为与引用内容相关的正面情感概率指数阈值。如果指定此字段,响应中的 connotation_types 对象将仅包含正面情感概率大于或等于指定值的引用数据。可选值:0 到 1。默认值:0.4
情感内涵阈值,可选字段。指定为与引用内容相关的情感内涵概率指数阈值。如果指定此字段,响应中的 sentiment_connotations 对象将仅包含各项情感概率大于或等于指定值的引用数据。可选值:0 到 1。默认值:0.4
初始数据集过滤参数,可选字段。应用于 Search 端点中字段的初始过滤参数。可以同时添加多个过滤器(最多 8 个)。应在条件之间设置逻辑运算符 and、or。支持以下运算符:regex, not_regex, , , >, >=, =, , in, not_in, like,not_like, has, has_not, match, not_match。可以将 % 运算符与 like 和 not_like 配合使用,以匹配由零个或多个字符组成的任意字符串。示例:["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]]]。有关过滤器的更多信息,请参阅 Content Analysis API – Filters。有关初始数据集过滤器的更多信息,请参阅此帮助中心文章。
定义用于计算和显示排名值的刻度,可选字段。您可以使用此参数选择以 0–100 还是 0–1000 刻度显示排名值。可选值:one_hundred — 以 0–100 刻度显示排名值;one_thousand — 以 0–1000 刻度显示排名值。默认值:one_thousand。有关此参数工作原理的更多信息,请参阅此帮助中心文章。
用户定义的任务标识符。可选字段。字符数限制为 255。您可以使用此参数标识任务并将其与结果匹配;您将在响应的 data 对象中找到指定的 tag 值
响应
成功响应
API 的当前版本
通用状态码;您可以在此处查看完整的响应码列表。注意:我们强烈建议设计必要的系统来处理相关异常或错误情况
常规信息消息;可在此处查看常规信息消息的完整列表
执行时间(秒)
任务总成本(美元)
tasks 数组中的任务数量
返回错误的 tasks 数组中的任务数量
任务数组
任务标识符,系统中采用 UUID 格式的唯一任务标识符
DataForSEO 生成的任务状态码;范围为:10000-60000;完整响应代码列表可在此处查看
任务的信息性消息,你可以在此处查看通用信息性消息的完整列表
执行时间(秒)
任务成本(美元)
结果数组中的元素数量
URL 路径
包含您在 POST 请求中指定的相同参数
结果数组
元素类型 = ‘content_analysis_rating_distribution’
分布量表上的最低评分
分布量表上的最高评分
包含评分分布指标
元素类型 = ‘content_analysis_summary’
数据库中与您的请求相关的结果总量
引用该关键词的所有 URL 的排名,即引用目标关键词的所有 URL 排名的归一化总和
引用目标关键词的热门域名,包含引用目标关键词的热门域名及各域名引用次数的对象
情感内涵,包含与目标关键词引用相关的情感(情绪反应),以及每种情感对应的引用次数;可能的内涵值:"anger", "happiness", "love", "sadness", "share", "fun"
内涵类型,包含与关键词引用相关的情感类型(情感极性),以及每种情感类型的引用次数;可能的内涵类型:"positive"、"negative"、"neutral"
文本类别,包含由文本类别及各类别引用次数组成的对象。如需获取所有可用类别的完整列表,请参阅 Categories 端点
页面类别,包含由页面类别以及各页面类别中的引用次数构成的对象。如需获取所有可用类别的完整列表,请参阅 Categories 端点
页面类型,包含各页面类型及其引用次数
countries 包含各个国家及其引用次数;如需获取完整的可用国家列表,请参阅 Locations 端点。
languages 包含各种语言及每种语言的引用次数;要获取可用语言的完整列表,请参阅 Languages 端点