> ## 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でエクスポートします。

[モニターレポート](/ja/monitors/reports.md)のすべての数字は、開いて確認できる採点済みの回答から来ています。このページでは
それを示す読み取りエンドポイントを扱います: どのソースが引用されているか、引用が時間とともにどう動くか、1つのスコアの
裏にある回答、1つのプロンプトの詳細、位置ごとの回答、完全なエクスポート。保存済みの結果だけを読むため、無料です。

| エンドポイント | 答える問い |
| - | - |
| [`GET /v1/monitors/{id}/sources`](#引用されているソース) | どのドメインやページが引用されているか。カーソルですべての行に到達できます。 |
| [`GET /v1/monitors/{id}/citations`](#引用の推移) | 上位のドメインとページの引用合計と日別系列。 |
| [`GET /v1/monitors/{id}/answers/{taskId}`](#回答を1件読む) | 1つのスコアの裏にある保存済みの回答。 |
| [`GET /v1/monitors/{id}/prompt`](#1つのプロンプトの詳細) | 1つのプロンプトの日別系列、ソース、最近の回答。 |
| [`GET /v1/monitors/{id}/grid`](#位置ごとの回答) | モニターの位置またはグリッドの地点ごとの回答。 |
| [`GET /v1/monitors/{id}/results`](#採点済みの回答をエクスポートする) | 採点済みの回答そのもの、JSONまたはCSV。 |

## 引用されているソース

`GET /v1/monitors/{id}/sources`([リファレンス](/ja/api-reference/monitors/list-sources.md))は、エンジンが引用した
ドメインまたはページを、レポートと同じ期間とフィルターで順位付けします。生の引用数ではなく**異なる回答の数**を数える
ため、1つの回答で3回引用されたページも1回と数えます。

```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` | [レポート](/ja/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` | これを引用した回答の1つ。[回答エンドポイント](#回答を1件読む)で開きます。 |

行は `citations`、次に `key` の順に並びます。最後のページでは `nextCursor` が `null` です。上位N件の切り捨てはないため、
期間内に引用されたすべてのドメインやページに到達できます。カーソルは不透明な値として扱ってください。

## 引用の推移

`GET /v1/monitors/{id}/citations`([リファレンス](/ja/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` | 1つのエンジン、または `all`(既定)。 |
| `prompt` | 1つのプロンプト、完全一致のテキスト。 |
| `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件ずつページングします。 |

ここでの引用1件は、1つの回答に現れた1つのページなので、`citations` は回答ではなく引用されたページを数えます。
`/sources` は異なる回答の数を数えるため、数値が異なる場合があります。

| フィールド | 内容 |
| - | - |
| `totals` | 期間の `answers`(採点された回答)、`citedAnswers`、`citations`、`ownedCitations`。 |
| `days` | 回答があるUTCの日ごとに1エントリ: `day`、`answers`、`citations`、`ownedCitations`。回答はあるが引用がない日は `citations: 0`、回答がない日は含まれません。 |
| `domains`、`pages` | `offset` からの最大20行: `key`、`domain`、`label`、`kind`、`owned`、`citations`、`answers`、`prompts`、引用があった日の `{ day, citations }` のリストである `daily`。 |
| `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` は常に期間内のすべてのソースを対象にします。

## 回答を1件読む

`GET /v1/monitors/{id}/answers/{taskId}`([リファレンス](/ja/api-reference/monitors/get-answer.md))は、1つのスコアの裏に
ある保存済みの回答を、照合対象とともに返します。言及を鵜呑みにせず確認できます。タスク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で、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` の場合の[回答の分析](/ja/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` を返します。

## 1つのプロンプトの詳細

`GET /v1/monitors/{id}/prompt`([リファレンス](/ja/api-reference/monitors/get-prompt.md))は1つのプロンプトのデータを
返します。`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` は、異なる回答の数ではなく、回答全体で引用されたページを数えます。1つのプロンプトについて
ページネーション付きの完全なソース一覧が必要なら `/sources?prompt=...` を使ってください。

## 位置ごとの回答

`GET /v1/monitors/{id}/grid`([リファレンス](/ja/api-reference/monitors/get-grid.md))は、モニターの現在の
[位置またはグリッド](/ja/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`([リファレンス](/ja/api-reference/monitors/export-results.md))は採点済みの回答
そのものを返します。データウェアハウスへのロード、スプレッドシート、報告資料に使ってください。新しい回答をすべて
スケジュールに従ってクラウドストレージに届けたい場合は、[結果のエクスポート](/ja/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の0時として解釈します。期間の上限はありません。 |
| `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` で、スプレッドシートアプリが正しく開けるようBOM付きの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` を返します。共通のコードは[モニター](/ja/monitors.md#エラー)を
参照してください。

## 次のステップ

> **[イベントとアラート](/ja/monitors/events-and-alerts.md)**
>
> プロンプトの回答が変わったときにWebhookを受け取ります。

> **[結果のエクスポート](/ja/exports.md)**
>
> 採点済みの回答をスケジュールに従って自社ストレージに届けます。


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