Content

Search page text for a word or phrase

Finds the pages whose text contains a literal word or phrase, without reading any bodies. It searches the draft. Regular expressions are not supported. The result is not paged: truncated says whether more pages matched than limit. Search needs the site's search and collections feature; a site without it answers 503 search_unavailable.

get/api/v1/sites/{slug}/search

Request

  • Base URL: https://api.dotsy.ai
  • URL: https://api.dotsy.ai/api/v1/sites/{slug}/search
  • Auth: one of:
    • HTTP bearer
    • HTTP bearer

Path parameters

slugstring required
Example:acme-studio

Site slug or site id (UUID). An old slug answers 301/308 and a site id 307 to the canonical slug path.

Query parameters

qstring required

The text to find (up to 256 characters).

limitinteger

Most matches to return, 1 to 200. Defaults to 50.

Response

The matching pages.

qstring required

The query, trimmed.

truncatedboolean required

True when more pages match than limit allowed. There is no cursor: narrow the query.

Example response

{
  "matches": [
    {
      "key": "about.html"
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.