Search code examples
wordpresswordpress-rest-api

wordpress rest api taxonomy return only 10


When I try to list terms from taxonomy with wp rest api i get only 10 items. eg. my-domain.io/wp-json/wp/v2/my_taxonomy/?

In php, with get_terms('my_taxonomy'), i get all terms from this taxonomy.

It seems that WP limits the result from the rest api.

Any help ?

Thanks


Solution

  • As you can see in the documentation you need to indicate the number of items to show (default is 10)

    /wp-json/wp/v2/my_taxonomy/?per_page=99