> This page is for version v1 (default).
> For other versions, use one of these documentation indexes:
> - v1 (default): https://docs.butterix.com/llms.txt
> - v0: https://docs.butterix.com/v0/llms.txt

> For the MDX source of any page, append .mdx to the page URL.
> For a complete documentation index, see https://docs.butterix.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.butterix.com/_mcp/server.
> If something on this page is wrong or missing, POST JSON {"page": "<page URL>", "message": "<what is wrong>"} to https://docs.butterix.com/_biti/feedback/agent.

# AI 提问记录

`GET /sites/{site}/questions`

按时间倒序。条件可以组合；翻页时把上一页最后一条的 `ts` 作为 `before`。

Base URL: https://api.butterix.com/v1

Authentication: bearer token in Authorization header or API key in cookie `biti_session`

## Path parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `site` | string | yes | 站点 slug 或 id |

## Query parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `days` | integer | no | 最近多少天，默认不限 |
| `before` | integer | no | 只要早于这个时间（Unix 毫秒）的 |
| `outcome` | string | no | 结果，多个用逗号分隔 |
| `rating` | enum | no | 读者的评价；`none` 为没有评价的 Allowed: `up`, `down`, `none`. |
| `sources` | enum | no | `none` 只返回没有引用任何来源的 Allowed: `none`. |
| `page` | string | no | 提问时所在的页面 |
| `limit` | integer | no | 返回条数，最大 500 |

## Example request

```bash
curl https://api.butterix.com/v1/sites/acme-payments/questions \
     -H "Authorization: Bearer <token>"
```

## Responses

### 200

读者在 Ask AI 中的提问与回答

Content type: `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `[].id` | integer | no |  |
| `[].ts` | integer | no |  |
| `[].question` | string | no |  |
| `[].answer` | string | no |  |
| `[].model` | string | no |  |
| `[].provider` | enum | no | Allowed: `anthropic`, `deepseek`, `openrouter`. |
| `[].sources` | list of strings | no |  |
| `[].outcome` | enum | no | 有没有答上来：`answered` 已解决，`partial` 部分解决，`missing` 文档缺失，`declined` 与站点无关，`stray` 回答越出站点主题，`failed` 未完成 Allowed: `answered`, `partial`, `missing`, `declined`, `stray`, `failed`. |
| `[].rating` | enum | no | 读者的评价 May be null. Allowed: `up`, `down`. |
| `[].page` | string | no | 提问时所在的页面 May be null. |
| `[].country` | string | no | 国家代码（按 IP 识别） May be null. |
| `[].net` | string | no | 打码的网段（只保留 IP 前三段） May be null. |
| `[].agent` | string | no | 浏览器与系统 May be null. |
| `[].visitor` | string | no | 匿名访客编号（每天更换） May be null. |

### Example response (200)

```json
[
  {
    "id": 1,
    "ts": 1,
    "question": "怎样配置自定义域名？",
    "answer": "string",
    "model": "deepseek-flash",
    "provider": "anthropic",
    "sources": [
      "/guides/deploy/custom-domains"
    ],
    "outcome": "answered",
    "rating": "up",
    "page": "/guides/deploy/platform",
    "country": "CN",
    "net": "203.0.113.*",
    "agent": "Chrome 158 · macOS",
    "visitor": "string"
  }
]
```
