To answer the question directly – The REST API do not initialize a main query, therefor there should not be any for requests coming that way.
What you should do is to create your own end point and server what ever custom data you need on it. Modifying the REST API, while possible, violates the whole idea of having a consistent and documented API in the first place.
Related Posts:
- Tell wordpress to show a single page instead of an archive page
- How to use a custom post type archive as front page?
- Custom Post Type Archives by Year & Month?
- Get custom post type slug for an archive page
- How to set a custom post type to have viewable future posts
- Meta_Query as a way how to setup CPT permalinks – is it a good thing?
- Proper way of making custom post type landing page or archive page
- Custom Post Type Archives by Date with Custom Permalink
- Change title in head on Archive page
- Custom Post Type Archives with 0 Posts Redirects as 404
- Page is defaulting to archive page and not designated template
- Better to use a post type archive, page template, or shortcode for generating a highly configurable CPT archive?
- How to get_queried_object on multiple objects?
- paginate function in archive for custom-post-type
- Custom post type archive sorted and grouped by date in post meta field
- How to create archive page for taxonomy terms within custom post type
- WordPress custom post type archive with description
- Custom-post-type-archive: posts sorted/filtered by year?
- How to list custom post types?
- Custom post type archive page pagination
- Editable content on a Custom Archive page
- Second Custom Post Type Archive
- How to use WP_Query in a CPT achive page?
- WP_Query | ‘post_type’ doesn’t work
- CPT Archive with core Category
- Changing number of posts per page on CPT-archive.php, have tried 20-30 code chunks so far
- get the custom post type title/name
- URL of a custom post type’s post format archive?
- Filtering WP_Query
- Create template for taxonomy results limited by Custom Post Type
- Custom post type archive page blank
- How to display custom post in archive section of the wordpress page?
- What’s the name of the custom post type yearly archive template?
- How can I use archive-{post_type}.php theme template?
- Return the name of the post type
- Use the custom post type archive for taxonomies?
- Custom Post Type Archive Pagination
- Query Posts that have Custom Taxonomy
- Archive page for custom post type and custom taxonomy
- Make Next and Previous on single-$posttype.php use the same order as archive-$posttype.php
- How to have multiple archive pages?
- Create a Custom Path to Archive
- Custom Post Type Date Based Archive URL rewrite [duplicate]
- WordPress sitemap with Custom Post Types
- Is possible register two archive pages for single custom post type?
- WP_Query: how to search tags in addition to a custom post type?
- How can I sort the results of a REST API response by the title of a connected custom post type?
- Custom Post type page content (archive page)
- Group custom post type posts by month
- Creating an archive page or simple template to list all values of a custom field of specific post type listing
- Do not show child pages within a file page
- Custom Post Type archive page listing a 404 or single post
- One of my headings is mysteriously coming up as a link in my CPT Archive
- Only show categories that have posts within custom post type
- Want to display my custom date archive to date.php but dont know how
- Custom Post Type shows pagination (w/404) or posts_per_page query, but not both
- why custom post archive gives always no more than 10 posts despite of paging settings?
- Rewriting archive page slug to be different than custom post type slug
- Site loads very slow for archive custom post type page
- Stop Custom post type from being searched via URL
- Custom post type category page not working
- paging is not working properly on news archives page [duplicate]
- How can I set up the URL for a category archive for a custom post type?
- Taxonomy Query of Custom Post Displays Archive Instead of Posts
- Pagination not working for archive
- how to pass args for archive.php query?
- How to have a dynamic slug and rendering the archive-{post_type}.php?
- Remove plugin’s custom post type archive page and single pages [closed]
- Store custom post type with JSON content
- querying to custom field over ACF REST API
- WP Query + custom fields: How to query event posts from the current date backwards 6 months and organize it month by month?
- WordPress CPT archive page display sticky post first and then display the rest of the posts in same Query
- Combining queries with different arguments per post type
- Archive page with multiple taxonomies rewrite
- WP Rest API Querying Custom Posts by ACF fields
- New WP_query in template not working with CPT+category on some pages
- Displaying a specific post in a wp query by post id
- How to call a custom post type with WP_query
- How can I made custom taxonomies relationship?
- Pagination issue on category.php using custom post type query
- How to get all tags of a custom post type by id
- Limiting posts_join, where, etc to a specific WP_Query object?
- List latest post out of 2 custom post types
- How to properly use Categories with Custom Post Types
- Displaying Portfolio Filter by Category Order (alphabetically)
- Custom Post Type Query W/Category Dropdown
- Pin posts to top of custom loop
- Custom Taxonomy – fields
- CPT Loop, include taxonomies and disclude others?
- Custom Post Type Query by user id
- CPT post doesnt shows tags and category on backend admin page
- Adding a nav menu for a custom post type
- How to use costum database table for custom post type
- date_query won’t accept day parameter, but will accept month and year for a custom post
- Issue with permalinks for custom post type
- Paged within a custom content type template [duplicate]
- is_singular won’t call my functions?
- How to exclude certain portfolios from a loop
- Display ACF object field data using Elementor Custom Query
- Sort ACF by custom taxonomy