`/wp/v2/search`

Namespace: wp/v2
Route: /wp/v2/search

Routes

  • Collection: /wp/v2/search

HTTP Methods

Collection methods: GET

Request Parameters

Collection GET

ParameterTypeRequiredDefaultDescription
contextstringfalseviewScope under which the request is made; determines fields present in response.
pageintegerfalse1Current page of the collection.
per_pageintegerfalse10Maximum number of items to be returned in result set.
searchstringfalseLimit results to those matching a string.
typestringfalsepostLimit results to items of an object type.
subtypearrayfalseanyLimit results to items of one or more object subtypes.
excludearrayfalse[]Ensure result set excludes specific IDs.
includearrayfalse[]Limit result set to specific IDs.

Response Schema (Item)

FieldTypeDescription
idinteger, stringUnique identifier for the object. (read-only)
titlestringThe title for the object. (read-only)
urlstringURL to the object. (read-only)
typestringObject type. (read-only)
subtypestringObject subtype. (read-only)

Authentication

  • Read: public.

Example Requests

bash
curl -X GET "https://wordpress.org/news/wp-json/wp/v2/search"

Example Response (trimmed)

json
{
  "id": 1,
  "_links": {
    "self": [{ "href": "/wp/v2/search/1" }]
  }
}