Schema
The schema defines all the fields that exist within a search result record. Any response from these endpoints can be expected to contain the fields below unless the `_filter` query parameter is used or the schema field only appears in a specific context.
id
|
Unique identifier for the object.
JSON data type: integer or string Read only Context: |
title
|
The title for the object.
JSON data type: string Read only Context: |
url
|
URL to the object.
JSON data type: string, Read only Context: |
type
|
Object type.
JSON data type: string Read only Context: One of: |
subtype
|
Object subtype.
JSON data type: string Read only Context: One of: |
List Search Results
Query this endpoint to retrieve a collection of search results. The response you receive can be controlled and filtered using the URL query parameters below.
Definition
GET /wp/v2/search
Example Request
$ curl https://example.com/wp-json/wp/v2/search
Arguments
context
|
Scope under which the request is made; determines fields present in response.
Default: One of: |
page
|
Current page of the collection.
Default: |
per_page
|
Maximum number of items to be returned in result set.
Default: |
search
|
Limit results to those matching a string. |
type
|
Limit results to items of an object type.
Default: One of: |
subtype
|
Limit results to items of one or more object subtypes.
Default: |
exclude
|
Ensure result set excludes specific IDs. |
include
|
Limit result set to specific IDs. |