REST API
Using the Ajax Search Pro Rest API
To use the Rest API, it has to be enabled first under the Compatibility options menu.

All endpoints can be accessed under the
ajax-search-pro/v0
namespace at this moment. Both GET and POST methods are supported.wp-json/ajax-search-pro/v0/search
- s (string)(Required) - search phrase
- id (int)(Optional) - Search instance
curl --location --request GET 'https://test.local/wp-json/ajax-search-pro/v0/search?s=test&id=1'
wp-json/ajax-search-pro/v0/woo_search
The main difference between this and the generic search endpoint is, that this will try to find the first search instance, which is configured for WooCommerce search (when the ID query parameter is not defined)
- s (string)(Required) - search phrase
- id (int)(Optional) - Search instance. When not defined, the plugin will try to find the first search instance with the "product" custom post type selected. If not found, or no instances exist, then will trigger a search for the "product" custom post type with the default configuration.
curl --location --request GET 'https://test.local/wp-json/ajax-search-pro/v0/woo_search?s=test&id=1'
Last modified 11mo ago