Retrieve Multiple Stories
https://mapi.storyblok.com/v1/spaces/:space_id/storiesA paged endpoint that returns an array of story objects.
Path parameters
Section titled “Path parameters”-
:space_idrequired numberNumeric ID of a space.
The following is a subset of the supported parameters.
Query parameters
Section titled “Query parameters”-
pagenumberIndicate the current response’s page.
-
contain_componentstringFilter by nestable blocks contained in the
content. Use comma-separated values to retrieve multiple blocks. -
text_searchstringSearch for any string in stories. The response contains all stories where the string appears anywhere in the name, slug/full slug, or content object (including UIDs, field values, asset file names, and rich text nodes and attributes, such as “bold”).
-
sort_bystringSort retrieved stories by story object properties or field defined in the content type. For example,
created_at:desc,content.FIELD_NAME:asc, etc. To sort numbers append:int. To sort floats append:float. For example,content.FIELD_NAME:asc:float. -
excluding_idsstringExclude specific stories by their IDs. Use comma-separated values to exclude multiple stories.
-
by_idsstringRetrieve specific stories by their IDs. Use comma-separated values to retrieve multiple stories.
-
by_uuidsstringRetrieve specific stories by their UUIDs. Use comma-separated values to retrieve multiple stories.
-
by_uuids_orderedstringRetrieve stories by providing comma-separated UUIDs. The order of the stories in the response matches the order of the UUIDs.
-
with_tagstringRetrieve stories with an assigned tag. Use comma-separated values to filter by multiple tags.
-
folder_onlybooleanRetrieve only folder-type stories.
-
story_onlybooleanRetrieve only non-folder type stories.
-
with_parentnumberFilter by the parent ID.
-
starts_withstringFilter stories that start with a specific slug.
-
in_trashbooleanRetrieve only deleted stories.
-
searchstringSearch stories by name, slug, or full slug.
-
filter_querystringFilter by appending supported operations to fields defined in the content type. Use the syntax
stories/?filter_query[field][operation]=string,string2. Learn more about Filter Queries. -
in_releasenumberRetrieve stories grouped in a release. Use the release ID.
-
is_publishedbooleanRetrieve only published stories (
true), or only draft/unpublished stories (false). -
with_slugstringRetrieve stories with a specific
full slug. -
by_slugsstringRetrieve stories by
full_slug. Use comma-separated values to filter by multiple slugs. The parameter supports wildcard (for example,by_slugs=posts/*). -
excluding_slugsstringExclude stories with specific
full_slug. Use comma-separated values to exclude multiple slugs. The parameter supports wildcard (for example,excluding_slugs=posts*). -
minebooleanRetrieve stories assigned to the current user’s token.
-
in_workflow_stagesnumberRetrieve stories in a specific workflow stage. Use the workflow stage ID. Use comma-separated values to filter by multiple workflow stage IDs.
-
with_summarybooleanInclude a
content_summaryobject in the response. Thecontent_summaryobject lists several field types inside the story’s content. -
scheduled_at_gtstringFilter stories scheduled after the provided date and time (format: ISO UTC timestamp).
-
scheduled_at_ltstringFilter stories scheduled before the provided date and time (format: ISO UTC timestamp).
-
favouritebooleanRetrieve only stories marked as favorites in the Content section of the UI.
-
reference_searchstringSearch referenced stories and assets by story UUID, story or asset name, or asset URL.
Response properties
Section titled “Response properties”-
storiesThe Story ObjectAn array of story objects.
Examples
Section titled “Examples”Example Request
curl "https://mapi.storyblok.com/v1/spaces/288868932106293/stories/" \ -H "Authorization: YOUR_OAUTH_TOKEN"// storyblok-js-client@>=7, node@>=18import Storyblok from "storyblok-js-client";
const storyblok = new Storyblok({ oauthToken: "YOUR_PERSONAL_ACCESS_TOKEN",});
try { const response = await storyblok.get('spaces/288868932106293/stories/', {}) console.log({ response })} catch (error) { console.log(error)}$client = new \Storyblok\ManagementClient('YOUR_OAUTH_TOKEN');
$client->get('spaces/288868932106293/stories/')->getBody();HttpResponse<String> response = Unirest.get("https://mapi.storyblok.com/v1/spaces/288868932106293/stories/") .header("Authorization", "YOUR_OAUTH_TOKEN") .asString();var client = new RestClient("https://mapi.storyblok.com/v1/spaces/288868932106293/stories/");var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "YOUR_OAUTH_TOKEN");IRestResponse response = client.Execute(request);import requests
url = "https://mapi.storyblok.com/v1/spaces/288868932106293/stories/"
querystring = {}
payload = ""headers = { 'Authorization': "YOUR_OAUTH_TOKEN"}
response = requests.request("GET", url, data=payload, headers=headers, params=querystring)
print(response.text)require 'storyblok'client = Storyblok::Client.new(oauth_token: 'YOUR_OAUTH_TOKEN')
client.get('spaces/288868932106293/stories/')let storyblok = URLSession(storyblok: .mapi(accessToken: .oauth("YOUR_OAUTH_TOKEN")))let request = URLRequest(storyblok: storyblok, path: "spaces/288868932106293/stories/")let (data, _) = try await storyblok.data(for: request)print(try JSONSerialization.jsonObject(with: data))val client = HttpClient { install(Storyblok(MAPI)) { accessToken = OAuth("YOUR_OAUTH_TOKEN") }}
val response = client.get("spaces/288868932106293/stories/")
println(response.body<JsonElement>())Example Request with text_search
curl "https://mapi.storyblok.com/v1/spaces/288868932106293/stories/\?text_search=My+fulltext+search" \ -H "Authorization: YOUR_OAUTH_TOKEN"// storyblok-js-client@>=7, node@>=18import Storyblok from "storyblok-js-client";
const storyblok = new Storyblok({ oauthToken: "YOUR_PERSONAL_ACCESS_TOKEN",});
try { const response = await storyblok.get('spaces/288868932106293/stories/', { "text_search": "My fulltext search" }) console.log({ response })} catch (error) { console.log(error)}$client = new \Storyblok\ManagementClient('YOUR_OAUTH_TOKEN');
$client->get('spaces/288868932106293/stories/', [ "text_search" => "My fulltext search"])->getBody();HttpResponse<String> response = Unirest.get("https://mapi.storyblok.com/v1/spaces/288868932106293/stories/?text_search=My+fulltext+search") .header("Authorization", "YOUR_OAUTH_TOKEN") .asString();var client = new RestClient("https://mapi.storyblok.com/v1/spaces/288868932106293/stories/?text_search=My+fulltext+search");var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "YOUR_OAUTH_TOKEN");IRestResponse response = client.Execute(request);import requests
url = "https://mapi.storyblok.com/v1/spaces/288868932106293/stories/"
querystring = {"text_search":"My fulltext search"}
payload = ""headers = { 'Authorization': "YOUR_OAUTH_TOKEN"}
response = requests.request("GET", url, data=payload, headers=headers, params=querystring)
print(response.text)require 'storyblok'client = Storyblok::Client.new(oauth_token: 'YOUR_OAUTH_TOKEN')
client.get('spaces/288868932106293/stories/', {:params => { "text_search" => "My fulltext search"}})let storyblok = URLSession(storyblok: .mapi(accessToken: .oauth("YOUR_OAUTH_TOKEN")))var request = URLRequest(storyblok: storyblok, path: "spaces/288868932106293/stories/")request.url!.append(queryItems: [ URLQueryItem(name: "text_search", value: "My fulltext search")])let (data, _) = try await storyblok.data(for: request)print(try JSONSerialization.jsonObject(with: data))val client = HttpClient { install(Storyblok(MAPI)) { accessToken = OAuth("YOUR_OAUTH_TOKEN") }}
val response = client.get("spaces/288868932106293/stories/") { url { parameters.append("text_search", "My fulltext search") }}
println(response.body<JsonElement>())Example Request with by_uuids
curl "https://mapi.storyblok.com/v1/spaces/288868932106293/stories/\?by_uuids=fb3afwa58-277f-4690-81fb-e0a080bd39ac%2C81fb81fb-e9fa-42b5-b952-c7d96ab6099d" \ -H "Authorization: YOUR_OAUTH_TOKEN"// storyblok-js-client@>=7, node@>=18import Storyblok from "storyblok-js-client";
const storyblok = new Storyblok({ oauthToken: "YOUR_PERSONAL_ACCESS_TOKEN",});
try { const response = await storyblok.get('spaces/288868932106293/stories/', { "by_uuids": "fb3afwa58-277f-4690-81fb-e0a080bd39ac,81fb81fb-e9fa-42b5-b952-c7d96ab6099d" }) console.log({ response })} catch (error) { console.log(error)}$client = new \Storyblok\ManagementClient('YOUR_OAUTH_TOKEN');
$client->get('spaces/288868932106293/stories/', [ "by_uuids" => "fb3afwa58-277f-4690-81fb-e0a080bd39ac,81fb81fb-e9fa-42b5-b952-c7d96ab6099d"])->getBody();HttpResponse<String> response = Unirest.get("https://mapi.storyblok.com/v1/spaces/288868932106293/stories/?by_uuids=fb3afwa58-277f-4690-81fb-e0a080bd39ac%2C81fb81fb-e9fa-42b5-b952-c7d96ab6099d") .header("Authorization", "YOUR_OAUTH_TOKEN") .asString();var client = new RestClient("https://mapi.storyblok.com/v1/spaces/288868932106293/stories/?by_uuids=fb3afwa58-277f-4690-81fb-e0a080bd39ac%2C81fb81fb-e9fa-42b5-b952-c7d96ab6099d");var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "YOUR_OAUTH_TOKEN");IRestResponse response = client.Execute(request);import requests
url = "https://mapi.storyblok.com/v1/spaces/288868932106293/stories/"
querystring = {"by_uuids":"fb3afwa58-277f-4690-81fb-e0a080bd39ac,81fb81fb-e9fa-42b5-b952-c7d96ab6099d"}
payload = ""headers = { 'Authorization': "YOUR_OAUTH_TOKEN"}
response = requests.request("GET", url, data=payload, headers=headers, params=querystring)
print(response.text)require 'storyblok'client = Storyblok::Client.new(oauth_token: 'YOUR_OAUTH_TOKEN')
client.get('spaces/288868932106293/stories/', {:params => { "by_uuids" => "fb3afwa58-277f-4690-81fb-e0a080bd39ac,81fb81fb-e9fa-42b5-b952-c7d96ab6099d"}})let storyblok = URLSession(storyblok: .mapi(accessToken: .oauth("YOUR_OAUTH_TOKEN")))var request = URLRequest(storyblok: storyblok, path: "spaces/288868932106293/stories/")request.url!.append(queryItems: [ URLQueryItem(name: "by_uuids", value: "fb3afwa58-277f-4690-81fb-e0a080bd39ac,81fb81fb-e9fa-42b5-b952-c7d96ab6099d")])let (data, _) = try await storyblok.data(for: request)print(try JSONSerialization.jsonObject(with: data))val client = HttpClient { install(Storyblok(MAPI)) { accessToken = OAuth("YOUR_OAUTH_TOKEN") }}
val response = client.get("spaces/288868932106293/stories/") { url { parameters.append("by_uuids", "fb3afwa58-277f-4690-81fb-e0a080bd39ac,81fb81fb-e9fa-42b5-b952-c7d96ab6099d") }}
println(response.body<JsonElement>())Was this page helpful?
This site uses reCAPTCHA and Google's Privacy Policy (opens in a new window) . Terms of Service (opens in a new window) apply.
Get in touch with the Storyblok community