---
title: Retrieve Multiple Links
description: Retrieve a concise representation of stories and folders using the links endpoint in the Content Delivery API.
url: https://storyblok.com/docs/api/content-delivery/v2/links/retrieve-multiple-links
---

# Retrieve Multiple Links

Returns the links object containing all links within a space. Links are a representation of stories and folders. Links contain a limited subset of the information associated with stories, resulting in a reduced size of the API response.

GET

```html
https://api.storyblok.com/v2/cdn/links
```

> [!NOTE]
> This endpoint is paginated by default. To receive more than the default of 25 link entries, the `per_page` parameter can be set to a maximum of 1000. See [Pagination](/docs/api/content-delivery/v2/getting-started/pagination) for further information.

> [!NOTE]
> The response always includes folders, regardless of their publication status.

> [!WARNING]
> For spaces created before May 9th, 2023, the links endpoint is **not** paginated by default. To enable pagination, set the `paginated` parameter to 1.

## Query parameters

-   `token` (required) (string)
    
    A preview or public [access token](/docs/concepts/access-tokens)
    
-   `starts_with` (string)
    
    Filter by `full_slug` to only return links starting with the given value, for example: `starts_with=de/beitraege`, `starts_with=en/posts`.
    
-   `version` (draft | published)
    
    Default: `published`
    
-   `cv` (number)
    
    Cached version Unix timestamp (see [Cache Invalidation](/docs/api/content-delivery/v2/getting-started/cache-invalidation))
    
-   `with_parent` (number)
    
    Filter by folder ID to only return links from a particular folder. Can be set to `0` to only return entries not located in a folder.
    
-   `include_dates` (0 | 1)
    
    Default: `0`. Set to `1` to include `published_at`, `created_at`, and `updated_at` in the response.
    
-   `page` (number)
    
    Default: `1` (see [Pagination](/docs/api/content-delivery/v2/getting-started/pagination))
    
-   `per_page` (number)
    
    Default: `25`, Max: `1000` (see [Pagination](/docs/api/content-delivery/v2/getting-started/pagination))
    
-   `paginated` (0 | 1)
    
    Set to `1` to enable pagination (see note above)
    

## Response properties

-   `links` (object)
    
    An object of [link objects](/docs/api/content-delivery/v2/links/the-link-object) (each key constitutes a story or folder UUID)
    

## Examples

-   cURL
    
    ```shellscript
    curl "https://api.storyblok.com/v2/cdn/links\
    ?token=krcV6QGxWORpYLUWt12xKQtt\
    &version=published\
    &starts_with=articles"
    ```
    
-   JS
    
    ```javascript
    // storyblok-js-client@>=7, node@>=18
    import Storyblok from "storyblok-js-client";
    
    const storyblok = new Storyblok({
      accessToken: "krcV6QGxWORpYLUWt12xKQtt",
    });
    
    try {
      const response = await storyblok.get('cdn/links', {
        "version": "published",
        "starts_with": "articles"
      })
      console.log({ response })
    } catch (error) {
      console.log(error)
    }
    ```
    
-   PHP
    
    ```php
    $client = new \Storyblok\Client('YOUR_STORYBLOK_SPACE_ACCESS_TOKEN');
    
    $client->getLinks([
      "version" => "published",
      "starts_with" => "articles"
    ])->getBody();
    ```
    
-   Java
    
    ```java
    HttpResponse<String> response = Unirest.get("https://api.storyblok.com/v2/cdn/links?token=krcV6QGxWORpYLUWt12xKQtt&version=published&starts_with=articles")
      .asString();
    ```
    
-   C#
    
    ```csharp
    var client = new RestClient("https://api.storyblok.com/v2/cdn/links?token=krcV6QGxWORpYLUWt12xKQtt&version=published&starts_with=articles");
    var request = new RestRequest(Method.GET);
    
    IRestResponse response = client.Execute(request);
    ```
    
-   Python
    
    ```python
    import requests
    
    url = "https://api.storyblok.com/v2/cdn/links"
    
    querystring = {"token":"krcV6QGxWORpYLUWt12xKQtt","version":"published","starts_with":"articles"}
    
    payload = ""
    headers = {}
    
    response = requests.request("GET", url, data=payload, headers=headers, params=querystring)
    
    print(response.text)
    ```
    
-   Ruby
    
    ```ruby
    require 'storyblok'
    client = Storyblok::Client.new(token: 'YOUR_TOKEN')
    
    client.links({:params => {
      "version" => "published",
      "starts_with" => "articles"
    }})
    ```
    
-   Swift
    
    ```swift
    let storyblok = URLSession(storyblok: .cdn(accessToken: "krcV6QGxWORpYLUWt12xKQtt"))
    var request = URLRequest(storyblok: storyblok, path: "links")
    request.url!.append(queryItems: [
        URLQueryItem(name: "version", value: "published"),
        URLQueryItem(name: "starts_with", value: "articles")
    ])
    let (data, _) = try await storyblok.data(for: request)
    print(try JSONSerialization.jsonObject(with: data))
    ```
    
-   Kotlin
    
    ```kotlin
    val client = HttpClient {
        install(Storyblok(CDN)) {
            accessToken = "krcV6QGxWORpYLUWt12xKQtt"
        }
    }
    
    val response = client.get("links") {
        url {
            parameters.append("version", "published")
            parameters.append("starts_with", "articles")
        }
    }
    
    println(response.body<JsonElement>())
    ```

```json
{
 "links": {
   "47ba3d20-3962-4017-b158-b268a976b683": {
     "id": 444991588,
     "uuid": "47ba3d20-3962-4017-b158-b268a976b683",
     "slug": "articles",
     "path": null,
     "parent_id": null,
     "name": "Articles",
     "is_folder": true,
     "published": false,
     "is_startpage": false,
     "position": 0,
     "real_path": "/articles"
   },
   "660452d2-1a68-4493-b5b6-2f03b6fa722b": {
     "id": 444996765,
     "uuid": "660452d2-1a68-4493-b5b6-2f03b6fa722b",
     "slug": "articles/earths-symphony-navigating-wonders-challenges-blue-oasis",
     "path": null,
     "parent_id": 444991588,
     "name": "Earth's Symphony: Navigating the Wonders and Challenges of Our Blue Oasis",
     "is_folder": false,
     "published": true,
     "is_startpage": false,
     "position": 0,
     "real_path": "/articles/earths-symphony-navigating-wonders-challenges-blue-oasis"
   },
   "a2c57c06-2c5c-4819-acb7-0d9c047d16e9": {
     "id": 445002665,
     "uuid": "a2c57c06-2c5c-4819-acb7-0d9c047d16e9",
     "slug": "articles/mars-unveiled-exploring-mysteries-marvels-red-frontier",
     "path": null,
     "parent_id": 444991588,
     "name": "Mars Unveiled: Exploring the Mysteries and Marvels of the Red Frontier",
     "is_folder": false,
     "published": true,
     "is_startpage": false,
     "position": 0,
     "real_path": "/articles/mars-unveiled-exploring-mysteries-marvels-red-frontier"
   }
 }
}
```

## Pagination

-   [Previous: Retrieve a Single Link](/docs/api/content-delivery/v2/links/retrieve-single-link)
-   [Next: The Link Object](/docs/api/content-delivery/v2/links/the-link-object)
