### GET /videos/live/simple Source: https://github.com/holores/holodex-api/blob/main/docs/classes/index.VideoHandler.html A simple endpoint to get live status for a list of channels. ```APIDOC ## GET /videos/live/simple ### Description Retrieves simplified live status information for a given list of channels. ### Method GET ### Endpoint `/videos/live/simple` ### Parameters #### Query Parameters - **channels** (string[]) - Required - An array of channel IDs to query. ### Response #### Success Response (200) - **any** - The structure of the response is not explicitly defined in the provided documentation, but it relates to the live status of the queried channels. #### Response Example ```json { "channelId1": { "live": true, "viewers": 1234 }, "channelId2": { "live": false } } ``` ``` -------------------------------- ### GET /videos Source: https://github.com/holores/holodex-api/blob/main/docs/classes/index.VideoHandler.html Retrieves a paginated list of videos based on provided video parameters. ```APIDOC ## GET /videos ### Description Retrieves a paginated list of videos. ### Method GET ### Endpoint /videos ### Parameters #### Query Parameters - **vidParams** (VideosQuery) - Optional - Object containing the query parameters for this query. ### Request Example ```json { "vidParams": {} } ``` ### Response #### Success Response (200) - **data** (PaginatedVideosData) - An array of video objects. #### Response Example ```json { "data": [ { "id": "video_id", "title": "Video Title", "channel": { "id": "channel_id", "name": "Channel Name" }, "publishedAt": "2023-10-27T10:00:00Z", "viewCount": 10000, "type": "stream" } ], "count": 100 } ``` ``` -------------------------------- ### Get Channel-Specific Videos (TypeScript) Source: https://context7.com/holores/holodex-api/llms.txt Illustrates how to retrieve videos, clips, and collaborations associated with a particular channel ID. Examples cover unpaginated and paginated requests for different video types and include options for specific data inclusions. ```typescript // Get channel's own video uploads (unpaginated) const channelUploads = await client.videos.getFromChannelWithTypeUnpaginated( 'UC5CwaMl1eIgY8h02uZw7u8A', 'videos', { limit: 50, lang: 'en' } ); // Get clips featuring this channel (paginated) const clips = await client.videos.getFromChannelWithTypePaginated( 'UC5CwaMl1eIgY8h02uZw7u8A', 'clips', { limit: 25, offset: 0, include: ['refers', 'sources'] } ); // Returns: { total: 1250, items: [...] } // Get collaborations mentioning this channel const collabs = await client.videos.getFromChannelWithType( 'UC5CwaMl1eIgY8h02uZw7u8A', 'collabs', { paginated: true, limit: 50 } ); ``` -------------------------------- ### GET /videos/live/unpaginated Source: https://github.com/holores/holodex-api/blob/main/docs/classes/index.VideoHandler.html Retrieves unpaginated live or upcoming videos. ```APIDOC ## GET /videos/live/unpaginated ### Description Fetches live and upcoming videos without pagination. ### Method GET ### Endpoint `/videos/live/unpaginated` ### Parameters #### Query Parameters - **vidParams** (VideosQueryLiveAndUpcomingParameters) - Optional - Object containing query parameters for filtering live and upcoming videos. ### Response #### Success Response (200) - **Array of Video objects** - Contains a list of live and upcoming videos. #### Response Example ```json [ { "videoId": "liveVideoId1", "title": "Live Stream Title 1", "channelId": "channelId1", "thumbnail": "https://example.com/thumbnail1.jpg", "viewCount": 5000, "liveNow": true, "scheduledStartTime": "2023-10-27T12:00:00Z" } ] ``` ``` -------------------------------- ### GET /videos/live Source: https://github.com/holores/holodex-api/blob/main/docs/classes/index.VideoHandler.html Retrieves a list of live or upcoming videos. This endpoint can return paginated data or an array of videos depending on the parameters. ```APIDOC ## GET /videos/live ### Description Fetches live and upcoming videos. The response format can be paginated or a direct array of videos. ### Method GET ### Endpoint `/videos/live` ### Parameters #### Query Parameters - **vidParams** (VideosQueryLiveAndUpcomingParameters) - Optional - Object containing query parameters for filtering live and upcoming videos. ### Response #### Success Response (200) - **PaginatedVideosData or Array of Video objects** - Depending on the query, returns paginated results or a direct list of videos. #### Response Example (Paginated) ```json { "total": 10, "count": 5, "limit": 5, "offset": 0, "data": [ { "videoId": "liveVideoId1", "title": "Live Stream Title 1", "channelId": "channelId1", "thumbnail": "https://example.com/thumbnail1.jpg", "viewCount": 5000, "liveNow": true, "scheduledStartTime": "2023-10-27T12:00:00Z" } ] } ``` #### Response Example (Array) ```json [ { "videoId": "liveVideoId2", "title": "Live Stream Title 2", "channelId": "channelId2", "thumbnail": "https://example.com/thumbnail2.jpg", "viewCount": 3000, "liveNow": true, "scheduledStartTime": "2023-10-27T13:00:00Z" } ] ``` ``` -------------------------------- ### Get Video by ID (TypeScript) Source: https://context7.com/holores/holodex-api/llms.txt Shows how to retrieve detailed information for a specific video using its ID. Includes examples for basic retrieval and fetching with additional options like language filtering and comments. Also illustrates the expected response structure. ```typescript // Basic video retrieval const video = await client.videos.getVideo('4_G7UuchCD8'); console.log(video.title, video.status, video.duration); // Include timestamp comments and language filtering const videoWithComments = await client.videos.getVideo('4_G7UuchCD8', { lang: 'en,ja', c: true }); // Response structure // { // id: '4_G7UuchCD8', // title: 'Video Title', // type: 'stream' | 'clip', // status: 'past', // duration: 7200, // availableAt: Date, // channel: { id, name, photo, ... }, // comments: [{ commentKey, videoId, message }], // ... // } ``` -------------------------------- ### GET /live Source: https://github.com/holores/holodex-api/blob/main/docs/interfaces/types.VideosQueryLiveAndUpcomingParameters.html Retrieves a list of live and upcoming videos. This endpoint supports various query parameters to filter and sort the results. ```APIDOC ## GET /live ### Description Retrieves a list of live and upcoming videos. This endpoint supports various query parameters to filter and sort the results. ### Method GET ### Endpoint /live ### Parameters #### Query Parameters - **channelId** (string[]) - Optional - Filter by video uploader channel id - **id** (string) - Optional - A single Youtube Video ID. If Specified, only this video can be returned (may be filtered out by other conditions though) - **include** (string[]) - Optional - Comma-separated list of extra video info. Possible items: 'clips' 'refers' 'sources' 'simulcasts' 'mentions' 'description' 'live_info' 'channel_stats' 'songs' - **lang** (string) - Optional - A comma separated list of language codes to filter channels/clips. Default: `all` - **limit** (number) - Optional - Results limit. Default: `25` - **maxUpcomingHours** (number) - Optional - Number of maximum hours upcoming to get upcoming videos by (for rejecting waiting rooms that are two years out). Example: `24` - **mentionedChannelId** (string) - Optional - Filter by mentioned channel id, excludes itself. Generally used to find collabs/clips that include the requested channel - **offset** (number) - Optional - Offset results. Default: `0` - **order** (string) - Optional - Order by ascending or descending. Default: `desc`. Possible values: `asc`, `desc` - **org** (string) - Optional - Filter by clips that feature the org's talent or videos posted by the org's talent. Example: `Hololive` - **paginated** (boolean) - Optional - If paginated is set to true, return an object with total, otherwise returns an array. Default is implied as false for array return. - **sort** (string) - Optional - - **status** (string[]) - Optional - Filter by video status (e.g., 'live', 'ended', 'upcoming'). - **topic** (string) - Optional - Filter by topic. - **type** (string) - Optional - Filter by video type (e.g., 'stream', 'clip'). ### Request Example ```json { "channelId": ["UCl_gCybOJRIgOXw6Qb4qJzQ"], "lang": "en,ja", "limit": 50, "include": ["clips", "description"] } ``` ### Response #### Success Response (200) - **id** (string) - Video ID - **title** (string) - Video Title - **viewers** (number) - Current number of viewers - **created_at** (string) - ISO 8601 timestamp of when the video was created - **published_at** (string) - ISO 8601 timestamp of when the video was published - **available_at** (string) - ISO 8601 timestamp of when the video became available - **scheduled_start_time** (string) - ISO 8601 timestamp of when the video is scheduled to start - **duration** (number) - Duration of the video in seconds - **status** (string) - Current status of the video (e.g., 'live', 'ended', 'upcoming') - **songcount** (number) - Number of songs in the video - **channel** (object) - Information about the channel - **id** (string) - Channel ID - **name** (string) - Channel Name - **thumbnail** (string) - URL to the channel's thumbnail - **subscriber_count** (number) - Number of subscribers - **org** (string) - Organization the channel belongs to #### Response Example ```json [ { "id": "abcdef12345", "title": "Example Live Stream", "viewers": 1500, "created_at": "2023-10-27T10:00:00Z", "published_at": "2023-10-27T10:00:00Z", "available_at": "2023-10-27T10:00:00Z", "scheduled_start_time": "2023-10-27T10:00:00Z", "duration": 3600, "status": "live", "songcount": 5, "channel": { "id": "UCl_gCybOJRIgOXw6Qb4qJzQ", "name": "Example VTuber", "thumbnail": "https://example.com/thumbnail.jpg", "subscriber_count": 100000, "org": "Hololive" } } ] ``` ``` -------------------------------- ### GET /videos/unpaginated Source: https://github.com/holores/holodex-api/blob/main/docs/classes/index.VideoHandler.html Retrieves an unpaginated list of all videos. This is the most 'vanilla' variant. ```APIDOC ## GET /videos/unpaginated ### Description Retrieves an unpaginated list of all videos. This endpoint provides a more raw list of videos compared to the paginated endpoint, with fewer default values applied. ### Method GET ### Endpoint /videos/unpaginated ### Parameters #### Query Parameters - **vidParams** (VideosQuery) - Optional - Object containing the query parameters for this query. ### Request Example ```json { "vidParams": {} } ``` ### Response #### Success Response (200) - **data** (Video[]) - An array of video objects. #### Response Example ```json { "data": [ { "id": "video_id", "title": "Video Title", "channel": { "id": "channel_id", "name": "Channel Name" }, "publishedAt": "2023-10-27T10:00:00Z", "viewCount": 10000, "type": "stream" } ] } ``` ``` -------------------------------- ### TypeScript Type Definitions for Holodex API Queries Source: https://context7.com/holores/holodex-api/llms.txt Demonstrates how to use TypeScript interfaces for defining type-safe queries for fetching videos and search parameters from the Holodex API. It shows examples of constructing query objects with various filtering and sorting options. ```typescript import { Video, VideoFull, VideoWithChannel, Channel, ChannelMin, Comment, VideosQuery, VideoSearchQuery, CommentSearchQuery, ListChannelParameters, ExtraVideoInfo } from '@holores/holodex'; // Type-safe video query const query: VideosQuery = { from: new Date('2025-01-01'), to: new Date(), org: 'Hololive', include: ['clips', 'channel_stats'], status: 'past', type: 'stream' }; const videos: Video[] = await client.videos.getVideosUnpaginated(query); // Type-safe search parameters const searchParams: VideoSearchQuery = { sort: 'newest', target: ['stream'], topic: ['singing'], limit: 50 }; ``` -------------------------------- ### GET /videos/{videoId} Source: https://github.com/holores/holodex-api/blob/main/docs/classes/index.VideoHandler.html Retrieves detailed information about a specific video, with options to include comments and recommendations. ```APIDOC ## GET /videos/{videoId} ### Description Retrieves a specific video's details. Can optionally include comments and recommendations based on query parameters. ### Method GET ### Endpoint `/videos/{videoId}` ### Parameters #### Path Parameters - **videoId** (string) - Required - ID of the Youtube Video to retrieve. #### Query Parameters - **query** (object) - Optional - An object containing query parameters. - **c** (boolean) - Optional - If true, includes all timestamp comments for the video. - **lang** (string) - Optional - A comma-separated list of language codes to filter channels/clips. Official streams do not follow this parameter. ### Response #### Success Response (200) - **VideoFull object** - Contains detailed information about the video, potentially including comments and recommendations. #### Response Example ```json { "videoId": "exampleVideoId", "title": "Example Video Title", "channelId": "exampleChannelId", "publishedAt": "2023-01-01T10:00:00Z", "availableAt": "2023-01-01T10:00:00Z", "thumbnail": "https://example.com/thumbnail.jpg", "viewCount": 10000, "likeCount": 500, "isShort": false, "status": "ended", "topic": "Example Topic", "description": "This is an example video description.", "duration": 1200, "comments": [ { "commentId": "comment1", "url": "https://www.youtube.com/watch?v=exampleVideoId&t=60s", "text": "Great point at 1:00!", "timestamp": 60 } ], "recommendations": [ { "videoId": "recommendedVideoId", "title": "Recommended Video Title", "channelId": "recommendedChannelId" } ] } ``` ``` -------------------------------- ### GET /channels/{channelId}/{type} Source: https://github.com/holores/holodex-api/blob/main/docs/classes/index.VideoHandler.html A simplified endpoint for accessing channel-specific data. It provides unpaginated results, offering the same data as the `/videos` endpoint but without pagination. ```APIDOC ## GET /channels/{channelId}/{type} ### Description Fetches unpaginated video data for a specific channel and video type. This is a simplified version of calling the `/videos` endpoint. ### Method GET ### Endpoint `/channels/{channelId}/{type}` ### Parameters #### Path Parameters - **channelID** (string) - Required - ID of the Youtube Channel that is being queried - **type** (VideoTypes) - Required - The type of video resource to fetch. Options include 'Clips', 'Video', and 'Collabs'. #### Query Parameters - **vidParams** (VideosRelatedToChannelParameters) - Optional - Object containing additional query parameters for the request. ### Response #### Success Response (200) - **Array of VideoFull objects** - Contains detailed information about the videos. #### Response Example ```json [ { "videoId": "exampleVideoId", "title": "Example Video Title", "channelId": "exampleChannelId", "publishedAt": "2023-01-01T10:00:00Z", "availableAt": "2023-01-01T10:00:00Z", "thumbnail": "https://example.com/thumbnail.jpg", "viewCount": 10000, "likeCount": 500, "isShort": false, "status": "ended", "topic": "Example Topic" } ] ``` ``` -------------------------------- ### Query Historical Videos (TypeScript) Source: https://context7.com/holores/holodex-api/llms.txt Provides examples for searching past video archives using date ranges and various filters like status, type, and channel ID. It includes unpaginated and paginated queries, as well as searching for clips that mention specific channels. ```typescript // Get videos from last 7 days const recentVideos = await client.videos.getVideosUnpaginated({ from: new Date(Date.now() - 7 * 24 * 60 * 60 * 1000), to: new Date(), limit: 100, status: 'past', type: 'stream' }); // Get past streams from specific channel with extra info const channelVideos = await client.videos.getVideosPaginated({ from: new Date('2025-01-01'), to: new Date('2025-12-31'), channelId: 'UC5CwaMl1eIgY8h02uZw7u8A', include: ['channel_stats', 'description', 'songs'], sort: 'published_at', order: 'desc' }); // Returns: { total: 350, items: [...] } // Find clips mentioning a specific channel const clips = await client.videos.getVideosUnpaginated({ from: new Date('2025-01-01'), to: new Date(), mentionedChannelId: 'UC5CwaMl1eIgY8h02uZw7u8A', type: 'clip', lang: 'en' }); ``` -------------------------------- ### Holodex API Client Initialization Source: https://github.com/holores/holodex-api/blob/main/docs/classes/index.export_.html This section details the initialization of the Holodex API client, including its constructor and available settings. ```APIDOC ## Class export= ### Description Represents the main client for interacting with the Holodex API. ### Constructors #### new export=(settings: Settings) * Initializes a new instance of the `export=` class. * **Parameters** * `settings` (Settings) - Configuration settings for the API client. See types.Settings for details. * **Returns** [export=] - An instance of the Holodex API client. ### Properties #### `Readonly` channels: ChannelHandler * Provides access to channel-related API endpoints. * Defined in index.ts:22 #### `Readonly` search: SearchHandler * Provides access to search-related API endpoints. * Defined in index.ts:24 #### `Readonly` videos: VideoHandler * Provides access to video-related API endpoints. * Defined in index.ts:20 ``` -------------------------------- ### Initialize Holodex API Client (TypeScript) Source: https://context7.com/holores/holodex-api/llms.txt Demonstrates how to initialize the HolodexApiClient with an API key. It also shows how to optionally specify a custom base URL and access the different handler modules (VideoHandler, ChannelHandler, SearchHandler). ```typescript import HolodexApiClient from '@holores/holodex'; // Create client with API key const client = new HolodexApiClient({ apiKey: 'your-api-key-here' }); // Optional: specify custom base URL const customClient = new HolodexApiClient({ apiKey: 'your-api-key-here', url: 'https://holodex.net/api/v2' }); // Access handler modules const videoHandler = client.videos; const channelHandler = client.channels; const searchHandler = client.search; ``` -------------------------------- ### Client Initialization Source: https://context7.com/holores/holodex-api/llms.txt Initialize the HolodexApiClient with an API key to access all endpoints. You can also specify a custom base URL. ```APIDOC ## Client Initialization Initialize the HolodexApiClient with an API key to access all endpoints. ```typescript import HolodexApiClient from '@holores/holodex'; // Create client with API key const client = new HolodexApiClient({ apiKey: 'your-api-key-here' }); // Optional: specify custom base URL const customClient = new HolodexApiClient({ apiKey: 'your-api-key-here', url: 'https://holodex.net/api/v2' }); // Access handler modules const videoHandler = client.videos; const channelHandler = client.channels; const searchHandler = client.search; ``` ``` -------------------------------- ### Query Live and Upcoming Videos (TypeScript) Source: https://context7.com/holores/holodex-api/llms.txt Demonstrates how to fetch currently live and scheduled upcoming streams. Covers filtering by status, organization, and time, as well as paginated results and a simple check for channel live status. ```typescript // Get all currently live streams const liveVideos = await client.videos.getLive({ status: 'live', limit: 25 }); // Get upcoming Hololive streams in next 24 hours const upcoming = await client.videos.getLive({ status: 'upcoming', org: 'Hololive', maxUpcomingHours: 24, lang: 'en,ja', order: 'asc' }); // Get paginated results with total count const paginatedLive = await client.videos.getLivePaginated({ status: 'live', limit: 50, offset: 0 }); // Returns: { total: 150, items: [...] } // Simple check if specific channels are live const channelStatus = await client.videos.getLiveSimple([ 'UC5CwaMl1eIgY8h02uZw7u8A', 'UCL_qhgtOy0dy1Agp8vkySQg' ]); ``` -------------------------------- ### Holodex API Documentation Source: https://github.com/holores/holodex-api/blob/main/docs/modules/index.html This section details the structure and classes available within the Holodex API. ```APIDOC ## Holodex API Overview ### Description This API provides access to Holodex functionalities, including channel and video data management, and search capabilities. ### Classes #### ChannelHandler Manages channel-related operations. #### SearchHandler Handles search queries and index management. #### VideoHandler Provides functionality for video data retrieval and manipulation. #### HolodexApiClient Represents the main client for interacting with the Holodex API. This class is an export of the default export. ### References * **HolodexApiClient**: Renames and re-exports the default export. * **default**: Renames and re-exports the main API client class. ### Settings * **Theme**: Supports 'OS', 'Light', and 'Dark' modes. ``` -------------------------------- ### APIMentions Interface Documentation Source: https://github.com/holores/holodex-api/blob/main/docs/interfaces/types.APIMentions.html Documentation for the APIMentions interface, detailing its properties and inheritance. ```APIDOC ## Interface APIMentions ### Description Model corresponding to mentions in [https://holodex.stoplight.io/docs/holodex/holodex_v2.yaml/components/schemas/VideoFull](https://holodex.stoplight.io/docs/holodex/holodex_v2.yaml/components/schemas/VideoFull) #### Hierarchy * [APIChannelMin](types.APIChannelMin.html) * APIMentions * Defined in [types.ts:84](https://github.com/HoloRes/holodex-api/blob/bc4d65c/src/types.ts#L84) ### Properties #### `Optional` english_name[] * **Type**: string * **Inherited from**: [APIChannelMin](types.APIChannelMin.html).[english_name](types.APIChannelMin.html#english_name) * **Defined in**: [types.ts:25](https://github.com/HoloRes/holodex-api/blob/bc4d65c/src/types.ts#L25) #### id[] * **Type**: string * **Inherited from**: [APIChannelMin](types.APIChannelMin.html).[id](types.APIChannelMin.html#id) * **Defined in**: [types.ts:23](https://github.com/HoloRes/holodex-api/blob/bc4d65c/src/types.ts#L23) #### name[] * **Type**: string * **Inherited from**: [APIChannelMin](types.APIChannelMin.html).[name](types.APIChannelMin.html#name) * **Defined in**: [types.ts:24](https://github.com/HoloRes/holodex-api/blob/bc4d65c/src/types.ts#L24) #### `Optional` org[] * **Type**: string * **Defined in**: [types.ts:85](https://github.com/HoloRes/holodex-api/blob/bc4d65c/src/types.ts#L85) #### `Optional` photo[] * **Type**: string * **Inherited from**: [APIChannelMin](types.APIChannelMin.html).[photo](types.APIChannelMin.html#photo) * **Defined in**: [types.ts:27](https://github.com/HoloRes/holodex-api/blob/bc4d65c/src/types.ts#L27) #### type[] * **Type**: "vtuber" | "subber" * **Inherited from**: [APIChannelMin](types.APIChannelMin.html).[type](types.APIChannelMin.html#type) * **Defined in**: [types.ts:26](https://github.com/HoloRes/holodex-api/blob/bc4d65c/src/types.ts#L26) ``` -------------------------------- ### GET /videos/live/paginated Source: https://github.com/holores/holodex-api/blob/main/docs/classes/index.VideoHandler.html Retrieves paginated live or upcoming videos. This endpoint is specifically designed for paginated results. ```APIDOC ## GET /videos/live/paginated ### Description Fetches live and upcoming videos with pagination. ### Method GET ### Endpoint `/videos/live/paginated` ### Parameters #### Query Parameters - **vidParams** (VideosQueryLiveAndUpcomingParameters) - Optional - Object containing query parameters for filtering live and upcoming videos. ### Response #### Success Response (200) - **PaginatedVideosData object** - Contains paginated results for live and upcoming videos. #### Response Example ```json { "total": 10, "count": 5, "limit": 5, "offset": 0, "data": [ { "videoId": "liveVideoId1", "title": "Live Stream Title 1", "channelId": "channelId1", "thumbnail": "https://example.com/thumbnail1.jpg", "viewCount": 5000, "liveNow": true, "scheduledStartTime": "2023-10-27T12:00:00Z" } ] } ``` ``` -------------------------------- ### Get Channel Information Source: https://context7.com/holores/holodex-api/llms.txt Retrieve detailed information about a specific channel by its ID. ```APIDOC ## Get Channel Information ### Description Retrieve detailed information about a specific channel by ID. ### Method GET ### Endpoint `/channels.getInfo` ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the channel to retrieve. ### Request Example ```typescript await client.channels.getInfo('UC5CwaMl1eIgY8h02uZw7u8A'); ``` ### Response #### Success Response (200) - **id** (string) - Channel ID. - **name** (string) - Channel name. - **englishName** (string) - Channel name in English. - **org** (string) - Organization. - **subOrg** (string) - Subsidiary organization. - **subscriberCount** (integer) - Number of subscribers. - **viewCount** (integer) - Total view count. - **videoCount** (integer) - Number of videos. - **clipCount** (integer) - Number of clips. - **publishedAt** (Date) - Date the channel was published. - **inactive** (boolean) - Whether the channel is inactive. - **twitter** (string) - Twitter handle. - **description** (string) - Channel description. #### Response Example ```json { "id": "UC5CwaMl1eIgY8h02uZw7u8A", "name": "Channel Name", "englishName": "English Name", "org": "Hololive", "subOrg": "JP Gen 1", "subscriberCount": 1500000, "viewCount": 50000000, "videoCount": 450, "clipCount": 2500, "publishedAt": "2016-07-24T00:00:00.000Z", "inactive": false, "twitter": "handle", "description": "..." } ``` ``` -------------------------------- ### Autocomplete Search Source: https://context7.com/holores/holodex-api/llms.txt Query the autocomplete API for channel and topic suggestions. ```APIDOC ## Autocomplete Search ### Description Query the autocomplete API for channel and topic suggestions. ### Method GET ### Endpoint `/search.autocomplete` ### Parameters #### Query Parameters - **query** (string) - Required - The search query string. - **type** (string) - Optional - Filter suggestions by type ('channel' or 'topic'). ### Request Example ```typescript await client.search.autocomplete('gawr'); await client.search.autocomplete('singing', 'channel'); await client.search.autocomplete('game', 'topic'); ``` ### Response #### Success Response (200) - **type** (string) - The type of suggestion ('channel' or 'topic'). - **value** (string) - The ID or value of the suggestion. - **text** (string) - The display text for the suggestion. #### Response Example ```json [ { "type": "channel", "value": "UCoSrY_IQQVpmIRZ9Xf-y93g", "text": "Gawr Gura" }, { "type": "channel", "value": "UC1DCedRgGHBdm81E1llLhOQ", "text": "Gawr Gura Ch." } ] ``` ``` -------------------------------- ### GET /channels/{channelId}/{type} Source: https://github.com/holores/holodex-api/blob/main/docs/interfaces/types.VideosRelatedToChannelParameters.html Retrieves a list of videos related to a specific channel, filtered by type. Supports various query parameters for customization. ```APIDOC ## GET /channels/{channelId}/{type} ### Description Retrieves videos related to a specific channel. This endpoint can be filtered by video type and includes several optional query parameters for pagination and additional data inclusion. ### Method GET ### Endpoint /channels/{channelId}/{type} ### Parameters #### Path Parameters - **channelId** (string) - Required - The ID of the channel. - **type** (string) - Required - The type of videos to retrieve (e.g., 'videos', 'clips'). #### Query Parameters - **include[]** (string) - Optional - Comma-separated list of extra video info. Possible items: 'clips', 'refers', 'sources', 'simulcasts', 'mentions', 'description', 'live_info', 'channel_stats', 'songs'. - **lang[]** (string) - Optional - Comma-separated list of language codes for filtering. Defaults to 'all'. - **limit** (number) - Optional - Results limit. Defaults to 25. - **offset** (number) - Optional - Results offset. Defaults to 0. - **paginated** (boolean) - Optional - If true, returns an object with total count; otherwise, returns an array. Defaults to false. ### Request Example ```json { "example": "GET /channels/UC-l19A07o_aA3Wf1f9z3y6A/videos?limit=10&lang=en&include[]=clips" } ``` ### Response #### Success Response (200) - **videos** (array) - An array of video objects. - **total** (number) - The total number of videos (only if `paginated` is true). - **type** (string) - The type of videos returned. #### Response Example ```json { "example": { "videos": [ { "id": "abcdef123", "title": "Example Video", "channel": { "id": "UC-l19A07o_aA3Wf1f9z3y6A", "name": "Example Channel" }, "view_count": 10000, "published_at": "2023-10-27T10:00:00Z" } ], "total": 50, "type": "videos" } } ``` ``` -------------------------------- ### SearchHandler - Autocomplete Source: https://github.com/holores/holodex-api/blob/main/docs/classes/index.SearchHandler.html Queries the Holodex autocomplete API for suggestions. This endpoint is experimental and undocumented, subject to change. ```APIDOC ## POST /api/v2/search/autocomplete ### Description Queries the Holodex autocomplete API for search suggestions. This endpoint is experimental and undocumented, and may change or become unavailable without notice. ### Method POST ### Endpoint /api/v2/search/autocomplete ### Parameters #### Query Parameters - **query** (string) - Required - The search term to get suggestions for. - **filter** (string) - Optional - Filters the suggestions to a specific type. Allowed values: "channel" or "topic". ### Request Example ```json { "query": "hololive", "filter": "channel" } ``` ### Response #### Success Response (200) - **results** (array) - An array of autocomplete suggestions. #### Response Example ```json { "results": [ { "id": "UC1y7foEk5AoXI0_f-p1eQ6A", "type": "channel", "name": "hololive" }, { "id": "topic-id-123", "type": "topic", "name": "Hololive News" } ] } ``` ``` -------------------------------- ### GET /channels/{channelId}/{type} (Paginated) Source: https://github.com/holores/holodex-api/blob/main/docs/classes/index.VideoHandler.html Retrieves paginated video data for a specific channel and video type. This is the paginated version of the channel video endpoint. ```APIDOC ## GET /channels/{channelId}/{type} (Paginated) ### Description A simplified endpoint for accessing channel-specific data, specifically designed to return paginated results. This is the paginated version of the `/channels/{channelId}/{type}` endpoint. ### Method GET ### Endpoint /channels/{channelId}/{type} ### Parameters #### Path Parameters - **channelId** (string) - Required - ID of the Youtube Channel that is being queried - **type** (VideoTypes) - Required - The type of video resource to fetch. Options include 'Clips' (clip videos), 'Video' (channel's uploads), and 'Collabs' (videos mentioning the channel). #### Query Parameters - **vidParams** (VideosRelatedToChannelParameters) - Optional - Object containing additional query parameters for the request, including pagination parameters. ### Response #### Success Response (200) - **PaginatedChannelVideosData** - Returns paginated video data. #### Response Example { "example": "{\"videos\": [...], \"next_page\": 1, \"total\": 100}" } ``` -------------------------------- ### Search Videos Source: https://context7.com/holores/holodex-api/llms.txt Perform flexible searches across video titles, descriptions, and metadata. ```APIDOC ## Search Videos ### Description Perform flexible searches across video titles, descriptions, and metadata. ### Method GET ### Endpoint `/search.searchVideos` ### Parameters #### Query Parameters - **sort** (string) - Optional - Field to sort by (e.g., 'newest', 'oldest', 'title'). - **target** (array of strings) - Optional - Filter by video target (e.g., 'stream', 'clip', 'music', 'short'). - **topic** (array of strings) - Optional - Filter by video topics (e.g., 'singing', 'gaming'). - **org** (array of strings) - Optional - Filter by organization (e.g., 'Hololive', 'Nijisanji'). - **lang** (array of strings) - Optional - Filter by language (e.g., 'en', 'ja'). - **limit** (integer) - Optional - Maximum number of results to return. - **paginated** (boolean) - Optional - Whether to return paginated results. - **conditions** (array of objects) - Optional - Conditions for text search. Each object should have a `text` field. - **channels** (array of strings) - Optional - Filter by channel IDs. - **offset** (integer) - Optional - Offset for pagination. ### Request Example ```typescript await client.search.searchVideos({ sort: 'newest', target: ['stream', 'clip'], topic: ['singing'], org: ['Hololive', 'Nijisanji'], lang: ['en', 'ja'], limit: 50, paginated: true }); await client.search.searchVideos({ conditions: [ { text: 'karaoke' } ], target: ['stream'], offset: 0, limit: 25 }); await client.search.searchVideos({ channels: [ 'UC5CwaMl1eIgY8h02uZw7u8A', 'UCL_qhgtOy0dy1Agp8vkySQg' ], sort: 'oldest', limit: 100 }); ``` ### Response #### Success Response (200) - **total** (integer) - Total number of videos found. - **items** (array) - Array of video objects. #### Response Example ```json { "total": 3420, "items": [...] } ``` ``` -------------------------------- ### Channel Interface Documentation Source: https://github.com/holores/holodex-api/blob/main/docs/interfaces/types.Channel.html Details the properties of the Channel interface, including optional and required fields, their types, and descriptions. ```APIDOC ## Channel Interface ### Description Represents a YouTube channel, including its metadata and statistics. ### Method N/A (Interface definition) ### Endpoint N/A (Interface definition) ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example N/A ### Response #### Success Response (200) Represents the structure of a Channel object. - **banner** (string) - Optional - The banner image URL for the channel. - **clipCount** (number) - Optional - The number of clips associated with the channel. - **description** (string) - Required - The description of the channel. - **englishName** (string) - Optional - The English name of the channel. - **id** (string) - Required - The unique identifier for the channel. - **inactive** (boolean) - Required - Indicates if the channel is inactive. - **lang** (string) - Optional - The primary language of the channel. - **name** (string) - Required - The name of the channel. - **org** (string) - Optional - The organization the channel belongs to. - **photo** (string) - Optional - The profile picture URL for the channel. - **publishedAt** (Date) - Required - The date and time when the channel was published. - **subOrg** (string) - Optional - The sub-organization the channel belongs to. - **subscriberCount** (number) - Optional - The current number of subscribers for the channel. - **twitter** (string) - Optional - The Twitter handle of the channel. - **type** (string) - Required - The type of channel, e.g., "vtuber" or "subber". - **videoCount** (number) - Optional - The total number of videos uploaded by the channel. - **viewCount** (number) - Optional - The total view count for the channel. #### Response Example ```json { "banner": "https://example.com/banner.jpg", "clipCount": 150, "description": "Official channel for VTuber group HoloRes.", "englishName": "HoloRes Official", "id": "UC_abcdefg12345", "inactive": false, "lang": "en", "name": "ホロレス公式", "org": "HoloRes", "photo": "https://example.com/photo.jpg", "publishedAt": "2020-01-01T10:00:00Z", "subOrg": "Main", "subscriberCount": 500000, "twitter": "@HoloResOfficial", "type": "vtuber", "videoCount": 1000, "viewCount": 100000000 } ``` ``` -------------------------------- ### Get Channel-Specific Videos Source: https://context7.com/holores/holodex-api/llms.txt Retrieve videos, clips, and collaborations associated with a specific channel, with options for pagination and including extra data. ```APIDOC ## Get Channel-Specific Videos Retrieve videos, clips, and collabs associated with a specific channel. ### Method GET ### Endpoint `/channels/:id/videos` ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the channel. #### Query Parameters - **type** (string) - Required - The type of content to retrieve ('videos', 'clips', 'collabs'). - **limit** (number) - Optional - Maximum number of results. - **offset** (number) - Optional - For paginated results. - **lang** (string) - Optional - Comma-separated list of languages. - **include** (array of strings) - Optional - Include additional data ('refers', 'sources'). - **paginated** (boolean) - Optional - If true, returns a paginated response with total count. ### Request Example ```typescript // Get channel's own video uploads (unpaginated) const channelUploads = await client.videos.getFromChannelWithTypeUnpaginated( 'UC5CwaMl1eIgY8h02uZw7u8A', 'videos', { limit: 50, lang: 'en' } ); // Get clips featuring this channel (paginated) const clips = await client.videos.getFromChannelWithTypePaginated( 'UC5CwaMl1eIgY8h02uZw7u8A', 'clips', { limit: 25, offset: 0, include: ['refers', 'sources'] } ); // Returns: { total: 1250, items: [...] } // Get collaborations mentioning this channel const collabs = await client.videos.getFromChannelWithType( 'UC5CwaMl1eIgY8h02uZw7u8A', 'collabs', { paginated: true, limit: 50 } ); ``` ### Response #### Success Response (200) - **items** (array) - An array of video objects. - **total** (number) - The total number of results available (for paginated responses). #### Response Example (Paginated) ```json { "total": 1250, "items": [ { "id": "clip_id_1", "title": "Clip Title", "type": "clip", "refers": [ ... ], "sources": [ ... ], "..." } ] } ``` ```