> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aibase.com/llms.txt
> Use this file to discover all available pages before exploring further.

# GEO 品牌得分检测

> 检测指定品牌在多个大模型平台中的品牌推荐率、曝光表现、增长情况及话题表现，并返回 AI 策略建议。

GEO 品牌得分检测用于评估目标品牌在主流大模型平台中的品牌推荐率得分、曝光表现、增长趋势及核心话题表现，并结合生成式 AI 输出平台运营与竞品应对建议。

<Info>
  **执行模式：ASYNC · 异步。**
  本接口采用异步任务模式：向统一入口提交请求后，平台返回 `requestId` 和 `taskId`；随后使用 `taskId` 轮询 [异步任务查询接口](/api-reference/tasks)（建议每隔 10 秒查询一次）获取最终结果。
</Info>

## 接口速查

| 项目   | 当前接口约定                                   |
| ---- | ---------------------------------------- |
| 接口状态 | 已上线                                      |
| 请求方式 | `POST`                                   |
| 请求地址 | `https://api.aibase.cn/v1/openapi/tasks` |
| 业务标识 | `geo.brand`                              |
| 执行模式 | **ASYNC · 异步**（需轮询结果）                    |
| 身份认证 | Header `AIBase-API-Key`                  |
| 请求格式 | `application/json`                       |

## 请求头

<ParamField header="AIBase-API-Key" type="string" required>
  AIBase 开放平台 API Key，例如 `AIBase_xxx`。请仅在服务端保存和使用。
</ParamField>

<ParamField header="Content-Type" type="string" required>
  固定为 `application/json`。
</ParamField>

<ParamField header="AIBase-Request-Id" type="string">
  可选的客户端请求追踪标识。
</ParamField>

## 请求体

<ParamField body="apiCode" type="string" required>
  固定为 `geo.brand`。
</ParamField>

<ParamField body="data" type="object" required>
  当前业务接口的参数对象。
</ParamField>

<ParamField body="data.brandName" type="string" required>
  品牌名称，1～255 个字符。
</ParamField>

<ParamField body="data.websiteUrl" type="string">
  品牌官网 URL，最长 255 字符。支持 `https://www.example.com`、`www.example.com`、`example.com` 等格式。
</ParamField>

<ParamField body="data.brandDescription" type="string">
  品牌详细描述信息，最长 5000 个字符。
</ParamField>

<ParamField body="data.productService" type="string">
  品牌主要产品或服务描述，最长 255 个字符。
</ParamField>

<ParamField body="data.platforms" type="string[]" required>
  参与监控的大模型平台列表，不能为空。默认包含 `["volcengine", "baidu", "deepseek", "tencent", "aliyun"]`。
</ParamField>

<RequestExample>
  ```bash cURL (第一步：提交任务) theme={null}
  curl --request POST \
    --url https://api.aibase.cn/v1/openapi/tasks \
    --header "AIBase-API-Key: ${AIBASE_API_KEY}" \
    --header 'Content-Type: application/json' \
    --data '{
      "apiCode": "geo.brand",
      "data": {
        "brandName": "小米",
        "websiteUrl": "https://www.mi.com",
        "brandDescription": "小米是一家专注于智能硬件和电子产品研发的移动互联网公司",
        "productService": "智能手机、智能家居、笔记本电脑",
        "platforms": ["volcengine", "baidu", "deepseek", "tencent", "aliyun"]
      }
    }'
  ```

  ```python Python (提交并轮询) theme={null}
  import os
  import time
  import requests

  api_key = os.environ["AIBASE_API_KEY"]
  headers = {
      "AIBase-API-Key": api_key,
      "Content-Type": "application/json",
  }

  # 1. 提交异步检测
  res = requests.post(
      "https://api.aibase.cn/v1/openapi/tasks",
      headers=headers,
      json={
          "apiCode": "geo.brand",
          "data": {
              "brandName": "小米",
              "websiteUrl": "https://www.mi.com",
              "platforms": ["volcengine", "baidu", "deepseek"],
          },
      },
      timeout=30,
  )
  res.raise_for_status()
  task_id = res.json()["data"]["taskId"]
  print("任务已提交，taskId:", task_id)

  # 2. 轮询结果
  while True:
      time.sleep(10)
      query_res = requests.get(
          f"https://api.aibase.cn/v1/openapi/tasks/{task_id}",
          headers={"AIBase-API-Key": api_key},
          timeout=30,
      )
      payload = query_res.json()
      status = payload["data"]["status"]
      if status == 2:
          print("品牌得分检测成功:")
          print(payload["data"]["result"])
          break
      elif status != 1:
          raise RuntimeError(f"任务异常终止，status: {status}")
  ```
