# 分頁

列表型端點採用 **offset / limit** 分頁。

## 查詢參數

| 參數       | 預設   | 上限     | 說明              |
| -------- | ---- | ------ | --------------- |
| `limit`  | `20` | `1000` | 本頁最多回傳幾筆        |
| `offset` | `0`  | —      | 從第幾筆開始（略過前 N 筆） |

```bash
curl "https://api.atlantis.example/v1/webhooks?limit=50&offset=100" \
  -H "X-API-Key: ak_live_YOUR_KEY"
```

{% hint style="warning" %}
`limit` 必須大於 0；超過上限 `1000` 會回 `400 bad_request`，而**不會**默默截斷——這是刻意設計，避免你誤以為已取得完整資料。
{% endhint %}

## 分頁中繼資訊

回應的 `meta.pagination` 會帶回本次的分頁狀態：

```json
{
  "data": [ /* ... */ ],
  "meta": {
    "pagination": { "limit": 50, "offset": 100, "total": 1342 }
  }
}
```

| 欄位       | 說明                         |
| -------- | -------------------------- |
| `limit`  | 本次採用的每頁筆數                  |
| `offset` | 本次的起始位移                    |
| `total`  | 符合條件的總筆數（部分端點可能無法提供，此時不出現） |

## 翻頁

要取得下一頁，將 `offset` 加上 `limit`：

```
第 1 頁：offset=0,   limit=50
第 2 頁：offset=50,  limit=50
第 3 頁：offset=100, limit=50
```

當回傳筆數少於 `limit`，即代表已到最後一頁。

## 下一步

{% content-ref url="/pages/qnj2vPgmFyRFTLqtmCVj" %}
[Webhook 訂閱](/documentation/cao-zuo-zhi-nan/webhooks.md)
{% endcontent-ref %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.blockchainsecurity.asia/documentation/he-xin-gai-nian/pagination.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
