---
title: "Import YouTube playlist/channel"
url: https://docs.gleap.ai/en/reference/rest-api/import-batch
method: POST
path: "/youtube-source/batch"
api: "API Reference"
tag: "AI content"
operationId: "ImportBatch"
updatedAt: "2026-11-01T18:40:15.677Z"
language: en
---

# Import YouTube playlist/channel

`POST https://api.gleap.io/v3/youtube-source/batch`

Import a YouTube playlist or channel for bulk AI content analysis

## Authorization

- `Authorization` (header, required): `Bearer <token>`

## Headers

- `project` (string, required)

## Request body (`application/json`, required)

- `url` (string, required)
- `firstFittingOnly` (boolean): When the playlist does not fit the plan (too many videos, or more video than the allowance has left), import the first videos that fit instead of refusing (the preview's `allowance.firstFitting`).

## Example request

```bash
curl --request POST \
  --url https://api.gleap.io/v3/youtube-source/batch \
  --header 'Authorization: Bearer <token>' \
  --header 'project: <project>' \
  --header 'Content-Type: application/json' \
  --data '{
  "url": "<url>"
}'
```

## Responses

### 200 (`application/json`)

Ok

```json
{
  "status": "string",
  "batchId": "string"
}
```
