> ## 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.

# 引用 URL 明细列表

> 查询指定品牌下被 AI 平台回答引用的来源 URL 明细列表。

查询指定品牌下被 AI 平台回答引用的来源 URL 明细列表。接口按引用 URL 聚合去重，汇总每个 URL 的引用平台、引用次数、平均排名位置、涉及品牌、引用问题数及品牌口碑等信息，支持多条件筛选、排序与分页。

<Info>
  **执行模式：SYNC · 实时请求。**
  请求发出后服务端同步执行业务，结果直接在当前响应的 `data` 中返回，不存在异步任务、无需轮询、无需二次查询。
</Info>

## 接口速查

| 项目 | 当前接口约定 |
| - | - |
| 接口状态 | 已上线 |
| 请求方式 | `POST` |
| 请求地址 | `https://geobaseapi.aibase.com/v1/openapi/execute` |
| 业务标识 | `source.citation.list` |
| 执行模式 | **SYNC · 实时请求**（直接返回，无需轮询） |
| 身份认证 | Header `AIBase-API-Key` |
| 请求格式 | `application/json` |
| 返回结构 | 分页结构（含 `records`） |

## 请求头

<ParamField header="AIBase-API-Key" type="string" required>
  开发者 API Key，例如 `AIBase_xxx`。用于身份认证、有效期与调用权限校验，请仅在服务端保存和使用。
</ParamField>

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

<ParamField header="AIBase-Request-Id" type="string">
  开发者自定义请求 ID，用于请求追踪；不传时系统自动生成 UUID。
</ParamField>

## 请求体

<ParamField body="apiCode" type="string" required>
  固定为 `source.citation.list`
</ParamField>

<ParamField body="data.brandId" type="string" required>
  所属品牌 ID，为空返回 `4001`
</ParamField>

<ParamField body="data.startDate" type="string">
  格式 `yyyy-MM-dd`；默认最近 7 天
</ParamField>

<ParamField body="data.endDate" type="string">
  格式 `yyyy-MM-dd`；默认今天，不能晚于今天
</ParamField>

<ParamField body="data.llmName" type="string">
  按 AI 平台筛选，如 `deepseek`
</ParamField>

<ParamField body="data.isBrand" type="integer">
  `1` 仅返回提及品牌的 URL，`2` 仅返回未提及品牌的 URL；不传不筛选
</ParamField>

<ParamField body="data.attribute" type="string">
  按来源属性筛选，如 `官方网站`
</ParamField>

<ParamField body="data.keyword" type="string">
  按页面标题或引用 URL 模糊搜索
</ParamField>

<ParamField body="data.pageNo" type="integer">
  默认 `1`
</ParamField>

<ParamField body="data.pageSize" type="integer">
  默认 `50`，最大 `100`，超限自动截断为 100
</ParamField>

<ParamField body="data.fieldSort" type="string">
  见下方排序字段说明；默认按引用次数倒序
</ParamField>

<ParamField body="data.fieldType" type="string">
  `asc` 升序 / `desc` 降序；不传默认降序
</ParamField>

<ParamField body="data.sentimentType" type="string">
  按品牌口碑（情感）筛选，如 `正面`
</ParamField>

### 排序字段说明

| fieldSort 取值 | 含义 |
| - | - |
| `avgPosition` | 按平均排名位置排序 |
| `citeTotal` | 按引用次数排序 |
| `promptTextCount` | 按引用问题数排序 |
| `brandMentioned` | 按是否提及品牌排序 |

<Note>
  时间范围规则：`startDate`/`endDate` 不传时默认查询最近 7 天；`endDate` 晚于今天会被自动截断为今天；起止时间跨度最大 6 个月；开始日期晚于结束日期将直接报错。
</Note>

