curl --location 'https://geobaseapi.aibase.com/v1/openapi/execute' \
--header 'Content-Type: application/json' \
--header 'AIBase-API-Key: AIBase_xxxxxxxxxxxxxxxx' \
--header 'AIBase-Request-Id: req-20260924-001' \
--data '{
"apiCode": "prompt.analysis.overview",
"data": {
"brandId": "brand-001",
"competitorName": "某某品牌",
"llmName": "deepseek",
"startDate": "2026-09-01",
"endDate": "2026-09-23"
}
}'
import os
import requests
api_key = os.environ["AIBASE_API_KEY"]
headers = {
"AIBase-API-Key": api_key,
"Content-Type": "application/json",
"AIBase-Request-Id": "req-20260924-001",
}
res = requests.post(
"https://geobaseapi.aibase.com/v1/openapi/execute",
headers=headers,
json={"apiCode": "prompt.analysis.overview", "data": {"brandId": "brand-001", "competitorName": "某某品牌", "llmName": "deepseek", "startDate": "2026-09-01", "endDate": "2026-09-23"}},
timeout=60,
)
res.raise_for_status()
payload = res.json()
if payload["code"] == 200:
print(payload["data"])
const res = await fetch("https://geobaseapi.aibase.com/v1/openapi/execute", {
method: "POST",
headers: {
"Content-Type": "application/json",
"AIBase-API-Key": process.env.AIBASE_API_KEY,
"AIBase-Request-Id": "req-20260924-001",
},
body: JSON.stringify({"apiCode": "prompt.analysis.overview", "data": {"brandId": "brand-001", "competitorName": "某某品牌", "llmName": "deepseek", "startDate": "2026-09-01", "endDate": "2026-09-23"}}),
});
const payload = await res.json();
if (payload.code === 200) {
console.log(payload.data);
}
String body = """
{
"apiCode": "prompt.analysis.overview",
"data": {
"brandId": "brand-001",
"competitorName": "某某品牌",
"llmName": "deepseek",
"startDate": "2026-09-01",
"endDate": "2026-09-23"
}
}
""";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://geobaseapi.aibase.com/v1/openapi/execute"))
.header("Content-Type", "application/json")
.header("AIBase-API-Key", "AIBase_xxxxxxxxxxxxxxxx")
.header("AIBase-Request-Id", "req-20260924-001")
.POST(BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, BodyHandlers.ofString());
System.out.println(response.body());
{
"code": 200,
"msg": "成功",
"data": [
{
"promptId": "prompt-001",
"promptText": "哪个品牌的XX比较好?",
"topicName": "品牌口碑",
"visibilityRatePercent": 85.5,
"avgPosition": 1.6,
"brandRate": 42.3,
"competitorsTop3": "竞品A,竞品B,竞品C",
"sentimentScore": 82.5,
"visibilityTrend": [
{ "queryDate": "2026-09-17", "value": 8 },
{ "queryDate": "2026-09-23", "value": 12 }
],
"positionTrend": [
{ "queryDate": "2026-09-17", "value": 2 },
{ "queryDate": "2026-09-23", "value": 1 }
],
"brandShareTrend": [
{ "queryDate": "2026-09-17", "value": 38.1 },
{ "queryDate": "2026-09-23", "value": 42.3 }
]
}
],
"timeStamp": 1788830174812
}
AI 对话问题总览
查询指定品牌下 AI 对话问题在各 AI 平台的监测总览。
POST
/
v1
/
openapi
/
execute
curl --location 'https://geobaseapi.aibase.com/v1/openapi/execute' \
--header 'Content-Type: application/json' \
--header 'AIBase-API-Key: AIBase_xxxxxxxxxxxxxxxx' \
--header 'AIBase-Request-Id: req-20260924-001' \
--data '{
"apiCode": "prompt.analysis.overview",
"data": {
"brandId": "brand-001",
"competitorName": "某某品牌",
"llmName": "deepseek",
"startDate": "2026-09-01",
"endDate": "2026-09-23"
}
}'
import os
import requests
api_key = os.environ["AIBASE_API_KEY"]
headers = {
"AIBase-API-Key": api_key,
"Content-Type": "application/json",
"AIBase-Request-Id": "req-20260924-001",
}
res = requests.post(
"https://geobaseapi.aibase.com/v1/openapi/execute",
headers=headers,
json={"apiCode": "prompt.analysis.overview", "data": {"brandId": "brand-001", "competitorName": "某某品牌", "llmName": "deepseek", "startDate": "2026-09-01", "endDate": "2026-09-23"}},
timeout=60,
)
res.raise_for_status()
payload = res.json()
if payload["code"] == 200:
print(payload["data"])
const res = await fetch("https://geobaseapi.aibase.com/v1/openapi/execute", {
method: "POST",
headers: {
"Content-Type": "application/json",
"AIBase-API-Key": process.env.AIBASE_API_KEY,
"AIBase-Request-Id": "req-20260924-001",
},
body: JSON.stringify({"apiCode": "prompt.analysis.overview", "data": {"brandId": "brand-001", "competitorName": "某某品牌", "llmName": "deepseek", "startDate": "2026-09-01", "endDate": "2026-09-23"}}),
});
const payload = await res.json();
if (payload.code === 200) {
console.log(payload.data);
}
String body = """
{
"apiCode": "prompt.analysis.overview",
"data": {
"brandId": "brand-001",
"competitorName": "某某品牌",
"llmName": "deepseek",
"startDate": "2026-09-01",
"endDate": "2026-09-23"
}
}
""";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://geobaseapi.aibase.com/v1/openapi/execute"))
.header("Content-Type", "application/json")
.header("AIBase-API-Key", "AIBase_xxxxxxxxxxxxxxxx")
.header("AIBase-Request-Id", "req-20260924-001")
.POST(BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, BodyHandlers.ofString());
System.out.println(response.body());
{
"code": 200,
"msg": "成功",
"data": [
{
"promptId": "prompt-001",
"promptText": "哪个品牌的XX比较好?",
"topicName": "品牌口碑",
"visibilityRatePercent": 85.5,
"avgPosition": 1.6,
"brandRate": 42.3,
"competitorsTop3": "竞品A,竞品B,竞品C",
"sentimentScore": 82.5,
"visibilityTrend": [
{ "queryDate": "2026-09-17", "value": 8 },
{ "queryDate": "2026-09-23", "value": 12 }
],
"positionTrend": [
{ "queryDate": "2026-09-17", "value": 2 },
{ "queryDate": "2026-09-23", "value": 1 }
],
"brandShareTrend": [
{ "queryDate": "2026-09-17", "value": 38.1 },
{ "queryDate": "2026-09-23", "value": 42.3 }
]
}
],
"timeStamp": 1788830174812
}
查询指定品牌下 AI 对话问题在各 AI 平台的监测总览。按问题维度汇总曝光度、平均位次、AI 声量、情感得分与 Top3 竞品,并附带曝光趋势、位次趋势与 AI 声量占比趋势。返回结构为数组而非分页。
完整响应类型可表示为
可按以下 TypeScript 类型定义解析响应数据。
执行模式:SYNC · 实时请求。
请求发出后服务端同步执行业务,结果直接在当前响应的
data 中返回,不存在异步任务、无需轮询、无需二次查询。接口速查
| 项目 | 当前接口约定 |
|---|---|
| 接口状态 | 已上线 |
| 请求方式 | POST |
| 请求地址 | https://geobaseapi.aibase.com/v1/openapi/execute |
| 业务标识 | prompt.analysis.overview |
| 执行模式 | SYNC · 实时请求(直接返回,无需轮询) |
| 身份认证 | Header AIBase-API-Key |
| 请求格式 | application/json |
| 返回结构 | 数组结构 |
请求头
string
required
开发者 API Key,例如
AIBase_xxx。用于身份认证、有效期与调用权限校验,请仅在服务端保存和使用。string
required
固定为
application/json。string
开发者自定义请求 ID,用于请求追踪;不传时系统自动生成 UUID。
请求体
string
required
固定为
prompt.analysis.overviewstring
required
所属品牌 ID,为空返回
4001string
required
目标品牌名称(用于竞品识别与 AI 声量计算),为空返回
4001string
按 AI 平台筛选,如
deepseek;不传返回全部平台string
格式
yyyy-MM-dd;默认最近 7 天string
格式
yyyy-MM-dd;默认今天,不能晚于今天时间范围规则与
prompt.analysis.detail 一致:不传默认最近 7 天;endDate 晚于今天自动截断为今天;起止跨度最大 6 个月;开始日期晚于结束日期将直接报错。curl --location 'https://geobaseapi.aibase.com/v1/openapi/execute' \
--header 'Content-Type: application/json' \
--header 'AIBase-API-Key: AIBase_xxxxxxxxxxxxxxxx' \
--header 'AIBase-Request-Id: req-20260924-001' \
--data '{
"apiCode": "prompt.analysis.overview",
"data": {
"brandId": "brand-001",
"competitorName": "某某品牌",
"llmName": "deepseek",
"startDate": "2026-09-01",
"endDate": "2026-09-23"
}
}'
import os
import requests
api_key = os.environ["AIBASE_API_KEY"]
headers = {
"AIBase-API-Key": api_key,
"Content-Type": "application/json",
"AIBase-Request-Id": "req-20260924-001",
}
res = requests.post(
"https://geobaseapi.aibase.com/v1/openapi/execute",
headers=headers,
json={"apiCode": "prompt.analysis.overview", "data": {"brandId": "brand-001", "competitorName": "某某品牌", "llmName": "deepseek", "startDate": "2026-09-01", "endDate": "2026-09-23"}},
timeout=60,
)
res.raise_for_status()
payload = res.json()
if payload["code"] == 200:
print(payload["data"])
const res = await fetch("https://geobaseapi.aibase.com/v1/openapi/execute", {
method: "POST",
headers: {
"Content-Type": "application/json",
"AIBase-API-Key": process.env.AIBASE_API_KEY,
"AIBase-Request-Id": "req-20260924-001",
},
body: JSON.stringify({"apiCode": "prompt.analysis.overview", "data": {"brandId": "brand-001", "competitorName": "某某品牌", "llmName": "deepseek", "startDate": "2026-09-01", "endDate": "2026-09-23"}}),
});
const payload = await res.json();
if (payload.code === 200) {
console.log(payload.data);
}
String body = """
{
"apiCode": "prompt.analysis.overview",
"data": {
"brandId": "brand-001",
"competitorName": "某某品牌",
"llmName": "deepseek",
"startDate": "2026-09-01",
"endDate": "2026-09-23"
}
}
""";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://geobaseapi.aibase.com/v1/openapi/execute"))
.header("Content-Type", "application/json")
.header("AIBase-API-Key", "AIBase_xxxxxxxxxxxxxxxx")
.header("AIBase-Request-Id", "req-20260924-001")
.POST(BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, BodyHandlers.ofString());
System.out.println(response.body());
返回参数
业务结果位于data,为数组结构,按问题维度聚合。无数据时 data 为 null。
object[]
按问题维度聚合的总览数据,无数据时为 null。
string
问题唯一标识。
string
AI 对话问题文本。
string
所属主题名称。
number
品牌曝光度(%)。
number
品牌在该问题下的平均排名位次。
number
AI 声量(%)。
string
回答中出现的前 3 个竞品,逗号分隔。
number
情感得分。
object[]
曝光趋势点列表,元素含
queryDate(yyyy-MM-dd)与 value。object[]
位次趋势点列表,元素含
queryDate 与 value。object[]
AI 声量占比趋势点列表,元素含
queryDate 与 value。{
"code": 200,
"msg": "成功",
"data": [
{
"promptId": "prompt-001",
"promptText": "哪个品牌的XX比较好?",
"topicName": "品牌口碑",
"visibilityRatePercent": 85.5,
"avgPosition": 1.6,
"brandRate": 42.3,
"competitorsTop3": "竞品A,竞品B,竞品C",
"sentimentScore": 82.5,
"visibilityTrend": [
{ "queryDate": "2026-09-17", "value": 8 },
{ "queryDate": "2026-09-23", "value": 12 }
],
"positionTrend": [
{ "queryDate": "2026-09-17", "value": 2 },
{ "queryDate": "2026-09-23", "value": 1 }
],
"brandShareTrend": [
{ "queryDate": "2026-09-17", "value": 38.1 },
{ "queryDate": "2026-09-23", "value": 42.3 }
]
}
],
"timeStamp": 1788830174812
}
接入注意事项
apiCode必须固定为prompt.analysis.overview。brandId、competitorName均为必填参数,为空返回4001(所需参数不足)。startDate/endDate格式必须为yyyy-MM-dd,默认最近 7 天,最大查询跨度 6 个月。- 返回结构为数组(非分页对象);无数据时
data为null,解析时做好空值兼容。 - 三个趋势字段(
visibilityTrend、positionTrend、brandShareTrend)为数组,无趋势数据时为空数组。 visibilityRatePercent、brandRate为百分比数值。- 趋势按查询日期升序排列,可直接用于图表绘制。
Java 返回对象
Java 返回对象
public class PromptAnalysis {
private String promptId;
private String promptText;
private String topicName;
private BigDecimal visibilityRatePercent;
private BigDecimal avgPosition;
private BigDecimal brandRate;
private String competitorsTop3;
private BigDecimal sentimentScore;
private List<TrendPoint> visibilityTrend;
private List<TrendPoint> positionTrend;
private List<TrendPoint> brandShareTrend;
}
public class TrendPoint {
private LocalDate queryDate;
private BigDecimal value;
}
ReturnResult<List<PromptAnalysis>>(ReturnResult 定义见 6.2.5)。TypeScript 类型
TypeScript 类型
export interface PromptAnalysis {
promptId: string;
promptText: string;
topicName: string | null;
visibilityRatePercent: number | null;
avgPosition: number | null;
brandRate: number | null;
competitorsTop3: string | null;
sentimentScore: number | null;
visibilityTrend: TrendPoint[];
positionTrend: TrendPoint[];
brandShareTrend: TrendPoint[];
}
export interface TrendPoint {
queryDate: string;
value: number;
}
本页的 cURL 与 Java 示例来自官方接口文档;Python 与 Node.js 示例为等价转写,未经服务端联调,请以实际返回结果为准。