Search for pages using a text query. Results are sorted by relevance and can be filtered by page type.
levels parameter provided. Pages are returned sorted by relevancy to the search query.
Page Type Filtering: You can optionally limit your search to a specific page type, or search only Single Pages using * as the page type parameter.
Empty Results: If no results are found, the API returns an empty array: "data": []
See also: Architecture & Performance for guidance on levels, pagination, and performance best practices.Set the Authorization header to Token your_read_api_token.
Example: Authorization: Token abc123def456
Note: The header value includes the Token prefix.
You can access your API token from your settings page.
The search query string to match against page content.
Only the direct content of pages will be searched. References are excluded from search but will still appear in results.
Maximum Length: 100 characters
100The slug of the type of pages you want to limit your search to.
* if you want to search only Single Pages (without a Page Type)Maximum Length: 100 characters
100Set to the api slug of your configured locale (e.g. en or fr). When omitted, this query parameter will default to your organization's default locale.
10"en"
Depth of relationship serialization.
Controls how many levels of referenced content to include:
Important: Higher levels increase response size. Maximum 10MB per response.
Valid range: 1-5 (inclusive). Values outside this range will be automatically capped.
1 <= x <= 5Page number for page-based pagination.
Mutually exclusive with limit/offset parameters.
x >= 1Number of items per page for page-based pagination.
Mutually exclusive with limit/offset parameters.
1 <= x <= 100Your ButterCMS read API token
Success
Returns a hash with a data property that contains an array of pages matching the search query, and a meta property that contains pagination information.
Search Results: Pages are returned sorted by relevancy. If no results are found, returns an empty array: "data": []
Content Searched: Only direct page content is searched. References are excluded from search but included in response based on levels parameter.