</RequestExample>

## 第一步：提交任务响应

向统一入口提交后返回任务标识：

<ResponseExample>
  ```json 200 (提交任务响应) theme={null}
  {
    "code": 200,
    "msg": "成功",
    "data": {
      "requestId": "599b2f8f39078d",
      "taskId": "task_d77143abc87642d4842ff588197faa89"
    },
    "timeStamp": 1789550182642
  }
  ```
</ResponseExample>

## 第二步：最终结果字段说明（GET 查询返回）

轮询任务查询接口，当 `status = 2` 时，`data.result` 包含品牌得分与多维度分析结构：

<ResponseField name="score" type="integer" required>
  品牌推荐率综合得分（基于各平台品牌推荐率四舍五入后的整数；无数据时为 0）。
</ResponseField>

<ResponseField name="info" type="object" required>
  品牌基础信息对象。
</ResponseField>

<ResponseField name="info.brandId" type="string" required>
  品牌唯一 ID。
</ResponseField>

<ResponseField name="info.brandName" type="string" required>
  品牌名称。
</ResponseField>

<ResponseField name="info.brandDescription" type="string">
  品牌描述。
</ResponseField>

<ResponseField name="info.websiteUrl" type="string">
  品牌官网链接。
</ResponseField>

<ResponseField name="info.products" type="string">
  产品服务列表，注意返回类型为 JSON 数组字符串，例如 `"[\"智能手机\",\"智能家居\"]"`。
</ResponseField>

<ResponseField name="info.topics" type="string">
  核心关联话题，返回类型为 JSON 数组字符串。
</ResponseField>

<ResponseField name="info.competitors" type="string">
  主要竞品列表，返回类型为 JSON 数组字符串。
</ResponseField>

<ResponseField name="info.langType" type="string">
  语言区域，如 `zh_cn`。
</ResponseField>

<ResponseField name="info.platforms" type="string[]" required>
  监控大模型平台列表。
</ResponseField>

<ResponseField name="platformStats" type="object[]" required>
  各大模型平台的统计明细列表（仅返回 `hasData = true` 的有效模型平台）。
</ResponseField>

<ResponseField name="platformStats[].platform" type="string" required>
  大模型平台编码（如 `deepseek`）。
</ResponseField>

<ResponseField name="platformStats[].hasData" type="boolean" required>
  是否有数据，有效返回项固定为 `true`。
</ResponseField>

<ResponseField name="platformStats[].brandExposureSum" type="integer" required>
  当日该平台品牌曝光次数合计。
</ResponseField>

<ResponseField name="platformStats[].brandRecommendedCount" type="integer" required>
  当日该平台品牌被推荐次数。
</ResponseField>

<ResponseField name="platformStats[].brandRecommendationRate" type="number" required>
  品牌推荐率（保留 2 位小数）。
</ResponseField>

<ResponseField name="platformStats[].exposureLevel" type="string" required>
  曝光等级评估：`曝光差`（\< 50）、`一般`（50～79）、`高曝光`（≥ 80）。
</ResponseField>

<ResponseField name="platformStats[].previousDayExposureSum" type="integer">
  前一日曝光次数合计（无前一日数据时可能为 `null`）。
</ResponseField>

<ResponseField name="platformStats[].exposureGrowthRate" type="number">
  曝光次数较前一日增长率（百分比数值；前一日为 0 且当日有数据时为 100）。
</ResponseField>

<ResponseField name="platformStats[].previousDayRecommendedCount" type="integer">
  前一日推荐次数。
</ResponseField>

<ResponseField name="platformStats[].recommendedGrowthRate" type="number">
  推荐次数较前一日增长率。
</ResponseField>

<ResponseField name="platformStats[].previousDayRecommendationRate" type="number">
  前一日推荐率。
</ResponseField>

<ResponseField name="platformStats[].recommendationRateChange" type="number">
  推荐率较前一日的百分点变化（绝对点数差异）。
</ResponseField>

<ResponseField name="platformStats[].topicStats" type="object[]" required>
  该平台下话题曝光表现排行（无话题时为空数组）。
</ResponseField>

<ResponseField name="platformStats[].topicStats[].topicName" type="string" required>
  话题名称。
