How to get all categories of a wordpress site with rest api?

I’m trying to get all categories of my wordpress site with rest api :

        axios.get('https://../wp-json/wp/v2/categories').then((res) => {
            console.log(res.data);
        });

But it only returns me the latest 10 by default .

Query

/wp-json/wp/v2/categories

How can I get all categories of a wordpress site with rest api?

47 thoughts on “How to get all categories of a wordpress site with rest api?”

Leave a Comment