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

# 列出内容来源

`GET /sites/{site}/sources`

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 |

## Example request

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

## Responses

### 200

内容来源，按创建时间倒序

Content type: `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `[].id` | string | no |  |
| `[].kind` | enum | no | Allowed: `document`, `website`. |
| `[].title` | string | no |  |
| `[].url` | string | no |  |
| `[].config` | object | no | 抓取设置，仅 `website` |
| `[].config.paths` | list of strings | no |  |
| `[].config.exclude` | list of strings | no |  |
| `[].config.maxPages` | integer | no |  |
| `[].config.refresh` | enum | no | Allowed: `never`, `daily`, `weekly`, `monthly`. |
| `[].status` | enum | no | Allowed: `ready`, `queued`, `running`, `failed`. |
| `[].error` | string | no | 上次抓取失败的原因 |
| `[].pageCount` | integer | no |  |
| `[].createdAt` | integer | no |  |
| `[].refreshedAt` | integer | no | 内容最近更新的时间 May be null. |
| `[].nextAt` | integer | no | 下一次抓取的时间 May be null. |
| `[].pages` | list of objects | no | 页面，最多 500 个；列表中不返回 |
| `[].pages[].url` | string | no |  |
| `[].pages[].title` | string | no |  |
| `[].pages[].size` | integer | no | 正文的字符数 |
| `[].document` | string | no | Markdown 正文，仅 `document`；列表中不返回 |

### Example response (200)

```json
[
  {
    "id": "src_01jd8x2k7q",
    "kind": "document",
    "title": "help.acme.com",
    "url": "https://help.acme.com/",
    "config": {
      "paths": [
        "string"
      ],
      "exclude": [
        "string"
      ],
      "maxPages": 1,
      "refresh": "never"
    },
    "status": "ready",
    "error": "string",
    "pageCount": 86,
    "createdAt": 1,
    "refreshedAt": 1,
    "nextAt": 1,
    "pages": [
      {
        "url": "string",
        "title": "string",
        "size": 1
      }
    ],
    "document": "string"
  }
]
```
