I just figured it out, just in case it might be helpful for anyone in future:
There is an option available to exclude a particular category – categories_exclude
So, the new rest API would be:
https://www.example.com/?rest_route=/wp/v2/posts&per_page=100&categories_exclude=10
Related Posts:
- WordPress REST API not returning all posts
- How to create REST Based JSON API(how to modify the code below)?
- How to add category to: ‘wp-admin/post-new.php’?
- Fetch All Posts (Including Those Using a Custom Post Type) With WordPress API
- WP Rest API v2 filter and display latest post with specific tag
- Disable REST API for a user ROLE
- ping_status in JSON REST API
- Add ajax load more function using WP API
- How to create a post using REST API with sending data as a JSON body?
- How can I get the media inside a post?
- How to disable WordPress blog folder
- Creating a WordPress Post via REST API – HTML or Markdown?
- How to get post with associated categories and tags names instead of ids with rest api?
- Optimal WP Web App Backend for mobile app development
- Pull in posts using post meta for REST API
- REST API Working for GET but not for POST?
- Loading posts outside wordpress
- How to get a list of all posts and their categories?
- Server 500 error when updating post using block editor
- WordPress Rest API Post request from AMP
- Hide categories from showing above a Post
- Add category attribute to custom recent post shortcode
- Newly created category does not show category
- Show category post with excerpt text
- Post of a specific category – not to be seen in paging previous/next post
- How to show main category related to that post
- Same sidebar in all posts as in the category
- Display selected category on post page
- How to show different categories in different pages?
- How do I list categories and the common categories for posts beneath those categories?
- How to pass multiple checkbox values to wordpress query?
- Latest Posts not in the right order
- Assign specific ads to specific categories/posts
- How to organise post by category and date
- Show post if in category
- How to display custom content in post with category XXX
- Order posts by separate menu order for different sub-categories
- Retrieve latest post by multiple categories with ID
- Displaying categories items among posts
- find posts with exactly 3/4 categories
- How to set a link to custom archieve page
- how to show posts on different pages if number of post per page is one
- Sort post by category using HTML Select tag
- Make assigning post to a specific category equivalent to assigning it to all categories
- Displaying different posts Via wp_list_categories()
- Show a Category Specific Info Box
- How to use in_category?
- About number of posts in selected category
- How to Include a common category in a custom Category Search
- How to display only one post on first category page and rest on next pages?
- Use radio buttons & checkboxes for post categories
- Is possible to create a custom link that creates a post that’s already categorized?
- Delete old post with new post
- Displaying only posts from a certain category on my custom page template
- I need to create a page or post hierarchy
- Separate categories parents, childs and grandchilds in dropdowns
- WP_Query: Fetch posts that are in (category1 and not in category2), OR posts that are not in cagegory1
- Is it possible to have different header style blog titles in different categories?
- Older entries link within a category page
- Display the first post’s comments of category in comments.php template
- How to filter categories of a post
- Category pages vs single post pages
- Add default content to post (for specific category)
- Adding a time stamp on post view
- How to display subcategory articles in the category view?
- how to style an individual page in a category [duplicate]
- List posts that are in the same category as the current post title
- each user having category with their name and can add sub categories post in that category
- Display ONLY Latest Post From Several Categories
- Can’t assign another category other than Uncategorized int he following front end post submission form?
- How do we display a certain category type on a page while hiding all others?
- Category page shows “No Posts” but I do have two assigned
- Exclude sub sub categories from displaying in the archive page
- Exclude a ‘portfolio’ custom category?
- Viewing category won’t show up Custom post type posts
- Multiple blog “feeds” in a single blog each with distinctly styled post pages
- How to get pagination working with “Pending” Posts
- Show all posts in category
- exclude certain categories from posts
- ‘get_previous_post’ in same category returning (!empty) when no previous post in category exists
- Need All the posts with id, title and date [closed]
- List posts related to category on a div [closed]
- Taxonomy Category category.php not working
- how to show all post with its contents
- Change from all posts to specific categories post on main page?
- wordpress show category link instead of post link [closed]
- CSS – Change height of Storefront / WooCommerce product categories, but not products
- Post’s arent displaying
- Show with echo if a post has two or more categories
- excerpt in template for specific page
- Show Title/Date/Excerpt of first post & only Title for rest in Query [duplicate]
- Only show posts belonging to multiple cateogries at same time
- Wrap posts from a category in HTML
- How to display my categories in a list (to a post, not the sidebar)?
- How can I get on the same row two post of different categories?
- Polylang – display one post into 3 categories with different lang [closed]
- How to make category for word post_content
- How to sort the post to a specific category
- Listing category and its posts one by one
- Print out one of 2 post category [closed]