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": "llm.prompt",
"data": {
"brandId": "brand-001",
"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": "llm.prompt", "data": {"brandId": "brand-001", "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": "llm.prompt", "data": {"brandId": "brand-001", "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": "llm.prompt",
"data": {
"brandId": "brand-001",
"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": {
"哪个品牌的XX比较好?": [
{
"llmName": "deepseek",
"topicName": "品牌口碑",
"promptIntent": "选购推荐",
"promptText": "哪个品牌的XX比较好?",
"visibilityRatePercent": 85.5,
"position": 1.6,
"promptCount": 120,
"sentimentScore": 82.5,
"top1Count": 42,
"top3Count": 96,
"top10Count": 114,
"top11Count": 6,
"rankLevel": "top3",
"promptId": "prompt-001"
}
],
"XX推荐哪个品牌?": [
{
"llmName": "chatgpt",
"topicName": "产品对比",
"promptIntent": "横向对比",
"promptText": "XX推荐哪个品牌?",
"visibilityRatePercent": 62.5,
"position": 2.3,
"promptCount": 96,
"sentimentScore": 76.8,
"top1Count": 29,
"top3Count": 66,
"top10Count": 87,
"top11Count": 9,
"rankLevel": "top10",
"promptId": "prompt-002"
}
]
},
"timeStamp": 1788830174812
}
平台 AI 问题排名表现
查询指定品牌在指定时间范围内各 AI 对话问题在各平台的排名表现,按 AI 对话问题(promptText)分组返回问题的曝光率、平均提及位次、问题数量、情感得分、Top1/T
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": "llm.prompt",
"data": {
"brandId": "brand-001",
"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": "llm.prompt", "data": {"brandId": "brand-001", "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": "llm.prompt", "data": {"brandId": "brand-001", "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": "llm.prompt",
"data": {
"brandId": "brand-001",
"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": {
"哪个品牌的XX比较好?": [
{
"llmName": "deepseek",
"topicName": "品牌口碑",
"promptIntent": "选购推荐",
"promptText": "哪个品牌的XX比较好?",
"visibilityRatePercent": 85.5,
"position": 1.6,
"promptCount": 120,
"sentimentScore": 82.5,
"top1Count": 42,
"top3Count": 96,
"top10Count": 114,
"top11Count": 6,
"rankLevel": "top3",
"promptId": "prompt-001"
}
],
"XX推荐哪个品牌?": [
{
"llmName": "chatgpt",
"topicName": "产品对比",
"promptIntent": "横向对比",
"promptText": "XX推荐哪个品牌?",
"visibilityRatePercent": 62.5,
"position": 2.3,
"promptCount": 96,
"sentimentScore": 76.8,
"top1Count": 29,
"top3Count": 66,
"top10Count": 87,
"top11Count": 9,
"rankLevel": "top10",
"promptId": "prompt-002"
}
]
},
"timeStamp": 1788830174812
}
查询指定品牌在指定时间范围内各 AI 对话问题在各平台的排名表现,按 AI 对话问题(
完整响应类型可表示为
可按以下 TypeScript 类型定义解析响应数据。
promptText)分组返回问题的曝光率、平均提及位次、问题数量、情感得分、Top1/Top3/Top10/十名以后命中数量与排名等级等,便于分析具体问题在 AI 平台上的表现。
执行模式:SYNC · 实时请求。
请求发出后服务端同步执行业务,结果直接在当前响应的
data 中返回,不存在异步任务、无需轮询、无需二次查询。接口速查
| 项目 | 当前接口约定 |
|---|---|
| 接口状态 | 已上线 |
| 请求方式 | POST |
| 请求地址 | https://geobaseapi.aibase.com/v1/openapi/execute |
| 业务标识 | llm.prompt |
| 执行模式 | SYNC · 实时请求(直接返回,无需轮询) |
| 身份认证 | Header AIBase-API-Key |
| 请求格式 | application/json |
| 返回结构 | 按 AI 对话问题分组(问题 → 统计数组) |
请求头
string
required
开发者 API Key,例如
AIBase_xxx。用于身份认证、有效期与调用权限校验,请仅在服务端保存和使用。string
required
固定为
application/json。string
开发者自定义请求 ID,用于请求追踪;不传时系统自动生成 UUID。
请求体
string
required
固定为
llm.promptstring
required
所属品牌 ID,为空返回
4001string
按 AI 平台筛选,如
deepseek;不传返回全部平台string
格式
yyyy-MM-dd;默认最近 7 天string
格式
yyyy-MM-dd;默认今天,不能晚于今天时间范围规则:
startDate/endDate 不传时默认查询最近 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": "llm.prompt",
"data": {
"brandId": "brand-001",
"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": "llm.prompt", "data": {"brandId": "brand-001", "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": "llm.prompt", "data": {"brandId": "brand-001", "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": "llm.prompt",
"data": {
"brandId": "brand-001",
"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,为按 AI 对话问题(promptText)分组的结构,每个问题对应该问题在各平台的统计数组。无数据时 data 为空对象 {}。
本接口
data 为按名称分组的映射结构:下表中的 <分组名>[] 表示各分组下的统计数组,实际键名为动态值(平台名 / 主题名 / 意图名 / AI 对话问题文本)。object
键为 AI 对话问题文本,值为该问题在各平台的统计数组。
string
AI 平台名称。
string
问题所属主题名称。
string
问题的场景意图。
string
AI 对话问题文本。
number
该问题下品牌的曝光率(%)。
number
品牌在该问题的平均提及位次。
integer
该问题的 AI 对话问题数量。
number
该问题的情感得分。
integer
品牌排名第1 的命中数量。
integer
品牌排名前3 的命中数量。
integer
品牌排名前10 的命中数量。
integer
品牌排名在 10 以后的命中数量。
string
排名等级:
top1 / top3 / top10 / top10之外 / 未命中。string
AI 对话问题唯一标识。
{
"code": 200,
"msg": "成功",
"data": {
"哪个品牌的XX比较好?": [
{
"llmName": "deepseek",
"topicName": "品牌口碑",
"promptIntent": "选购推荐",
"promptText": "哪个品牌的XX比较好?",
"visibilityRatePercent": 85.5,
"position": 1.6,
"promptCount": 120,
"sentimentScore": 82.5,
"top1Count": 42,
"top3Count": 96,
"top10Count": 114,
"top11Count": 6,
"rankLevel": "top3",
"promptId": "prompt-001"
}
],
"XX推荐哪个品牌?": [
{
"llmName": "chatgpt",
"topicName": "产品对比",
"promptIntent": "横向对比",
"promptText": "XX推荐哪个品牌?",
"visibilityRatePercent": 62.5,
"position": 2.3,
"promptCount": 96,
"sentimentScore": 76.8,
"top1Count": 29,
"top3Count": 66,
"top10Count": 87,
"top11Count": 9,
"rankLevel": "top10",
"promptId": "prompt-002"
}
]
},
"timeStamp": 1788830174812
}
接入注意事项
apiCode必须固定为llm.prompt。brandId为必填参数,为空返回4001(所需参数不足)。startDate/endDate格式必须为yyyy-MM-dd,默认最近 7 天,最大查询跨度 6 个月。- 返回结构为「AI对话问题 → 统计数组」的分组对象;无数据时
data为空对象{},解析时做好空值兼容。 rankLevel取值:top1/top3/top10/top10之外/未命中。top1Count、top3Count、top10Count、top11Count分别对应排名第1、前3、前10、10 名以后的命中数量;top11Count不含前 10。- 同一问题下可能包含多个 AI 平台的统计记录。
Java 返回对象
Java 返回对象
public class PromptDetailStat {
private String llmName;
private String topicName;
private String promptIntent;
private String promptText;
private BigDecimal visibilityRatePercent;
private BigDecimal position;
private Long promptCount;
private BigDecimal sentimentScore;
private Long top1Count;
private Long top3Count;
private Long top10Count;
private Long top11Count;
private String rankLevel;
private String promptId;
}
ReturnResult<Map<String, List<PromptDetailStat>>>(ReturnResult 定义见 6.2.5)。TypeScript 类型
TypeScript 类型
export interface PromptDetailStat {
llmName: string;
topicName: string | null;
promptIntent: string | null;
promptText: string;
visibilityRatePercent: number | null;
position: number | null;
promptCount: number;
sentimentScore: number | null;
top1Count: number;
top3Count: number;
top10Count: number;
top11Count: number;
rankLevel: string | null;
promptId: string | null;
}
export type LLMPromptResult = Record<string, PromptDetailStat[]>;
本页的 cURL 与 Java 示例来自官方接口文档;Python 与 Node.js 示例为等价转写,未经服务端联调,请以实际返回结果为准。