---
title: "Direct access to YouTube API"
method: POST
path: "/api/youtube-direct"
tags: ["YouTube"]
---

# Direct access to YouTube API

`POST /api/youtube-direct`

## Request

- Base URL: `https://api.kolect.com`
- URL: `https://api.kolect.com/api/youtube-direct`
- Auth: HTTP bearer

Makes direct calls to YouTube API through RapidAPI, supporting multiple actions including search, channel details, and channel videos

## Request body

- object
  - `action` 'search' | 'get_channel_details' | 'get_channel_videos', required: The YouTube API action to perform
  - `search_term` string: Required for search action - the search query
  - `pagination_token` string: Optional token for paginated search results
  - `channel_id` string: Required for get_channel_details and get_channel_videos actions

## Response `200`

Successfully retrieved YouTube data

- union
  - object
    - `success` boolean
    - `videos` object[]: YouTube videos data
    - `continuation_token` string: Token for fetching next page of search results
  - object
    - `success` boolean
    - `data` object: Channel info or channel videos data

## Other responses

- `400`: Bad request, missing required parameters
- `500`: Server error or YouTube API error

---

[API](https://skmtc.dev/kolect/apis/kolect-api.md) · [All operations](https://skmtc.dev/kolect/apis/kolect-api/llms.txt) · [OpenAPI document](https://skmtc.dev/kolect/apis/kolect-api/revisions/fe54528e8f54?raw)
