Pagination


目录

WordPress sites can have a lot of content—far more than you'd want to pull down in a single request. The API endpoints default to providing a limited number of items per request, the same way that a WordPress site will default to 10 posts per page in archive views.

Pagination Parameters

Any API response which contains multiple resources supports several common query parameters to handle paging through the response data:

[tip] Large queries can hurt site performance, so per_page is capped at 100 records. If you wish to retrieve more than 100 records, for example to build a client-side list of all available categories, you may make multiple API requests and combine the results within your application. [/tip]

To determine how many pages of data are available, the API returns two header fields with every paginated response:

By inspecting these header fields you can determine how much more data is available within the API.

Ordering Results

In addition to the pagination query parameters detailed above, several other parameters control the order of the returned results:


版本号 #2
由 壳壳虫 创建于 2025-06-04 15:42:29 UTC
由 壳壳虫 更新于 2025-06-04 15:42:29 UTC