Skip to content

Search (Management API)

GET
https://mapi.storyblok.com/v1/spaces/:space_id/strata/search

Returns a ranked list of stories whose content matches the search term by meaning. Instead of matching exact keywords, Strata compares the meaning of the search term with the meaning of the indexed content.

For public, high-volume search, use the Content Delivery API search endpoint. This Management API endpoint is best for private queries scoped to the user’s permissions, and it’s rate-limited.

  • :space_id required number

    Numeric ID of a space.

  • q string

    The search term.

  • version string

    The content version to search: draft or published. Default is published.

  • limit number

    Maximum number of results to return, between 1 and 1000. Default is 25. When starts_with or content_type is set, the maximum is 50.

  • starts_with string

    Filter by the story’s full_slug to return stories starting with the given value, for example docs/. Matches only the default-language slug, so language prefixes (for example, de/) and translated slugs return no results.

  • content_type string

    Retrieve stories of a specific content type block. For example, content_type=page.

  • results object[]

    A ranked array of matches, best match first. A story can appear more than once if it has multiple matching passages.

    Show child properties
    • excerpt string

      The passage of story content that matches the search term.

    • score number

      How closely the result matches the search term. A higher value means a closer match.

    • story object

      The story that contains the matching passage.

      Show child properties
      • id number

        Numeric ID of the story.

      • slug string

        Full slug of the story.

      • name string

        Name of the story.

Example Response
{
"results": [
{
"excerpt": "You can return any item within 30 days of delivery for a full refund",
"score": 0.89,
"story": {
"id": 1001,
"slug": "help/returns",
"name": "How to return an order"
}
},
{
"excerpt": "Refunds reach your original payment method within 5 business days",
"score": 0.81,
"story": {
"id": 1044,
"slug": "help/faq",
"name": "FAQ"
}
}
]
}
curl "https://mapi.storyblok.com/v1/spaces/288868932106293/strata/search\
?q=how+do+I+return+an+order\
&version=published\
&limit=5" \
-H "Authorization: YOUR_PERSONAL_ACCESS_TOKEN"

Was this page helpful?

What went wrong?

This site uses reCAPTCHA and Google's Privacy Policy (opens in a new window).Terms of Service (opens in a new window) apply.