api
Youtube API

Documentation

1. Custom List

  • URL: https://api.i-as.dev/api/youtube/list?apiKey={Youtube_ApiKey_V3}
  • Method: POST
  • Description: Provides a custom list of playlists for different categories.
Request Body:
{
  "react": [
    "PL4cUxeGkcC9gZD-Tvwfod2gaISzfRiP9d"
  ],
  "angular": [
    "PLC3y8-rFHvwhBRAgFinJR8KHIrCdTkZcZ"
  ]
}
  • Parameters:
    • Each category can have a list of playlist IDs.
Response Example:
{
  "list": [
    {
      "id": "string",
      "title": "string",
      "description": "string",
      "thumbnail": "url",
      "category": "string"
    }
  ]
}

2. Get Playlist Details

  • URL: https://api.i-as.dev/api/youtube/playlist/:playListID?apiKey={Youtube_ApiKey_V3}
  • Method: GET
  • Description: Retrieves details of a specific playlist by playlist ID.
Response Example:
{
  "playlist": {
    "id": "string",
    "title": "string",
    "description": "string",
    "thumbnail": "url",
    "channel": "string"
  },
  "videos": [
    {
      "id": "string",
      "title": "string",
      "thumbnail": "url",
      "channel": "string"
    }
  ]
}

3. Get Video Details

  • URL: https://api.i-as.dev/api/youtube/video/:videoId?apiKey={Youtube_ApiKey_V3}
  • Method: GET
  • Description: Retrieves details of a specific video by video ID.
Response Example:
{
  "video": {
    "id": "string",
    "title": "string",
    "description": "string",
    "thumbnail": "url",
    "publish": "string",
    "channel": "string",
    "video": "url",
    "views": "string"
  }
}

4. Search YouTube Content

  • URL: http://localhost:3000/api/youtube/search?q={query}&apiKey={Youtube_ApiKey_V3}
  • Method: GET
  • Description: Searches for videos and channels based on a query.
Advanced Parameters:
  • type: Specifies the type of content (e.g., video, channel).
  • maxResults: Limit the number of results (e.g., 10, 16).
  • pageToken: Pagination token (e.g., nextPageToken, prevPageToken).
Response Example:
{
  "results": [
    {
      "id": "string",
      "title": "string",
      "description": "string",
      "thumbnail": "url"
    }
  ],
  "nextPageToken": "token",
  "prevPageToken": "token"
}

5. Get Channel Details

  • URL: http://localhost:3000/api/youtube/channel/:channelId?apiKey={Youtube_ApiKey_V3}
  • Method: GET
  • Description: Retrieves details of a specific YouTube channel by channel ID.
Advanced Parameters:
  • maxResults: Limit the number of results (e.g., 10, 16).
  • pageToken: Pagination token (e.g., nextPageToken, prevPageToken).
Response Example:
{
  "channel": {
    "id": "string",
    "title": "string",
    "description": "string",
    "subscriberCount": "string",
    "viewCount": "string",
    "videoCount": "string"
  },
  "videos": [
    {
      "id": "string",
      "title": "string",
      "description": "string",
      "thumbnail": "url",
      "publishedAt": "string"
    }
  ],
  "nextPageToken": "token",
  "prevPageToken": "token"
}

API Key:

Make sure to replace {Youtube_ApiKey_V3} with your valid YouTube API key.