<RequestExample>
  ```bash cURL theme={null}
  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": "source.citation.list",
      "data": {
        "brandId": "brand-001",
        "startDate": "2026-09-01",
        "endDate": "2026-09-23",
        "llmName": "deepseek",
        "isBrand": 1,
        "attribute": "官方网站",
        "keyword": "example.com",
        "pageNo": 1,
        "pageSize": 50,
        "fieldSort": "citeTotal",
        "fieldType": "desc",
        "sentimentType": "正面"
      }
    }'
  ```

  ```python Python theme={null}
  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": "source.citation.list", "data": {"brandId": "brand-001", "startDate": "2026-09-01", "endDate": "2026-09-23", "llmName": "deepseek", "isBrand": 1, "attribute": "官方网站", "keyword": "example.com", "pageNo": 1, "pageSize": 50, "fieldSort": "citeTotal", "fieldType": "desc", "sentimentType": "正面"}},
      timeout=60,
  )
  res.raise_for_status()
  payload = res.json()

  if payload["code"] == 200:
      for item in payload["data"]["records"]:
          print(item)
  ```

  ```javascript Node.js theme={null}
  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": "source.citation.list", "data": {"brandId": "brand-001", "startDate": "2026-09-01", "endDate": "2026-09-23", "llmName": "deepseek", "isBrand": 1, "attribute": "官方网站", "keyword": "example.com", "pageNo": 1, "pageSize": 50, "fieldSort": "citeTotal", "fieldType": "desc", "sentimentType": "正面"}}),
  });

  const payload = await res.json();
  if (payload.code === 200) {
    for (const item of payload.data.records) {
      console.log(item);
    }
  }
  ```

  ```java Java theme={null}
  String body = """
  {
    "apiCode": "source.citation.list",
    "data": {
      "brandId": "brand-001",
      "startDate": "2026-09-01",
      "endDate": "2026-09-23",
      "llmName": "deepseek",
      "isBrand": 1,
      "attribute": "官方网站",
      "keyword": "example.com",
      "pageNo": 1,
      "pageSize": 50,
      "fieldSort": "citeTotal",
      "fieldType": "desc",
      "sentimentType": "正面"
    }
  }
  """;

  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());
  ```
</RequestExample>

## 返回参数

业务结果位于 `data`，为分页结构，其中 `records` 为按引用 URL 聚合去重后的明细列表。

<ResponseField name="records" type="object[]">
  按引用 URL 聚合去重后的明细。
</ResponseField>

<ResponseField name="records[].index" type="integer">
  明细序号。
</ResponseField>

<ResponseField name="records[].citationUrl" type="string">
  被引用的来源 URL。
</ResponseField>

<ResponseField name="records[].citationTitle" type="string">
  来源页面标题。
</ResponseField>

<ResponseField name="records[].platformName" type="string">
  引用该 URL 的 AI 平台名称。
</ResponseField>

<ResponseField name="records[].platformIcon" type="string">
  AI 平台图标 URL。
</ResponseField>

<ResponseField name="records[].mentionedBrandsArr" type="object[]">
  该 URL 内容中提及的品牌数组。
</ResponseField>

<ResponseField name="records[].llmArray" type="object[]">
  引用该 URL 的 AI 平台编码数组。
</ResponseField>

<ResponseField name="records[].avgPosition" type="number">
  该 URL 被引用时的平均排名位置。
</ResponseField>

<ResponseField name="records[].citeTotal" type="integer">
  该 URL 被引用的总次数。
</ResponseField>

<ResponseField name="records[].sentiment" type="string">
  引用语境下的品牌口碑（情感），如 `正面`。
</ResponseField>

<ResponseField name="records[].promptTextArray" type="object[]">
  引用该 URL 的 AI 对话问题数组。
</ResponseField>

<ResponseField name="records[].promptTextCount" type="integer">
  引用该 URL 的不同问题数量。
</ResponseField>

<ResponseField name="records[].brandMentioned" type="integer">
  `1` 提及品牌，`0` 未提及品牌。
</ResponseField>

<ResponseField name="records[].attributes" type="object">
  来源属性数组，可能为 null。
</ResponseField>

<ResponseField name="records[].websiteType" type="string">
  来源网站类型。
</ResponseField>

