API リファレンス
Search
Content Delivery API: GET /search
Parameters
qstring · queryrequiredkindstring · querylimitinteger · queryMaximum number of results, 1-20. Defaults to 20.
cursorstring · queryOpaque cursor from the previous page's nextCursor. Omit for the first page.
localestring · queryLocale to search. One of the site's locales from /site (a code such as `en-US` or the URL prefix such as `en`); omit it for the primary locale. Other values, including locales that are still translating, return 400 UNSUPPORTED_LOCALE. Titles, excerpts, snippets and `url` (with the locale's URL prefix) come from that locale's published translations; untranslated text stays in the primary locale. `resolvedLocale` in the response is the locale actually searched. A cursor only works with the same locale.
totalboolean · querytrue adds total (the number of matching results across all pages) to the response, for a results count such as "12 results". It is counted in the same query as the results, so it adds no extra request.
Response 200
dataobject[]requiredhasMorebooleanrequiredTrue when another page exists; pass nextCursor to fetch it.
nextCursorstring | nullrequiredCursor for the next page, or null on the last page.
qstringrequiredtokensstring[]requiredresolvedLocalestringLocale actually searched: the requested locale when it is one of the site's published locales, otherwise the primary locale.
totalintegerNumber of matching results across all pages. Present only when total=true.
Errors
QUERY_REQUIRED400QUERY_TOO_SHORT400QUERY_TOO_LONG400INVALID_KIND400INVALID_LIMIT400INVALID_CURSOR400SEARCH_BUSY429UNSUPPORTED_LOCALE400
curl -X GET "https://{site}/api/v1/search"