I'd like to be able to return the most recent Wordpress post from my blog using the WP-API (Version 2).
I can't work out what to put after:
/wp-json/wp/v2/
Any help is much appreciated. - Thanks.
Try this - /wp-json/wp/v2/posts?filter[posts_per_page]=1
According to the docs you specify the number of records to return in one request with the parameter per_page so /wp/v2/posts?per_page=1 will return only the first post.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With