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

# AI 对话问题列表查询

> 查询指定品牌下的 AI 对话问题（监控提示词）列表。

查询指定品牌下的 AI 对话问题（监控提示词）列表。支持按主题、监控状态、关键词筛选。接口固定返回全量列表，按创建时间倒序排列。

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

## 接口速查

| 项目 | 当前接口约定 |
| - | - |
| 接口状态 | 已上线 |
| 请求方式 | `POST` |
| 请求地址 | `https://geobaseapi.aibase.com/v1/openapi/execute` |
| 业务标识 | `brand.prompt` |
| 执行模式 | **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>
  固定为 `brand.prompt`
</ParamField>

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

<ParamField body="data.topicId" type="string">
  按主题筛选；不传返回品牌下全部问题
</ParamField>

<ParamField body="data.monitorType" type="integer">
  `1` 监控中，`0` 未监控；不传不筛选
</ParamField>

<ParamField body="data.keyword" type="string">
  按AI对话问题关键词模糊筛选
</ParamField>

<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": "brand.prompt",
      "data": {
        "brandId": "brand-001",
        "topicId": "topic-001",
        "monitorType": 1,
        "keyword": "推荐"
      }
    }'
  ```

  ```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": "brand.prompt", "data": {"brandId": "brand-001", "topicId": "topic-001", "monitorType": 1, "keyword": "推荐"}},
      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": "brand.prompt", "data": {"brandId": "brand-001", "topicId": "topic-001", "monitorType": 1, "keyword": "推荐"}}),
  });

  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": "brand.prompt",
    "data": {
      "brandId": "brand-001",
      "topicId": "topic-001",
      "monitorType": 1,
      "keyword": "推荐"
    }
  }
  """;

  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` 为 AI 对话问题列表（本接口固定返回全量，`size = -1`）。

<ResponseField name="records" type="object[]">
  AI 对话问题明细列表。
</ResponseField>

<ResponseField name="records[].id" type="string">
  问题唯一标识（即 `promptId`）。
</ResponseField>

<ResponseField name="records[].topicName" type="string">
  所属主题名称。
</ResponseField>

<ResponseField name="records[].promptText" type="string">
  AI 对话问题文本。
</ResponseField>

<ResponseField name="records[].createTime" type="string">
  格式 `yyyy-MM-dd HH:mm:ss`。
</ResponseField>

<ResponseField name="records[].monitorType" type="integer">
  `1` 监控中，`0` 未监控。
</ResponseField>

<ResponseField name="records[].queryDate" type="string">
  最近一次查询日期，可能为 null。
</ResponseField>

<ResponseField name="total" type="long / integer">
  总数、每页条数、当前页、总页数；本接口返回全量，`size = -1`。
</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": [
        {
          "id": "prompt-001",
          "topicName": "品牌口碑",
          "promptText": "哪个品牌的XX比较好？",
          "createTime": "2026-09-20 10:00:00",
          "monitorType": 1,
          "queryDate": "2026-09-23"
        }
      ],
      "total": 1,
      "size": -1,
      "current": 1,
      "pages": 1
    },
    "timeStamp": 1788830174812
  }
  ```
</ResponseExample>

## 接入注意事项

1. `apiCode` 必须固定为 `brand.prompt`。
2. `brandId` 为必填参数，为空返回 `4001`（所需参数不足）。
3. `topicId`、`monitorType`、`keyword` 均为可选筛选条件。
4. 接口固定返回全量列表，`size = -1`，无需传分页参数。
5. `queryDate` 为最近查询日期，可能为 `null`。
6. 问题 ID（`id`）可继续用于 `prompt.analysis.detail` 接口的 `promptId` 筛选。

<AccordionGroup>
  <Accordion title="Java 返回对象">
    ```java theme={null}
    public class PromptData {
        private String id;
        private String topicName;
        private String promptText;
        private LocalDateTime createTime;
        private Integer monitorType;
        private String queryDate;
    }
    ```

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

  <Accordion title="TypeScript 类型">
    ```typescript theme={null}
    export interface PromptData {
      id: string;
      topicName: string;
      promptText: string;
      createTime: string;
      monitorType: number;
      queryDate: 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.