WP REST API not retrieving all categories

I am developing a project that is using the WP REST API. After some tests, I realized that it’s not retrieving all the categories based on what I am trying to GET. In precise, there are supposed to be 21 results but only 10 come up. Is there some kind of restriction that I am not seeing? Any settings that I’ll have to change.

Here is what I am trying:


WordPress Development Asked by abhivemp on November 11, 2021

1 Answers

One Answer

As documented, the default number if results returned "per page" is 10. So you need to set per_page to however many you want to retrieve:

Answered by Jacob Peattie on November 11, 2021

Add your own answers!

Related Questions

How can I combine one field using wpdb and group by?

1  Asked on August 10, 2020 by user81828


Custom posts password protect

1  Asked on August 6, 2020 by jason


REST API: Display Category names in JSON?

1  Asked on August 3, 2020 by steve


Gutenberg withInstanceId. When to use it?

2  Asked on July 25, 2020 by at-least-three-characters


Ask a Question

Get help from others!

© 2021 All rights reserved.