> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zype.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List Relative Playlist Videos

Returns a windowed set of videos from a playlist relative to the anchor video

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "Platform",
    "version": "1.0.0",
    "description": ""
  },
  "servers": [
    {
      "url": "https://api.zype.com/"
    }
  ],
  "security": [
    {
      "api_key": []
    }
  ],
  "components": {
    "securitySchemes": {
      "api_key": {
        "type": "apiKey",
        "name": "api_key",
        "in": "query"
      }
    }
  },
  "paths": {
    "/playlists/{id}/videos/relative": {
      "get": {
        "summary": "List Relative Playlist Videos",
        "description": "Returns a windowed set of videos from a playlist relative to the anchor video",
        "tags": [
          "Playlists"
        ],
        "operationId": "listPlaylistVideosRelative",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID of playlist"
          },
          {
            "name": "anchor_video_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The selected video ID."
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 3
            },
            "description": "How many items to return after the anchor video."
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0
            },
            "description": "How many items to return before the anchor video."
          },
          {
            "name": "include_anchor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Whether to include the anchor video in the results."
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Sort order of the playlist videos. Defaults to the playlist's sort order."
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            },
            "description": "Order of the playlist videos. Defaults to the playlist's order."
          },
          {
            "name": "zobject_details",
            "$ref": "#/paths/~1playlists~1%7Bid%7D~1videos/get/parameters/5"
          },
          {
            "name": "zobject_types",
            "$ref": "#/paths/~1playlists~1%7Bid%7D~1videos/get/parameters/6"
          },
          {
            "name": "zobject_fields",
            "$ref": "#/paths/~1playlists~1%7Bid%7D~1videos/get/parameters/7"
          }
        ],
        "responses": {
          "200": {
            "description": "Return videos for a specific playlist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/paths/~1videos/get/responses/200/content/application~1json/schema"
                }
              }
            }
          },
          "404": {
            "description": "Playlist not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/paths/~1app/get/responses/404/content/application~1json/schema"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/paths/~1videos/get/responses/422/content/application~1json/schema"
                }
              }
            }
          }
        }
      }
    }
  }
}
```