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

# 监测器证据：被引用的来源、回答与结果导出

> 查看引擎引用了哪些页面，打开任何数字背后的原始回答，并以 JSON 或 CSV 导出监测器的已评分回答。

[监测器报告](/zh/monitors/reports.md)中的每个数字都来自你可以打开的已评分回答。本页介绍展示这些回答的读取端点：引用了哪些来源、
引用如何随时间变化、单个评分背后的回答、单个提示词的详情、按地点的回答，以及完整导出。它们只读取已保存的结果，因此不收费。

| 端点 | 回答的问题 |
| - | - |
| [`GET /v1/monitors/{id}/sources`](#引用了哪些来源) | 引用了哪些域名或页面，每一行都可通过游标获取。 |
| [`GET /v1/monitors/{id}/citations`](#引用随时间的变化) | 热门域名和页面的引用总数及每日序列。 |
| [`GET /v1/monitors/{id}/answers/{taskId}`](#读取单个回答) | 单个评分背后保存的回答。 |
| [`GET /v1/monitors/{id}/prompt`](#单个提示词详情) | 单个提示词的每日序列、来源和近期回答。 |
| [`GET /v1/monitors/{id}/grid`](#按地点查看回答) | 监测器地点或网格中每个点的回答。 |
| [`GET /v1/monitors/{id}/results`](#导出已评分回答) | 已评分回答本身，JSON 或 CSV 格式。 |

## 引用了哪些来源

`GET /v1/monitors/{id}/sources`（[参考](/zh/api-reference/monitors/list-sources.md)）使用与报告相同的窗口和过滤条件，为引擎引用的域名或页面排名。
它统计的是**不同的回答**，而不是原始引用次数：同一回答中被引用三次的页面只计一次。

```bash theme={"theme":"css-variables"}
curl "https://api.querying.ai/v1/monitors/$MONITOR_ID/sources?days=30&groupBy=domain&limit=2" \
  -H "Authorization: Bearer $QUERYING_API_KEY"
```

| 参数 | 说明 |
| - | - |
| `groupBy` | `domain`（默认）：去掉 `www.`、端口和凭据后的主机名。`page`：完整 URL。 |
| `limit` | 1–100，默认 20。 |
| `cursor` | 上一个响应的 `nextCursor`，原样传回。 |
| `days`、`since`、`until`、`engine`、`prompt` | 与[报告](/zh/monitors/reports.md#查询参数)相同。 |

例如：

```json theme={"theme":"css-variables"}
{
  "success": true,
  "data": {
    "results": [
      {
        "key": "reviews.example",
        "domain": "reviews.example",
        "url": null,
        "label": "Best wireless earbuds of 2026",
        "citations": 11,
        "prompts": 2,
        "own": false,
        "evidenceTaskId": "6f1c2a9e-3b4d-4e5f-8a7b-1c2d3e4f5a61"
      },
      {
        "key": "rtings.example",
        "domain": "rtings.example",
        "url": null,
        "label": "Earbuds reviews",
        "citations": 7,
        "prompts": 1,
        "own": false,
        "evidenceTaskId": "6f1c2a9e-3b4d-4e5f-8a7b-1c2d3e4f5a62"
      }
    ],
    "nextCursor": "eyJrZXkiOiJydGluZ3MuZXhhbXBsZSIsImNpdGF0aW9ucyI6N30",
    "groupBy": "domain",
    "window": { "since": "2026-09-19T07:00:00.000Z", "until": "2026-10-19T07:00:00.000Z" },
    "filters": { "engine": null, "prompt": null },
    "counting": "distinct_answers",
    "ownership": "current_monitor_domains"
  }
}
```

| 字段 | 含义 |
| - | - |
| `citations` | 引用了该域名或页面的回答数。 |
| `prompts` | 其回答引用了它的不同提示词数。 |
| `own` | 它是否为监测器当前的某个 `domains` 或其子域名（`ownership: "current_monitor_domains"`）。 |
| `url` | `groupBy=page` 时为页面 URL；域名为 `null`。 |
| `label` | 引擎给出的引用标签（如有）。 |
| `evidenceTaskId` | 引用了它的一个回答。用[回答端点](#读取单个回答)打开。 |

各行按 `citations` 排序，其次按 `key`。最后一页的 `nextCursor` 为 `null`；没有前 N 名截断，因此窗口内每个被引用的域名或页面都能获取到。
请把游标视为不透明值。

## 引用随时间的变化

`GET /v1/monitors/{id}/citations`（[参考](/zh/api-reference/monitors/get-citations.md)）返回控制台引用图表背后的数据：窗口内的合计、
每日序列，以及前 20 个域名和页面，各自带有每日序列。

```bash theme={"theme":"css-variables"}
curl "https://api.querying.ai/v1/monitors/$MONITOR_ID/citations?days=30&kind=owned" \
  -H "Authorization: Bearer $QUERYING_API_KEY"
```

| 参数 | 说明 |
| - | - |
| `days` | `7`、`30`（默认）或 `90`。 |
| `since`、`until` | 固定窗口，与报告相同。设置后，`days` 只作为 `windowDays` 原样返回。 |
| `engine` | 一个引擎，或 `all`（默认）。 |
| `prompt` | 一个提示词，按原文精确匹配。 |
| `kind` | `all`（默认）、`owned`、`editorial`、`review_media`、`pr_wire`、`institution`、`reviews`、`commerce`、`social`、`blog`、`community`、`video`、`brand`、`content` 或 `other`。 |
| `q` | 保留名称包含该文本的域名，或 URL 包含该文本的页面。最多 200 个字符。 |
| `offset` | 0–10,000，用于以每页 20 条翻阅域名和页面列表。 |

这里一次引用指一个回答中的一个页面，因此 `citations` 统计的是被引用的页面，而不是回答。`/sources` 统计不同的回答，所以两者的数字可能不同。

| 字段 | 内容 |
| - | - |
| `totals` | 窗口内的 `answers`（已评分回答）、`citedAnswers`、`citations` 和 `ownedCitations`。 |
| `days` | 每个有回答的 UTC 日一条：`day`、`answers`、`citations`、`ownedCitations`。有回答但没有引用的日期为 `citations: 0`；没有回答的日期不出现。 |
| `domains`、`pages` | 从 `offset` 起最多 20 行：`key`、`domain`、`label`、`kind`、`owned`、`citations`、`answers`、`prompts`，以及 `daily`（有引用的日期的 `{ day, citations }` 列表）。 |
| `types` | 按 `kind`：`citations` 和不同的 `domains` 数。 |
| `pagination` | `offset`、`limit`（20）、`totalDomains`、`totalPages`。 |
| `windowDays`、`engine`、`prompt`、`since`、`until` | 所读取的范围。 |

你的域名的 `kind` 为 `owned`；其他类别来自一份固定的已知发布方列表，未知的一律为 `other`。来源的占比是它的 `citations` 除以 `totals.citations`。
`kind`、`q` 和 `offset` 只缩小 `domains`、`pages` 和 `pagination`；`totals`、`days` 和 `types` 始终覆盖窗口内的所有来源。

## 读取单个回答

`GET /v1/monitors/{id}/answers/{taskId}`（[参考](/zh/api-reference/monitors/get-answer.md)）返回单个评分背后保存的回答，以及它当时所匹配的内容，
因此提及可以被核实，而不必盲目相信。任务 id 来自报告中的 `evidenceTaskId`、`mentionTaskId` 和 `latestTaskId`、`/sources`，以及导出的行。

```bash theme={"theme":"css-variables"}
curl "https://api.querying.ai/v1/monitors/$MONITOR_ID/answers/6f1c2a9e-3b4d-4e5f-8a7b-1c2d3e4f5a61" \
  -H "Authorization: Bearer $QUERYING_API_KEY"
```

例如：

```json theme={"theme":"css-variables"}
{
  "success": true,
  "data": {
    "answer": {
      "taskId": "6f1c2a9e-3b4d-4e5f-8a7b-1c2d3e4f5a61",
      "engine": "CHATGPT",
      "prompt": "best wireless earbuds for commuting",
      "mentioned": true,
      "cited": true,
      "position": 81,
      "ranAt": "2026-10-17T09:01:48.311Z",
      "answerText": "For commuting, look at the **Northwind Audio Pro** for noise cancelling or the **Acme Audio Air** for battery life.",
      "sources": [
        { "url": "https://reviews.example/best-earbuds", "label": "Best wireless earbuds of 2026", "position": 1 },
        { "url": "https://acme-audio.example/air", "label": "Acme Audio Air", "position": 2 }
      ],
      "competitorHits": ["Northwind Audio"],
      "scoringContext": {
        "aliases": ["Acme Audio", "Acme"],
        "domains": ["acme-audio.example"],
        "competitors": [
          { "name": "Northwind Audio", "aliases": ["Northwind Audio"], "source": "user" },
          { "name": "Contoso Sound", "aliases": ["Contoso Sound", "Contoso"], "source": "user" }
        ],
        "country": "US",
        "version": "3f9a6c1e8b2d4f7a9c0e1b3d5f7a9c1e3b5d7f9a1c3e5b7d9f1a3c5e7b9d1f3a",
        "scoredAt": "2026-10-17T09:01:48.305Z",
        "answerPresent": true,
        "evidenceTruncated": false
      },
      "analysis": null
    },
    "display": {
      "markdown": "For commuting, look at the **Northwind Audio Pro** for noise cancelling or the **Acme Audio Air** for battery life.",
      "text": "For commuting, look at the Northwind Audio Pro for noise cancelling or the Acme Audio Air for battery life."
    },
    "mode": "BRAND",
    "aliases": ["Acme Audio", "Acme"],
    "competitors": [
      { "name": "Northwind Audio", "aliases": ["Northwind Audio"], "source": "user" },
      { "name": "Contoso Sound", "aliases": ["Contoso Sound", "Contoso"], "source": "user" }
    ],
    "scoringKnown": true,
    "evidenceTruncated": false
  }
}
```

| 字段 | 含义 |
| - | - |
| `answer` | 保存的已评分回答。 |
| `answer.answerText` | 回答内容，引擎提供 markdown 时为 markdown，在 8,000 个字符处截断并加上 `…`。引擎没有返回文本时为 `null`。 |
| `answer.sources` | 按引擎顺序排列、按 URL 去重的被引用页面，每条带有 `label` 和从 1 开始的 `position`。 |
| `answer.competitorHits` | 回答中提到的竞争对手。 |
| `answer.position` | 你的品牌首个匹配的字符偏移量，或 `null`。 |
| `answer.scoringContext` | 回答评分时所用的定义：`aliases`、`domains`、`competitors`、`country`、其 `version` 哈希、`scoredAt`、`answerPresent` 和 `evidenceTruncated`。在它被保存之前评分的回答为 `null`。 |
| `answer.analysis` | 监测器设置了 `analysis: true` 时为[回答分析](/zh/engines/answer-analysis.md)结果，否则为 `null`。 |
| `display` | 原始任务响应中的展示字段，如 `markdown`、`text`、`sources`、`searchQueries`、布局、地点和商品，因引擎而异。原始任务已不再保存时为 `null`。 |
| `mode` | 监测器的模式。在品类监测器上，`aliases` 为空，`competitors` 是被跟踪品牌的列表。 |
| `aliases`、`competitors` | 该回答所匹配的内容：来自 `scoringContext`；它为 `null` 时为监测器的当前值。 |
| `scoringKnown` | 回答早于评分上下文的保存时为 `false`；此时 `aliases` 和 `competitors` 是监测器的当前值。 |
| `evidenceTruncated` | `answerText` 是否被截断。`scoringKnown` 为 `false` 时为 `null`。 |

不是该监测器已评分回答的任务 id 返回 `404 NOT_FOUND`。

## 单个提示词详情

`GET /v1/monitors/{id}/prompt`（[参考](/zh/api-reference/monitors/get-prompt.md)）返回单个提示词的数据。`prompt`（原文）为必填，
对已从监测器中移除的提示词同样有效；`days` 为 `7`、`30`（默认）或 `90`。

```bash theme={"theme":"css-variables"}
curl -G "https://api.querying.ai/v1/monitors/$MONITOR_ID/prompt" \
  --data-urlencode "prompt=best wireless earbuds for commuting" \
  --data-urlencode "days=30" \
  -H "Authorization: Bearer $QUERYING_API_KEY"
```

| 字段 | 内容 |
| - | - |
| `monitor` | `id`、`name`、`engines` 和 `aliases`。 |
| `prompt`、`windowDays` | 所读取的内容。 |
| `series` | 按 UTC 日和引擎：`day`、`engine`、`runs`、`mentioned`、`cited`。 |
| `topDomains` | 最多 12 个被引用的域名：`domain`、`citations`、`prompts`、`own`。 |
| `topPages` | 最多 20 个被引用的页面：`url`、`domain`、`label`、`citations`、`prompts`、`own`。 |
| `results` | 最多 100 个最新的已评分回答：`taskId`、`engine`、`prompt`、`mentioned`、`cited`、`position`、`ranAt`、`competitorHits`。 |

这里的 `citations` 统计的是各回答中被引用的页面，而不是不同的回答。如需单个提示词完整、分页的来源列表，请使用 `/sources?prompt=...`。

## 按地点查看回答

`GET /v1/monitors/{id}/grid`（[参考](/zh/api-reference/monitors/get-grid.md)）按监测器当前[地点或网格](/zh/monitors.md#地点与网格)的每个点返回回答。
可选的 `engine`（监测器的引擎之一）和 `prompt` 用于缩小范围；`days` 为 `7`、`30`（默认）或 `90`。

响应包含 `location`、`grid`、`engine`、`prompt`、`windowDays` 和 `points`。每个点带有 `row`、
`col`、`location`、`runs`、`mentioned`、`cited`、`topCompetitor`（`{ name, mentions }` 或 `null`）和
`latest`（最新回答的 `{ taskId, engine, mentioned, ranAt }`，或 `null`）。回答按精确坐标对应到点，因此同一监测器早先地点或网格的回答不包含在内。
没有地点或网格的监测器不返回任何点。

## 导出已评分回答

`GET /v1/monitors/{id}/results`（[参考](/zh/api-reference/monitors/export-results.md)）返回已评分回答本身，用于载入数据仓库、电子表格或演示文稿。
如需按计划把每个新回答投递到云存储，请参阅[结果导出](/zh/exports.md)。

```bash theme={"theme":"css-variables"}
curl "https://api.querying.ai/v1/monitors/$MONITOR_ID/results?since=2026-10-01T00:00:00Z&until=2026-10-18T00:00:00Z&mentioned=false" \
  -H "Authorization: Bearer $QUERYING_API_KEY"
```

| 参数 | 说明 |
| - | - |
| `since`、`until` | 左闭右开窗口。默认：截至现在的 30 天。带时区的 ISO 时间点；这里也接受纯 `YYYY-MM-DD`，按 UTC 午夜读取。没有最长时长限制。 |
| `engine`、`prompt` | 与报告相同。 |
| `mentioned`、`cited` | `true` 或 `false`。`mentioned=false` 是差距视图。 |
| `competitor` | 保留其已保存竞争对手命中包含该精确名称的回答，1–80 个字符。它匹配每个回答评分时保存的名称，不与监测器当前的竞争对手核对：监测器从未跟踪过的名称返回零行，而不是错误。 |
| `includeEvidence` | `true` 会为每一行加上 `answerText`、`sources` 和 `scoringContext`。 |
| `limit` | 1–10,000，默认 10,000。`includeEvidence=true` 时为 1–100，默认 100。 |
| `format` | `json`（默认）或 `csv`。 |
| `cursor` | 上一页的 `nextCursor`。 |

JSON 响应示例：

```json theme={"theme":"css-variables"}
{
  "success": true,
  "data": {
    "monitor": { "id": "d39b8de0-b159-4229-bf58-7064e5369db1", "name": "Earbud brand tracking" },
    "since": "2026-10-01T00:00:00.000Z",
    "until": "2026-10-18T00:00:00.000Z",
    "filters": { "engine": null, "prompt": null, "mentioned": false, "cited": null, "competitor": null },
    "truncated": false,
    "nextCursor": null,
    "results": [
      {
        "id": "0b6e4a52-7c1d-4f8e-9a3b-2d5c6e7f8a91",
        "taskId": "6f1c2a9e-3b4d-4e5f-8a7b-1c2d3e4f5a63",
        "engine": "CHATGPT",
        "prompt": "are cheap earbuds worth it",
        "mentioned": false,
        "cited": false,
        "position": null,
        "ranAt": "2026-10-17T09:02:57.204118Z",
        "competitorHits": ["Northwind Audio"]
      }
    ]
  }
}
```

各行按从新到旧排列。分页是基于 `ranAt`（微秒精度）和行 `id` 的键集分页，因此时间戳相同的行永远不会被跳过或重复。
如需可重复的提取，请传入明确的 `since` 和 `until` 并保持不变，沿着 `nextCursor` 读到它为 `null`。在翻页之间修改窗口可能会跳过或重复行。
请把游标视为不透明值。

### CSV

`format=csv` 时，响应为 `text/csv`，UTF-8 编码并带字节顺序标记，以便电子表格应用正确打开。CSV 正文无法携带分页信息，因此分页移到响应头中：

| 响应头 | 含义 |
| - | - |
| `x-next-cursor` | 下一页的游标；最后一页为空。 |
| `x-result-truncated` | 匹配的行多于本页返回的行时为 `true`。 |
| `x-result-since`、`x-result-until` | 解析后的窗口，便于续传的导出固定窗口。 |

列为 `ran_at, monitor, engine, prompt, mentioned, cited, position, competitors, task_id`，`includeEvidence=true` 时另加
`answer_text, sources, scoring_context`。`competitors` 用 `|` 连接名称；`sources` 和 `scoring_context` 为 JSON 文本。
以 `=`、`+`、`-`、`@`、制表符或回车开头的单元格会加上 `'` 前缀，因此引擎文本不会变成电子表格公式。

```bash theme={"theme":"css-variables"}
curl -D headers.txt -o page1.csv \
  "https://api.querying.ai/v1/monitors/$MONITOR_ID/results?since=2026-10-01T00:00:00Z&until=2026-10-18T00:00:00Z&format=csv&includeEvidence=true" \
  -H "Authorization: Bearer $QUERYING_API_KEY"
```

## 错误与限制

| 限制 | 值 |
| - | - |
| 报告和来源窗口 | 90 天 |
| `/sources` 页 | 1–100 行，默认 20 |
| `/citations` 列表 | 每页 20 行；`offset` 最大 10,000 |
| `/results` 页 | 10,000 行；`includeEvidence=true` 时 100 行 |
| 保存的回答文本 | 8,000 个字符 |
| `/prompt` | 12 个域名、20 个页面、100 个回答 |

参数无效时返回 `400 VALIDATION_ERROR` 并指出问题，包括并非由上一页返回的游标。其他账户的监测器或未知的任务 id 返回
`404 NOT_FOUND`。共用的错误码见[监测器](/zh/monitors.md#错误)。

## 后续步骤

> **[事件与提醒](/zh/monitors/events-and-alerts.md)**
>
> 提示词的回答变化时接收 Webhook。

> **[结果导出](/zh/exports.md)**
>
> 按计划把已评分回答投递到你自己的存储。


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