<ResponseField name="total" type="long / integer">
  总数、每页条数、当前页、总页数。
</ResponseField>

<ResponseField name="size" type="long / integer">
  同上，见上方分页字段说明。
</ResponseField>

<ResponseField name="current" type="long / integer">
  同上，见上方分页字段说明。
</ResponseField>

<ResponseField name="pages" type="long / integer">
  同上，见上方分页字段说明。
</ResponseField>

<ResponseExample>
  ```json 200 (成功响应) theme={null}
  {
    "code": 200,
    "msg": "成功",
    "data": {
      "records": [
        {
          "index": 1,
          "citationUrl": "https://www.example.com/article/001",
          "citationTitle": "示例文章标题",
          "platformName": "deepseek",
          "platformIcon": "https://cdn.example.com/icon.png",
          "mentionedBrandsArr": ["某某品牌", "竞品A"],
          "llmArray": ["deepseek", "chatgpt"],
          "avgPosition": 1.6,
          "citeTotal": 12,
          "sentiment": "正面",
          "promptTextArray": ["哪个品牌的XX比较好？", "XX推荐哪个品牌？"],
          "promptTextCount": 2,
          "brandMentioned": 1,
          "attributes": ["官方网站", "新闻媒体"],
          "websiteType": "官方网站"
        }
      ],
      "total": 1,
      "size": 50,
      "current": 1,
      "pages": 1
    },
    "timeStamp": 1788830174812
  }
  ```
</ResponseExample>

## 接入注意事项

1. `apiCode` 必须固定为 `source.citation.list`。
2. `brandId` 为必填参数，为空返回 `4001`（所需参数不足）。
3. `startDate`/`endDate` 格式必须为 `yyyy-MM-dd`，默认最近 7 天，最大查询跨度 6 个月。
4. `pageSize` 默认 50，最大 100，超限自动截断为 100。
5. `isBrand`：`1` 表示仅返回提及品牌的 URL，`2` 表示仅返回未提及品牌的 URL。
6. `mentionedBrandsArr`、`llmArray`、`promptTextArray` 为数组字段，按数组解析；`attributes` 可能为 `null`。
7. `fieldSort` 仅支持文档列出的取值，未识别的取值将回退为默认排序（按引用次数倒序）。
8. 返回按引用 URL 聚合去重，同一 URL 只出现一次。
9. `sentiment`（品牌口碑）可能为 `null`，解析时做好空值兼容。

<AccordionGroup>
  <Accordion title="Java 返回对象">
    ```java theme={null}
    public class SourceCitation {
        private Integer index;
        private String citationUrl;
        private String citationTitle;
        private String platformName;
        private String platformIcon;
        private Object mentionedBrandsArr;
        private Object llmArray;
        private BigDecimal avgPosition;
        private Integer citeTotal;
        private String sentiment;
        private Object promptTextArray;
        private Integer promptTextCount;
        private Integer brandMentioned;
        private Object attributes;
        private String websiteType;
    }
    ```

    完整响应类型可表示为 `ReturnResult<PageResult<SourceCitation>>`（`PageResult` 定义见 6.2.5）。
  </Accordion>

  <Accordion title="TypeScript 类型">
    ```typescript theme={null}
    export interface SourceCitation {
      index: number;
      citationUrl: string;
      citationTitle: string | null;
      platformName: string | null;
      platformIcon: string | null;
      mentionedBrandsArr: string[] | null;
      llmArray: string[] | null;
      avgPosition: number | null;
      citeTotal: number;
      sentiment: string | null;
      promptTextArray: string[] | null;
      promptTextCount: number;
      brandMentioned: number;
      attributes: string[] | null;
      websiteType: string | null;
    }
    ```

    可按以下 TypeScript 类型定义解析响应数据。
  </Accordion>
</AccordionGroup>

<Note>
  本页的 cURL 与 Java 示例来自官方接口文档；Python 与 Node.js 示例为等价转写，未经服务端联调，请以实际返回结果为准。
</Note>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.