Home > AI > Backend > Wordpress > REST >

WordPress REST APIs

namedescription
curl -X GET http://yoursite.com/wp-json/wp/v2/postsget all posts
https://9scoretrain.com/wp-json/wp/v2/posts?slug=ra-0001get the post by the slug
https://9scoretrain.com/wp-json/wp/v2/categoriesget the category list
https://9scoretrain.com/wp-json/wp/v2/posts?filter[category]=asq-answer-short-questionget posts by the category
https://9scoretrain.com/wp-json/wp/v2/posts?categories=38&per_page=10&page=1&orderby=slug&order=ascget posts by the category, you can only use category id

Leave a Reply