You can actually find extensive documentation on wordpress.org.
But let’s have a look at this particular example:
https://demo.wp-api.org/wp-json/wp/v2/posts?per_page=5&tags=3
The 5
in there is the number of posts you want returned.
The 3
is the id of the tag you want to limit the posts too.
If you want to limit to a category use categories
instead. But you’d have figured that out yourself after looking at the documentation, right? 😉
Related Posts:
- Disable REST API for a user ROLE
- ping_status in JSON REST API
- WordPress REST API not returning all posts
- How to create a post using REST API with sending data as a JSON body?
- Getting featured image with PHP and not javascript from wordpress api _embed [closed]
- Creating a WordPress Post via REST API – HTML or Markdown?
- Optimal WP Web App Backend for mobile app development
- exclude particular category in api
- Loading posts outside wordpress
- How to create REST Based JSON API(how to modify the code below)?
- Best Way to detect unique posts in wp rest api
- How to add category to: ‘wp-admin/post-new.php’?
- WP REST API only returning partial list of users
- Fetch All Posts (Including Those Using a Custom Post Type) With WordPress API
- WordPress Rest API: How do we validate with our custom API key?
- How to loop through JSON data in wordpress WP REST API
- WP REST API, query total posts in a category
- JSON not valid after json_encode posts
- Get post from custom REST endpoint in Gutenberg
- WP REST API – Retrieve content from page
- WordPress Rest API – Get all posts based on post_meta on custom endpoint
- WordPress REST API “rest_authentication_errors” doesn’t work external queries?
- WordPress blog posts api – get posts by author
- WP rest api returns 404 only when author param is used
- Passing Meta array in wp-rest api
- Create post using JSON api plugin
- Inserting custom post meta value using WP-REST API
- Exclude posts w/ specific post_meta on Rest API endpoint
- Hook before posting via JSON REST API
- Add ajax load more function using WP API
- Transfer WordPress post to RoR site: is the REST Api the only and/or best solution?
- JSON – Permission Error?
- Exclude post_meta from Rest API Endpoint
- WP Remote Request not returning all of content via request
- Get more than one author’s posts with REST API
- How can I get the media inside a post?
- WordPress Rest API Create Post
- How to disable WordPress blog folder
- Call Web Services on post first publish
- search blog posts by author first name and or last name
- How to get post with associated categories and tags names instead of ids with rest api?
- What date to use as a post date? date_gmt or modified_date_gmt
- Custom wp-query in wordpress rest api
- Filter out posts based on a certain post_meta on the WordPress REST API
- Delete Post but retain image of post [WP REST API]
- Pull in posts using post meta for REST API
- Rest API Paginate until all posts are imported
- Format array of objects to json for wp-json
- Add a field in my rest api
- How do I assign an attachment to a post using only the REST API?
- WordPress rest API get Posts parent by post ID
- Updating post status via rest api
- Weird problem occurs while using WordPress REST API to create new post
- WordPress API “code”:”rest_no_route” with Custom Route
- How to set the post permalink using the WordPress REST API?
- How to prevent post update using transition_post_status
- Create Posts from API response without duplicates
- REST API Working for GET but not for POST?
- Adding a time stamp on post view
- WP Rest API feature image breaking react component
- Changes done in admin panel are taking time to reflect in the REST api responses
- How to automatically generate a unique random slug
- How does filter the_posts work?
- Writing a view count with w3 total cache
- Single.php Active Category Class
- How to create multiple version of single post
- Is it possible to have two different previews of a post (ie. two templates for one post)?
- how to know if the post has pagination () or not
- WP Query related posts by current page Tag ID
- How can I cache WordPress Rest API Response
- How to restore permanently trash page? [closed]
- The short content by characters [duplicate]
- Most recent post from another database
- post_content sanitization / transformation process
- wp_insert_post – duration
- Recent Post Added To Menu Shows Ghost Post With No Title
- How can I hide tags on a child-category page, if that tag has not been used?
- One post on my website is going to a 404 page
- “about us”, ” contact” sections should be article(post) or page in the simple small Business website?
- Page template is accessing the incorrect posts?
- Is it possible to use WP_Query to only pull posts with attachments?
- disable Tab post on nav-menus page (Admin)
- Second get_permalink inside loop points to wrong URL
- Best Way to Add UnEditable HTML to Posts
- Use Click Image to Play Youtube Video in a WordPress Loop
- Stop post submission without losing data?
- How to Rearrange WordPress Tags list on frontend using Shortcode with specific order?
- “read more” redirects to the wrong page
- Settings missing from the add new post page
- Posting or Updating Article Fails on WordPress [closed]
- New blog post published notification – Buddypress
- Custom post styling per category?
- Output wp_link_pages as raw url
- Add custom class to existing menu items from custom meta
- Post Publish Metaxbox on a Front End Page
- How do I display a full post, not just an excerpt?
- Simple method to generate posts from files
- Published posts counter [closed]
- Moving featured image to top of new post editor screen
- Display posts with id equal to relationship value