</ResponseField>

<ResponseField name="platformStats[].topicStats[].brandExposureCount" type="integer" required>
  该话题下的品牌曝光次数。
</ResponseField>

<ResponseField name="platformStats[].topicStats[].previousDayExposureCount" type="integer">
  该话题前一日曝光次数。
</ResponseField>

<ResponseField name="platformStats[].topicStats[].growthRate" type="number">
  话题曝光增长率（百分比数值）。
</ResponseField>

<ResponseField name="suggestion" type="object">
  品牌 AI 综合策略建议对象（尚未产出建议时可能为 `null` 或 `hasData = false`）。
</ResponseField>

<ResponseField name="suggestion.brandId" type="string">
  品牌 ID。
</ResponseField>

<ResponseField name="suggestion.brandName" type="string">
  品牌名称。
</ResponseField>

<ResponseField name="suggestion.hasData" type="boolean" required>
  是否已产出策略建议。
</ResponseField>

<ResponseField name="suggestion.statDate" type="string">
  统计日期（格式 `yyyy-MM-dd`）。
</ResponseField>

<ResponseField name="suggestion.suggestions" type="string">
  AI 综合诊断建议文本。
</ResponseField>

<ResponseField name="suggestion.overallPerformance" type="string">
  整体表现分析。
</ResponseField>

<ResponseField name="suggestion.platformStrategy" type="string">
  分平台策略建议。
</ResponseField>

<ResponseField name="suggestion.competitorAnalysis" type="string">
  竞品对比分析。
</ResponseField>

<ResponseField name="suggestion.topicStrategy" type="string">
  话题策略优化建议。
</ResponseField>

<ResponseField name="suggestion.summaryRecommendations" type="string">
  行动总结建议。
</ResponseField>

<ResponseExample>
  ```json 200 (最终成功 result 结构) theme={null}
  {
    "score": 36,
    "info": {
      "brandId": "2099772122671685634",
      "brandName": "小米",
      "brandDescription": "小米是一家专注于智能硬件和电子产品研发的移动互联网公司",
      "websiteUrl": "https://www.mi.com",
      "products": "[\"智能手机\",\"智能家居\"]",
      "topics": "[\"智能手机\",\"性价比\"]",
      "competitors": "[\"华为\",\"苹果\"]",
      "langType": "zh_cn",
      "platforms": ["volcengine", "baidu", "deepseek"]
    },
    "platformStats": [
      {
        "platform": "deepseek",
        "hasData": true,
        "brandExposureSum": 120,
        "brandRecommendedCount": 40,
        "brandRecommendationRate": 35.5,
        "exposureLevel": "高曝光",
        "previousDayExposureSum": 100,
        "exposureGrowthRate": 20.0,
        "previousDayRecommendedCount": 30,
        "recommendedGrowthRate": 33.33,
        "previousDayRecommendationRate": 30.0,
        "recommendationRateChange": 5.5,
        "topicStats": [
          {
            "topicName": "智能手机",
            "brandExposureCount": 80,
            "previousDayExposureCount": 70,
            "growthRate": 14.29
          }
        ]
      }
    ],
    "suggestion": {
      "brandId": "2099772122671685634",
      "brandName": "小米",
      "hasData": true,
      "statDate": "2026-09-15",
      "suggestions": "……",
      "overallPerformance": "……",
      "platformStrategy": "……",
      "competitorAnalysis": "……",
      "topicStrategy": "……",
      "summaryRecommendations": "……"
    }
  }
  ```
</ResponseExample>

## 接入注意事项

1. **固定业务标识**：`apiCode` 必须填写 `geo.brand`。
2. **必填与长度约束**：`brandName` 为必填（1～255 字符）；`platforms` 为必填且不能为空；`websiteUrl`、`brandDescription`、`productService` 为选填。
3. **JSON 字符串数组解析**：`info.products`、`info.topics`、`info.competitors` 字段的值是 JSON 序列化字符串数组（例如 `"[\"智能手机\",\"智能家居\"]"`），客户端需自行执行二次反序列化，不可直接按原生 Array 解析。
4. **无数据平台已自动过滤**：`platformStats` 仅包含 `hasData = true` 的模型平台；若某一平台当天尚无统计数据，该项不会出现在列表中。
5. **策略建议容错**：`suggestion` 在新品牌首次分析或数据量不足时可能为 `null` 或 `hasData = false`，调用方展示时需做好兜底兼容。
