1. Retrieve Multiple Stories

Retrieve Multiple Stories

Returns an array of story objects without content. Can be filtered with the parameters below and is paged.

/spaces/:space_id/stories/

With the query parameter of with_summary=1, it allows you to get the root-level or same-level attributes from multiple stories. If there is no flag set, content_summary objects on stories will be empty. It can be used to access some field-types inside the content that are served with the multiple stories.

Path Parameters

  • :space_id

    required number

    Numeric id of a space

Query Parameters

  • page

    number

    Current page of stories

  • contain_component

    string

    Filters by component in all levels of the content. Allows comma separated value for multiple components

  • text_search

    string

    Filter by a term using full text search

  • sort_by

    string

    Sort entries by specific attribute and order with content.YOUR_FIELD:asc and content.YOUR_FIELD:desc. To sort integers append :int. To sort floats append :float. Possible values are all root attributes of the entry (position and parent_position are special invisible attributes) and all fields of your content type inside content with a dot as seperator. Example: 'position:asc', 'parent_position:asc', 'content.your_custom_field:asc', 'content.your_number_field:asc:int', 'created_at:desc'.

  • pinned

    boolean

    Filter by pinned stories if '1'

  • excluding_ids

    string

    Exclude specific stories by providing their IDs as a comma-separated string. Example:
    excluding_ids=335015953,335015954

  • by_ids

    string

    Filter by ids (comma separated)

  • by_uuids

    string

    Retrieve specific stories by providing their UUIDs as a comma-separated string. Example:
    by_uuids=a78b2116-c26d-4d23-9cbe-fec477847b0e,9683820e-fc17-429e-ba23-eb41f26c0776

  • with_tag

    string

    Filter by specific tag(s). Multiple tags can be provided as a comma-separated string (treated like an OR operator). Examples:
    with_tag=featured
    with_tag=featured,editors_choice

  • folder_only

    boolean

    Filter by folders only

  • story_only

    boolean

    Filter by stories only

  • with_parent

    number

    Filter by parent id

  • full_slug

    string

    Filter by full_slug (The full slug of the story, combining the parent folder(s) and the designated story slug)

  • starts_with

    string

    Filter stories starting with a specific slug

  • in_trash

    boolean

    Filter by items in the trash folder

  • search

    string

    Filter by search term

  • filter_query

    string or object

    Filter by specific attribute(s) of your content type. See Content Delivery API Documentation.

    • is

      string

      Matches a value type (empty, not_empty, empty_array, not_empty_array, true, false, null, not_null)

    • in

      string

      Matches all with the exact specified value

    • not_in

      string

      Matches all without the exact specified value

    • like

      string

      Matches all with the specified value (wildcard allowed)

    • not_like

      string

      Matches all without the specified value (wildcard allowed)

    • any_in_array

      string

      Matches if any of the specified values is contained in the field value (array)

    • all_in_array

      string

      Matches if all specified values are contained in the field value (array)

    • gt_date

      string

      Greater than date (Format: YYYY-mm-dd HH:MM)

    • lt_date

      string

      Lower than date (Format: (Format: YYYY-mm-dd HH:MM))

    • gt_int

      string

      Greater than integer value

    • lt_int

      string

      Lower than integer value

    • gt_float

      string

      Greater than float value

    • lt_float

      string

      Lower than float value

  • in_release

    number

    Filter items by the release id

  • is_published

    boolean

    true for entries that are currently published; false for those that are currently not published or unpublished

  • by_slugs

    string

    Retrieve stories by comma-separated full_slug. It is possible to specify wildcards by using *. Examples:
    by_slugs=posts/my-third-post,posts/my-second-post
    by_slugs=posts/*

  • mine

    boolean

    Filters all the stories assigned to the current user whose token is being used

  • excluding_slugs

    string

    Exclude stories by specifying comma-separated values of full_slug. It is possible to specify wildcards by using *. Examples:
    excluding_slugs=posts/my-third-post,posts/my-second-post
    excluding_slugs=posts*

  • in_workflow_stages

    number

    Retrieve stories that are in a particular workflow stage by providing a comma-separated list of workflow stage IDs. Workflow stage IDs can be retrieved via the Management API. Example:
    in_workflow_stages=325604,325605

  • by_uuids_ordered

    string

    Retrieve specific stories by providing their UUIDs as a comma-separated string. The order of the stories in the response matches the order in which the UUIDs are listed. Example:
    by_uuids_ordered=a78b2116-c26d-4d23-9cbe-fec477847b0e,9683820e-fc17-429e-ba23-eb41f26c0776

  • with_slug

    string

    Filter by exact slug

  • with_summary

    number

    If added, returns content_summary object with relevant information. Default: 1

  • scheduled_at_gt

    string

    Filter stories that are scheduled after the provided date (Format: yyyy-MM-dd'T'HH:mm:ssZ )

  • scheduled_at_lt

    string

    Filter stories that are scheduled before the provided date (Format: yyyy-MM-dd'T'HH:mm:ssZ )

  • favourite

    boolean

    Filter by your favourites.

  • reference_search

    string

    Filter by references. Can be used for texts (partial search supported) and other references like assets. Example - stories with specific asset. For stories with a specific asset, complete URL of an asset is recommended for specific results. Names are also valid but will include the results found with content search as well.

Response Properties

  • stories

    The Story Object

    An array of story objects

    • id

      number

      Numeric id of the story

    • name

      string

      The complete name provided for the story

    • parent_id

      number

      ID of the parent folder

    • group_id

      string

      Group ID (UUID string), shared between stories defined as alternates

    • alternates

      object[]

      An array containing objects that provide basic data of the stories defined as alternates of the current story

      • id

        number

        The numeric ID

      • name

        string

        The complete name provided for the story

      • slug

        string

        The slug specific for the story

      • published

        boolean

        true if a story has been published at least once (even if it is currently in draft)

      • full_slug

        string

        The full slug of the story, combining the parent folder(s) and the designated story slug

      • is_folder

        boolean

        true if the instance constitutes a folder

    • created_at

      string

      Creation date (Format: yyyy-MM-dd'T'HH:mm:ssZ)

    • deleted_at

      string

      Deleted date (Format: YYYY-mm-dd HH:MM)

    • sort_by_date

      string

      Date defined in the story's entry configuration (Format: YYYY-mm-dd)

    • tag_list

      string[]

      Array of tag names

    • updated_at

      string

      Latest update date (Format: yyyy-MM-dd'T'HH:mm:ssZ)

    • published_at

      string

      Latest publishing date (Format: yyyy-MM-dd'T'HH:mm:ssZ)

    • uuid

      string

      Generated UUID string

    • is_folder

      boolean

      true if the instance constitutes a folder

    • content

      object

      An object containing the field data associated with the specific story type's specific content structure. Also includes a component property with the story type's technical name.

    • published

      boolean

      true if a story has been published at least once (even if it is currently in draft)

    • slug

      string

      The slug specific for the story

    • path

      string

      Value of the real path defined in the story's entry configuration (usually, this value is only required for Storyblok's Visual Editor)

    • full_slug

      string

      The full slug of the story, combining the parent folder(s) and the designated story slug

    • default_root

      string

      Component name which will be used as default content type for this folders entries

    • disable_fe_editor

      boolean

      Is side by side editor disabled for all entries in folder

    • parent

      object

      Essential parent information as object (resolved from parent_id)

    • is_startpage

      boolean

      true if the story is defined as root for the folder

    • unpublished_changes

      boolean

      Story has unpublished changes; saved but not published

    • meta_data

      object

      Object to store non-editable data that is exclusively maintained with the Management API

    • imported_at

      string

      Latest import date (Format: YYYY-mm-dd HH:MM)

    • preview_token

      object

      Preview token

      • token

        string

        The token passed to the editor as preview parameter to allow edit mode verification

      • timestamp

        string

        Timestamp passed to the editor as preview parameter to allow edit mode verification

    • pinned

      boolean

      To pin the story in the toolbar

    • breadcrumbs

      object[]

      Array of resolved subset of link objects (one per path segment / parent)

      • id

        number

        Story ID

      • name

        string

        The complete name provided for the story

      • parent_id

        number

        ID of the parent folder

      • disable_fe_editor

        boolean

        Is side by side editor disabled for all entries in folder

      • path

        string

        Value of the real path defined in the story's entry configuration (usually, this value is only required for Storyblok's Visual Editor)

      • slug

        string

        The slug specific for the story

      • translated_slugs

        object[]

        Array of translated slug objects (if the app Translatable Slugs is installed)

    • first_published_at

      string

      First publishing date (Format: yyyy-MM-dd'T'HH:mm:ssZ)

    • last_author

      object

      Last author

      • id

        number

        Last author user object numeric id

      • userid

        string

        Last author userid/username

      • friendly_name

        string

        Friendly name of last author

    • last_author_id

      number

      Id of the last Author

    • translated_slugs

      object[]

      Array of translated slug objects (if the app Translatable Slugs is installed)

      • slug

        string

        The slug specific for the story

      • name

        string

        The complete name provided for the story

      • lang

        string

        Language code of the current language (can be requested with the language API parameter)

      • published

        boolean

        true if a story has been published at least once (even if it is currently in draft)

    • localized_paths

      object[]

      An array of translated path objects

      • path

        string

        Value of the real path defined in the story's entry configuration (usually, this value is only required for Storyblok's Visual Editor)

      • name

        string

        The complete name provided for the story

      • lang

        string

        Language code of the current language (can be requested with the language API parameter)

      • published

        boolean

        true if a story has been published at least once (even if it is currently in draft)

    • position

      number

      Numeric representation of the story's position in the folder

    • release_id

      number

      ID of the current release (can be requested with the from_release API parameter)

    • scheduled_dates

      string

      Scheduled publishing date (Format: YYYY-mm-dd HH:MM)

    • favourite_for_user_ids

      number[]

      Array of user IDs who have added the story in their favorites

Example Request

Request
curl "https://mapi.storyblok.com/v1/spaces/606/stories/" \
  -X GET \
  -H "Authorization: YOUR_OAUTH_TOKEN" \
  -H "Content-Type: application/json"
Request
// Using the Universal JavaScript Client:
// https://github.com/storyblok/storyblok-js-client
Storyblok.get('/spaces/606/stories/', {})
  .then(response => {
    console.log(response)
  }).catch(error => { 
    console.log(error)
  })
Request
$client = new \Storyblok\Client('YOUR_OAUTH_TOKEN');

$client->get('/spaces/606/stories/')->getBody();
Request
require 'storyblok'
client = Storyblok::Client.new(oauth_token: 'YOUR_OAUTH_TOKEN')

client.false('/spaces/606/stories/')
Request
HttpResponse<String> response = Unirest.get("https://mapi.storyblok.com/v1/spaces/606/stories/")
  .header("Authorization", "YOUR_OAUTH_TOKEN")
  .asString();
Request
var client = new RestClient("https://mapi.storyblok.com/v1/spaces/606/stories/");
var request = new RestRequest(Method.GET);

request.AddHeader("Authorization", "YOUR_OAUTH_TOKEN");
IRestResponse response = client.Execute(request);
Request
import Foundation

let headers = [
  "Content-Type": "application/json",
  "Authorization": "YOUR_OAUTH_TOKEN"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://mapi.storyblok.com/v1/spaces/606/stories/")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0)
request.method = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
Request
import requests

url = "https://mapi.storyblok.com/v1/spaces/606/stories/"

querystring = {}

payload = ""
headers = {
  'Content-Type': "application/json",
  'Authorization': "YOUR_OAUTH_TOKEN"
}

response = requests.request("GET", url, data=payload, headers=headers, params=querystring)

print(response.text)

Example Request with search_term

Request
curl "https://mapi.storyblok.com/v1/spaces/606/stories/?text_search=My+fulltext+search" \
  -X GET \
  -H "Authorization: YOUR_OAUTH_TOKEN" \
  -H "Content-Type: application/json"
Request
// Using the Universal JavaScript Client:
// https://github.com/storyblok/storyblok-js-client
Storyblok.get('/spaces/606/stories/', {
  "text_search": "My fulltext search"
})
  .then(response => {
    console.log(response)
  }).catch(error => { 
    console.log(error)
  })
Request
$client = new \Storyblok\Client('YOUR_OAUTH_TOKEN');

$client->get('/spaces/606/stories/', [
  "text_search" =>  "My fulltext search"
])->getBody();
Request
require 'storyblok'
client = Storyblok::Client.new(oauth_token: 'YOUR_OAUTH_TOKEN')

client.false('/spaces/606/stories/', {:params => {
  "text_search" =>  "My fulltext search"
}})
Request
HttpResponse<String> response = Unirest.get("https://mapi.storyblok.com/v1/spaces/606/stories/?text_search=My+fulltext+search")
  .header("Authorization", "YOUR_OAUTH_TOKEN")
  .asString();
Request
var client = new RestClient("https://mapi.storyblok.com/v1/spaces/606/stories/?text_search=My+fulltext+search");
var request = new RestRequest(Method.GET);

request.AddHeader("Authorization", "YOUR_OAUTH_TOKEN");
IRestResponse response = client.Execute(request);
Request
import Foundation

let headers = [
  "Content-Type": "application/json",
  "Authorization": "YOUR_OAUTH_TOKEN"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://mapi.storyblok.com/v1/spaces/606/stories/?text_search=My+fulltext+search")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0)
request.method = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
Request
import requests

url = "https://mapi.storyblok.com/v1/spaces/606/stories/"

querystring = {"text_search":"My fulltext search"}

payload = ""
headers = {
  'Content-Type': "application/json",
  'Authorization': "YOUR_OAUTH_TOKEN"
}

response = requests.request("GET", url, data=payload, headers=headers, params=querystring)

print(response.text)

Example Request with by_uuids

Request
curl "https://mapi.storyblok.com/v1/spaces/606/stories/?by_uuids=fb3afwa58-277f-4690-81fb-e0a080bd39ac,81fb81fb-e9fa-42b5-b952-c7d96ab6099d" \
  -X GET \
  -H "Authorization: YOUR_OAUTH_TOKEN" \
  -H "Content-Type: application/json"
Request
// Using the Universal JavaScript Client:
// https://github.com/storyblok/storyblok-js-client
Storyblok.get('/spaces/606/stories/', {
  "by_uuids": "fb3afwa58-277f-4690-81fb-e0a080bd39ac,81fb81fb-e9fa-42b5-b952-c7d96ab6099d"
})
  .then(response => {
    console.log(response)
  }).catch(error => { 
    console.log(error)
  })
Request
$client = new \Storyblok\Client('YOUR_OAUTH_TOKEN');

$client->get('/spaces/606/stories/', [
  "by_uuids" =>  "fb3afwa58-277f-4690-81fb-e0a080bd39ac,81fb81fb-e9fa-42b5-b952-c7d96ab6099d"
])->getBody();
Request
require 'storyblok'
client = Storyblok::Client.new(oauth_token: 'YOUR_OAUTH_TOKEN')

client.false('/spaces/606/stories/', {:params => {
  "by_uuids" =>  "fb3afwa58-277f-4690-81fb-e0a080bd39ac,81fb81fb-e9fa-42b5-b952-c7d96ab6099d"
}})
Request
HttpResponse<String> response = Unirest.get("https://mapi.storyblok.com/v1/spaces/606/stories/?by_uuids=fb3afwa58-277f-4690-81fb-e0a080bd39ac,81fb81fb-e9fa-42b5-b952-c7d96ab6099d")
  .header("Authorization", "YOUR_OAUTH_TOKEN")
  .asString();
Request
var client = new RestClient("https://mapi.storyblok.com/v1/spaces/606/stories/?by_uuids=fb3afwa58-277f-4690-81fb-e0a080bd39ac,81fb81fb-e9fa-42b5-b952-c7d96ab6099d");
var request = new RestRequest(Method.GET);

request.AddHeader("Authorization", "YOUR_OAUTH_TOKEN");
IRestResponse response = client.Execute(request);
Request
import Foundation

let headers = [
  "Content-Type": "application/json",
  "Authorization": "YOUR_OAUTH_TOKEN"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://mapi.storyblok.com/v1/spaces/606/stories/?by_uuids=fb3afwa58-277f-4690-81fb-e0a080bd39ac,81fb81fb-e9fa-42b5-b952-c7d96ab6099d")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0)
request.method = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
Request
import requests

url = "https://mapi.storyblok.com/v1/spaces/606/stories/"

querystring = {"by_uuids":"fb3afwa58-277f-4690-81fb-e0a080bd39ac,81fb81fb-e9fa-42b5-b952-c7d96ab6099d"}

payload = ""
headers = {
  'Content-Type': "application/json",
  'Authorization': "YOUR_OAUTH_TOKEN"
}

response = requests.request("GET", url, data=payload, headers=headers, params=querystring)

print(response.text)