Skip to main content
GET
https://api.scriptbase.app
/
api
/
v1
/
channels
/
{id}
/
videos
curl "https://api.scriptbase.app/api/v1/channels/UCuAXFkgsw1L7xaCfnd5JJOw/videos?limit=10" \
  -H "X-API-Key: sk_your_key_here"
{
  "success": true,
  "data": {
    "videos": [
      {
        "id": "dQw4w9WgXcQ",
        "title": "Rick Astley - Never Gonna Give You Up (Official Music Video)",
        "description": "The official video for \"Never Gonna Give You Up\"...",
        "thumbnail": "https://i.ytimg.com/vi/dQw4w9WgXcQ/maxresdefault.jpg",
        "duration": 213,
        "viewCount": 1500000000,
        "publishedAt": "2009-10-25T06:57:33.000Z"
      },
      {
        "id": "yPYZpwSpKmA",
        "title": "Rick Astley - Together Forever (Official Music Video)",
        "description": "The official video for \"Together Forever\"...",
        "thumbnail": "https://i.ytimg.com/vi/yPYZpwSpKmA/maxresdefault.jpg",
        "duration": 202,
        "viewCount": 250000000,
        "publishedAt": "2009-10-25T06:59:15.000Z"
      }
    ],
    "pagination": {
      "nextPageToken": "CDIQAA",
      "totalResults": 85
    }
  },
  "meta": {
    "creditsUsed": 2,
    "creditsRemaining": 998,
    "rateLimit": {
      "limit": 60,
      "remaining": 59,
      "resetAt": 1704326400
    }
  }
}

Overview

Retrieve a paginated list of videos published by a YouTube channel. Supports filtering and sorting options.

Authentication

X-API-Key
string
required
Your API key

Path Parameters

id
string
required
YouTube channel ID (starts with UC), handle (@username), or channel URL

Query Parameters

type
string
default:"all"
Filter by content type: all, videos, shorts, streams
sortBy
string
default:"date"
Sort order: date, views, popular
limit
number
default:"30"
Maximum number of videos to return (1-50)
pageToken
string
Token for next page of results

Credits

  • Cost: 2 credits per request

Response

success
boolean
Whether the request was successful
data
object
meta
object
curl "https://api.scriptbase.app/api/v1/channels/UCuAXFkgsw1L7xaCfnd5JJOw/videos?limit=10" \
  -H "X-API-Key: sk_your_key_here"
{
  "success": true,
  "data": {
    "videos": [
      {
        "id": "dQw4w9WgXcQ",
        "title": "Rick Astley - Never Gonna Give You Up (Official Music Video)",
        "description": "The official video for \"Never Gonna Give You Up\"...",
        "thumbnail": "https://i.ytimg.com/vi/dQw4w9WgXcQ/maxresdefault.jpg",
        "duration": 213,
        "viewCount": 1500000000,
        "publishedAt": "2009-10-25T06:57:33.000Z"
      },
      {
        "id": "yPYZpwSpKmA",
        "title": "Rick Astley - Together Forever (Official Music Video)",
        "description": "The official video for \"Together Forever\"...",
        "thumbnail": "https://i.ytimg.com/vi/yPYZpwSpKmA/maxresdefault.jpg",
        "duration": 202,
        "viewCount": 250000000,
        "publishedAt": "2009-10-25T06:59:15.000Z"
      }
    ],
    "pagination": {
      "nextPageToken": "CDIQAA",
      "totalResults": 85
    }
  },
  "meta": {
    "creditsUsed": 2,
    "creditsRemaining": 998,
    "rateLimit": {
      "limit": 60,
      "remaining": 59,
      "resetAt": 1704326400
    }
  }
}

Error Codes

StatusCodeDescription
400INVALID_INPUTInvalid channel ID or query parameters
401INVALID_API_KEYAPI key is missing or invalid
404NOT_FOUNDChannel not found
429QUOTA_EXCEEDEDMonthly quota exhausted
429RATE_LIMIT_EXCEEDEDToo many requests
  • Use nextPageToken to paginate through all videos.
  • The totalResults is an estimate and may not be exact.
  • Channel handles (@username) and full URLs are supported in addition to channel IDs.