---
title: "Search"
method: GET
path: "/v2/cdn/strata/search"
tags: ["Strata"]
---

# Search

`GET /v2/cdn/strata/search`

## Request

- Base URL: `https://api.storyblok.com`
- URL: `https://api.storyblok.com/v2/cdn/strata/search`
- Auth: API key in query parameter `token`
- TypeScript: <https://skmtc.dev/storyblok/apis/storyblok-content-delivery-api/docs/v2/cdn/strata/search/get.ts> (a function with typed inputs; its response is checked against the schema)

Retrieve stories by meaning through a natural-language query.

## Query parameters

- `q` string
- `version` 'draft' | 'published'
- `limit` integer
- `starts_with` string
- `content_type` string
- `token` string, required

## Response `200`

Search results

- object
  - `results` StrataSearchHit[], required: An array of search result objects, ranked by `score` with the best match first. A story can appear more than once if it has multiple matching passages.
    - `excerpt` string, required: The passage of story content that matches the search term.
    - `score` number, float, required: How closely the result matches the search term. A higher value means a closer match.
    - `story` object, required: The story that contains the matching passage.
      - `id` integer, required: Numeric ID of the story.
      - `slug` string, required: Full slug of the story.
      - `name` string, required: Name of the story.

## Other responses

- `400`: Invalid version, a q that is not a string or is too long, a filter that is not a string, or a limit that is not a whole number in range
- `401`: Unauthorized. The token is invalid, or a public token requested draft content
- `403`: Forbidden. Strata is unavailable for the organization or disabled for the space, a release access token cannot search, or the request type is not allowed for the space (for example a GraphQL request without GraphQL access)
- `404`: Not found. StrataErrorResponse: the token's space no longer exists. LegacyArrayErrorResponse: the path is unknown or the HTTP method is not supported
- `422`: The space is blocked
- `429`: Too many requests. The search backend is throttled, the per-second request limit of the space is reached, or the space is over its monthly API limit (`api_limit_exceeded`). Only the search backend throttle sends a Retry-After header
- `503`: Search backend temporarily unavailable

---

[API](https://skmtc.dev/storyblok/apis/storyblok-content-delivery-api.md) - [All operations](https://skmtc.dev/storyblok/apis/storyblok-content-delivery-api/llms.txt) - [OpenAPI document](https://skmtc.dev/storyblok/apis/storyblok-content-delivery-api/revisions/6981ed842964?raw)
