All URIs are relative to https://api.unifapi.com, except if the operation defines another base path.
| Method | HTTP request | Description |
|---|---|---|
| youtubeChannelsChannelIdGet() | GET /youtube/channels/{channel_id} | Get a YouTube channel by id |
| youtubeChannelsChannelIdShortsGet() | GET /youtube/channels/{channel_id}/shorts | List Shorts uploaded by a YouTube channel |
| youtubeChannelsChannelIdVideosGet() | GET /youtube/channels/{channel_id}/videos | List videos uploaded by a YouTube channel |
| youtubeResolveChannelIdGet() | GET /youtube/resolve/channel-id | Resolve a YouTube channel URL to its UC… channel id |
| youtubeSearchGet() | GET /youtube/search | Search YouTube videos by keyword |
| youtubeTrendingGet() | GET /youtube/trending | Browse YouTube's trending videos |
| youtubeVideosVideoIdGet() | GET /youtube/videos/{video_id} | Get a YouTube video by id |
| youtubeVideosVideoIdRelatedGet() | GET /youtube/videos/{video_id}/related | List YouTube videos related to a given video |
youtubeChannelsChannelIdGet($channel_id): \Unifapi\\Sdk\Model\YoutubeChannelsChannelIdGet200ResponseGet a YouTube channel by id
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Unifapi\\Sdk\Api\YoutubeApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$channel_id = 'channel_id_example'; // string | YouTube channel id (`UCxxx...`).
try {
$result = $apiInstance->youtubeChannelsChannelIdGet($channel_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling YoutubeApi->youtubeChannelsChannelIdGet: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| channel_id | string | YouTube channel id (`UCxxx...`). |
\Unifapi\Sdk\Model\YoutubeChannelsChannelIdGet200Response
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
youtubeChannelsChannelIdShortsGet($channel_id, $cursor): \Unifapi\\Sdk\Model\YoutubeChannelsChannelIdShortsGet200ResponseList Shorts uploaded by a YouTube channel
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Unifapi\\Sdk\Api\YoutubeApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$channel_id = 'channel_id_example'; // string
$cursor = 'cursor_example'; // string
try {
$result = $apiInstance->youtubeChannelsChannelIdShortsGet($channel_id, $cursor);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling YoutubeApi->youtubeChannelsChannelIdShortsGet: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| channel_id | string | ||
| cursor | string | [optional] |
\Unifapi\Sdk\Model\YoutubeChannelsChannelIdShortsGet200Response
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
youtubeChannelsChannelIdVideosGet($channel_id, $cursor): \Unifapi\\Sdk\Model\YoutubeChannelsChannelIdShortsGet200ResponseList videos uploaded by a YouTube channel
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Unifapi\\Sdk\Api\YoutubeApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$channel_id = 'channel_id_example'; // string
$cursor = 'cursor_example'; // string
try {
$result = $apiInstance->youtubeChannelsChannelIdVideosGet($channel_id, $cursor);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling YoutubeApi->youtubeChannelsChannelIdVideosGet: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| channel_id | string | ||
| cursor | string | [optional] |
\Unifapi\Sdk\Model\YoutubeChannelsChannelIdShortsGet200Response
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
youtubeResolveChannelIdGet($url): \Unifapi\\Sdk\Model\YoutubeResolveChannelIdGet200ResponseResolve a YouTube channel URL to its UC… channel id
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Unifapi\\Sdk\Api\YoutubeApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$url = 'url_example'; // string | Full channel URL — supports `youtube.com/@handle`, `/channel/UC…`, `/c/name`.
try {
$result = $apiInstance->youtubeResolveChannelIdGet($url);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling YoutubeApi->youtubeResolveChannelIdGet: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| url | string | Full channel URL — supports `youtube.com/@handle`, `/channel/UC…`, `/c/name`. |
\Unifapi\Sdk\Model\YoutubeResolveChannelIdGet200Response
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
youtubeSearchGet($q, $cursor): \Unifapi\\Sdk\Model\YoutubeChannelsChannelIdShortsGet200ResponseSearch YouTube videos by keyword
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Unifapi\\Sdk\Api\YoutubeApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$q = 'q_example'; // string | Search keyword.
$cursor = 'cursor_example'; // string
try {
$result = $apiInstance->youtubeSearchGet($q, $cursor);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling YoutubeApi->youtubeSearchGet: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| q | string | Search keyword. | |
| cursor | string | [optional] |
\Unifapi\Sdk\Model\YoutubeChannelsChannelIdShortsGet200Response
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
youtubeTrendingGet($language_code): \Unifapi\\Sdk\Model\YoutubeTrendingGet200ResponseBrowse YouTube's trending videos
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Unifapi\\Sdk\Api\YoutubeApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$language_code = 'language_code_example'; // string | Optional language code, e.g. `en`.
try {
$result = $apiInstance->youtubeTrendingGet($language_code);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling YoutubeApi->youtubeTrendingGet: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| language_code | string | Optional language code, e.g. `en`. | [optional] |
\Unifapi\Sdk\Model\YoutubeTrendingGet200Response
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
youtubeVideosVideoIdGet($video_id): \Unifapi\\Sdk\Model\YoutubeVideosVideoIdGet200ResponseGet a YouTube video by id
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Unifapi\\Sdk\Api\YoutubeApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$video_id = 'video_id_example'; // string | YouTube video id, e.g. `oaSNBz4qMQY`.
try {
$result = $apiInstance->youtubeVideosVideoIdGet($video_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling YoutubeApi->youtubeVideosVideoIdGet: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| video_id | string | YouTube video id, e.g. `oaSNBz4qMQY`. |
\Unifapi\Sdk\Model\YoutubeVideosVideoIdGet200Response
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
youtubeVideosVideoIdRelatedGet($video_id, $cursor): \Unifapi\\Sdk\Model\YoutubeChannelsChannelIdShortsGet200ResponseList YouTube videos related to a given video
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Unifapi\\Sdk\Api\YoutubeApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$video_id = 'video_id_example'; // string
$cursor = 'cursor_example'; // string
try {
$result = $apiInstance->youtubeVideosVideoIdRelatedGet($video_id, $cursor);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling YoutubeApi->youtubeVideosVideoIdRelatedGet: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| video_id | string | ||
| cursor | string | [optional] |
\Unifapi\Sdk\Model\YoutubeChannelsChannelIdShortsGet200Response
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]