All URIs are relative to https://scrapebadger.com, except if the operation defines another base path.
| Method | HTTP request | Description |
|---|---|---|
| youtubeBatchVideoDetail() | POST /v1/youtube/videos/batch | Batch video detail |
| youtubeChannelAbout() | GET /v1/youtube/channels/{channel_id}/about | Channel about |
| youtubeChannelPlaylists() | GET /v1/youtube/channels/{channel_id}/playlists | Channel playlists |
| youtubeChannelShorts() | GET /v1/youtube/channels/{channel_id}/shorts | Channel shorts |
| youtubeChannelStreams() | GET /v1/youtube/channels/{channel_id}/streams | Channel streams |
| youtubeChannelVideos() | GET /v1/youtube/channels/{channel_id}/videos | Channel videos |
| youtubeCommentReplies() | GET /v1/youtube/videos/{video_id}/comments/{comment_id}/replies | Comment replies |
| youtubeCommunityPostComments() | GET /v1/youtube/posts/{post_id}/comments | Community post comments |
| youtubeCommunityPosts() | GET /v1/youtube/channels/{channel_id}/community | Community posts |
| youtubeContentRegions() | GET /v1/youtube/regions | Content regions |
| youtubeGetACommunityPost() | GET /v1/youtube/posts/{post_id} | Get a community post |
| youtubeGetAMixRadioQueue() | GET /v1/youtube/mixes/{playlist_id} | Get a mix / radio queue |
| youtubeGetAShort() | GET /v1/youtube/shorts/{video_id} | Get a Short |
| youtubeGetChannelDetail() | GET /v1/youtube/channels/{channel_id} | Get channel detail |
| youtubeGetPlaylistDetail() | GET /v1/youtube/playlists/{playlist_id} | Get playlist detail |
| youtubeGetVideoDetail() | GET /v1/youtube/videos/{video_id} | Get video detail |
| youtubeGuestHomeFeed() | GET /v1/youtube/home | Guest home feed |
| youtubeKeywordSuggestions() | GET /v1/youtube/autocomplete | Keyword suggestions |
| youtubeListCaptionTracks() | GET /v1/youtube/videos/{video_id}/captions | List caption tracks |
| youtubeLiveChatMessages() | GET /v1/youtube/videos/{video_id}/live_chat | Live chat messages |
| youtubeOembedMetadata() | GET /v1/youtube/oembed | oEmbed metadata |
| youtubePlaylistItemsPage() | GET /v1/youtube/playlists/{playlist_id}/items | Playlist items page |
| youtubeRelatedVideos() | GET /v1/youtube/videos/{video_id}/related | Related videos |
| youtubeResolveHandleUrlToId() | GET /v1/youtube/channels/resolve | Resolve handle/URL to id |
| youtubeSearchWithinAChannel() | GET /v1/youtube/channels/{channel_id}/search | Search within a channel |
| youtubeSearchYoutube() | GET /v1/youtube/search | Search YouTube |
| youtubeSearchYoutubeMusic() | GET /v1/youtube/music/search | Search YouTube Music |
| youtubeShortsBySound() | GET /v1/youtube/shorts/by_sound/{sound_id} | Shorts by sound |
| youtubeStreamFormats() | GET /v1/youtube/videos/{video_id}/streams | Stream formats |
| youtubeSubscriberCountFast() | GET /v1/youtube/channels/{channel_id}/subscriber_count | Subscriber count (fast) |
| youtubeSupportedMarkets() | GET /v1/youtube/markets | Supported markets |
| youtubeTrendingShorts() | GET /v1/youtube/trending/shorts | Trending shorts |
| youtubeTrendingVideos() | GET /v1/youtube/trending | Trending videos |
| youtubeUiLanguages() | GET /v1/youtube/languages | UI languages |
| youtubeVideoCategories() | GET /v1/youtube/categories | Video categories |
| youtubeVideoComments() | GET /v1/youtube/videos/{video_id}/comments | Video comments |
| youtubeVideoTranscript() | GET /v1/youtube/videos/{video_id}/transcript | Video transcript |
| youtubeVideosUnderAHashtag() | GET /v1/youtube/hashtags/{tag} | Videos under a hashtag |
| youtubeYoutubeScraperHealthCheck() | GET /v1/youtube/health | YouTube scraper health check |
| youtubeYoutubeScraperHealthCheckHead() | HEAD /v1/youtube/health | YouTube scraper health check |
youtubeBatchVideoDetail($request_body): mixedBatch video detail
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\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
);
$request_body = NULL; // array<string,mixed>
try {
$result = $apiInstance->youtubeBatchVideoDetail($request_body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling YouTubeApi->youtubeBatchVideoDetail: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| request_body | array<string,mixed> |
mixed
- Content-Type:
application/json - Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
youtubeChannelAbout($channel_id): mixedChannel about
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\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
try {
$result = $apiInstance->youtubeChannelAbout($channel_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling YouTubeApi->youtubeChannelAbout: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| channel_id | string |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
youtubeChannelPlaylists($channel_id): mixedChannel playlists
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\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
try {
$result = $apiInstance->youtubeChannelPlaylists($channel_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling YouTubeApi->youtubeChannelPlaylists: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| channel_id | string |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
youtubeChannelShorts($channel_id): mixedChannel shorts
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\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
try {
$result = $apiInstance->youtubeChannelShorts($channel_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling YouTubeApi->youtubeChannelShorts: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| channel_id | string |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
youtubeChannelStreams($channel_id): mixedChannel streams
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\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
try {
$result = $apiInstance->youtubeChannelStreams($channel_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling YouTubeApi->youtubeChannelStreams: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| channel_id | string |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
youtubeChannelVideos($channel_id): mixedChannel videos
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\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
try {
$result = $apiInstance->youtubeChannelVideos($channel_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling YouTubeApi->youtubeChannelVideos: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| channel_id | string |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
youtubeCommentReplies($video_id, $comment_id, $continuation): mixedComment replies
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\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
$comment_id = 'comment_id_example'; // string
$continuation = 'continuation_example'; // string | Replies continuation token
try {
$result = $apiInstance->youtubeCommentReplies($video_id, $comment_id, $continuation);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling YouTubeApi->youtubeCommentReplies: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| video_id | string | ||
| comment_id | string | ||
| continuation | string | Replies continuation token |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
youtubeCommunityPostComments($post_id): mixedCommunity post comments
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\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
);
$post_id = 'post_id_example'; // string
try {
$result = $apiInstance->youtubeCommunityPostComments($post_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling YouTubeApi->youtubeCommunityPostComments: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| post_id | string |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
youtubeCommunityPosts($channel_id): mixedCommunity posts
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\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
try {
$result = $apiInstance->youtubeCommunityPosts($channel_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling YouTubeApi->youtubeCommunityPosts: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| channel_id | string |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
youtubeContentRegions(): mixedContent regions
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\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
);
try {
$result = $apiInstance->youtubeContentRegions();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling YouTubeApi->youtubeContentRegions: ', $e->getMessage(), PHP_EOL;
}This endpoint does not need any parameter.
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
youtubeGetACommunityPost($post_id): mixedGet a community post
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\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
);
$post_id = 'post_id_example'; // string
try {
$result = $apiInstance->youtubeGetACommunityPost($post_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling YouTubeApi->youtubeGetACommunityPost: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| post_id | string |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
youtubeGetAMixRadioQueue($playlist_id): mixedGet a mix / radio queue
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\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
);
$playlist_id = 'playlist_id_example'; // string
try {
$result = $apiInstance->youtubeGetAMixRadioQueue($playlist_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling YouTubeApi->youtubeGetAMixRadioQueue: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| playlist_id | string |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
youtubeGetAShort($video_id): mixedGet a Short
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\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
try {
$result = $apiInstance->youtubeGetAShort($video_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling YouTubeApi->youtubeGetAShort: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| video_id | string |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
youtubeGetChannelDetail($channel_id, $gl, $hl): mixedGet channel detail
Channel detail (accepts a UC id, @handle, or custom URL).
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\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
$gl = 'gl_example'; // string
$hl = 'hl_example'; // string
try {
$result = $apiInstance->youtubeGetChannelDetail($channel_id, $gl, $hl);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling YouTubeApi->youtubeGetChannelDetail: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| channel_id | string | ||
| gl | string | [optional] | |
| hl | string | [optional] |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
youtubeGetPlaylistDetail($playlist_id): mixedGet playlist detail
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\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
);
$playlist_id = 'playlist_id_example'; // string
try {
$result = $apiInstance->youtubeGetPlaylistDetail($playlist_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling YouTubeApi->youtubeGetPlaylistDetail: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| playlist_id | string |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
youtubeGetVideoDetail($video_id, $gl, $hl): mixedGet video detail
Full video detail — merged player + next (likes, comments, chapters, related).
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\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
$gl = 'gl_example'; // string
$hl = 'hl_example'; // string
try {
$result = $apiInstance->youtubeGetVideoDetail($video_id, $gl, $hl);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling YouTubeApi->youtubeGetVideoDetail: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| video_id | string | ||
| gl | string | [optional] | |
| hl | string | [optional] |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
youtubeGuestHomeFeed(): mixedGuest home feed
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\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
);
try {
$result = $apiInstance->youtubeGuestHomeFeed();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling YouTubeApi->youtubeGuestHomeFeed: ', $e->getMessage(), PHP_EOL;
}This endpoint does not need any parameter.
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
youtubeKeywordSuggestions($query, $gl, $hl): mixedKeyword suggestions
Return YouTube keyword autocomplete suggestions.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\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
);
$query = 'query_example'; // string | Partial query prefix
$gl = 'gl_example'; // string
$hl = 'hl_example'; // string
try {
$result = $apiInstance->youtubeKeywordSuggestions($query, $gl, $hl);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling YouTubeApi->youtubeKeywordSuggestions: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| query | string | Partial query prefix | |
| gl | string | [optional] | |
| hl | string | [optional] |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
youtubeListCaptionTracks($video_id): mixedList caption tracks
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\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
try {
$result = $apiInstance->youtubeListCaptionTracks($video_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling YouTubeApi->youtubeListCaptionTracks: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| video_id | string |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
youtubeLiveChatMessages($video_id, $continuation, $replay): mixedLive chat messages
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\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
$continuation = 'continuation_example'; // string
$replay = false; // bool
try {
$result = $apiInstance->youtubeLiveChatMessages($video_id, $continuation, $replay);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling YouTubeApi->youtubeLiveChatMessages: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| video_id | string | ||
| continuation | string | [optional] | |
| replay | bool | [optional] [default to false] |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
youtubeOembedMetadata($url): mixedoEmbed metadata
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\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 | A YouTube URL
try {
$result = $apiInstance->youtubeOembedMetadata($url);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling YouTubeApi->youtubeOembedMetadata: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| url | string | A YouTube URL |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
youtubePlaylistItemsPage($playlist_id): mixedPlaylist items page
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\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
);
$playlist_id = 'playlist_id_example'; // string
try {
$result = $apiInstance->youtubePlaylistItemsPage($playlist_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling YouTubeApi->youtubePlaylistItemsPage: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| playlist_id | string |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
youtubeRelatedVideos($video_id): mixedRelated videos
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\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
try {
$result = $apiInstance->youtubeRelatedVideos($video_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling YouTubeApi->youtubeRelatedVideos: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| video_id | string |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
youtubeResolveHandleUrlToId($handle, $url): mixedResolve handle/URL to id
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\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
);
$handle = 'handle_example'; // string
$url = 'url_example'; // string
try {
$result = $apiInstance->youtubeResolveHandleUrlToId($handle, $url);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling YouTubeApi->youtubeResolveHandleUrlToId: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| handle | string | [optional] | |
| url | string | [optional] |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
youtubeSearchWithinAChannel($channel_id, $query): mixedSearch within a channel
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\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
$query = 'query_example'; // string | Search keywords
try {
$result = $apiInstance->youtubeSearchWithinAChannel($channel_id, $query);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling YouTubeApi->youtubeSearchWithinAChannel: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| channel_id | string | ||
| query | string | Search keywords |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
youtubeSearchYoutube($query, $type, $sort_by, $upload_date, $duration, $features, $gl, $hl, $continuation): mixedSearch YouTube
Search videos / channels / playlists with the full filter matrix.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\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
);
$query = 'query_example'; // string | Search keywords
$type = 'type_example'; // string | video|channel|playlist|movie|all
$sort_by = 'sort_by_example'; // string | relevance|date|views|rating
$upload_date = 'upload_date_example'; // string | hour|today|week|month|year
$duration = 'duration_example'; // string | short|medium|long
$features = 'features_example'; // string | hd,4k,360,vr180,3d,hdr,cc,subtitles,live
$gl = 'gl_example'; // string | Content region (US, GB, DE…)
$hl = 'hl_example'; // string | UI language
$continuation = 'continuation_example'; // string
try {
$result = $apiInstance->youtubeSearchYoutube($query, $type, $sort_by, $upload_date, $duration, $features, $gl, $hl, $continuation);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling YouTubeApi->youtubeSearchYoutube: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| query | string | Search keywords | |
| type | string | video | channel |
| sort_by | string | relevance | date |
| upload_date | string | hour | today |
| duration | string | short | medium |
| features | string | hd,4k,360,vr180,3d,hdr,cc,subtitles,live | [optional] |
| gl | string | Content region (US, GB, DE…) | [optional] |
| hl | string | UI language | [optional] |
| continuation | string | [optional] |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
youtubeSearchYoutubeMusic($query): mixedSearch YouTube Music
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\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
);
$query = 'query_example'; // string | Search keywords
try {
$result = $apiInstance->youtubeSearchYoutubeMusic($query);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling YouTubeApi->youtubeSearchYoutubeMusic: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| query | string | Search keywords |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
youtubeShortsBySound($sound_id): mixedShorts by sound
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\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
);
$sound_id = 'sound_id_example'; // string
try {
$result = $apiInstance->youtubeShortsBySound($sound_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling YouTubeApi->youtubeShortsBySound: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| sound_id | string |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
youtubeStreamFormats($video_id, $client): mixedStream formats
Stream/format metadata (best-effort; media URLs may be PO-token gated).
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\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
$client = 'IOS'; // string | IOS|ANDROID|WEB
try {
$result = $apiInstance->youtubeStreamFormats($video_id, $client);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling YouTubeApi->youtubeStreamFormats: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| video_id | string | ||
| client | string | IOS | ANDROID |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
youtubeSubscriberCountFast($channel_id): mixedSubscriber count (fast)
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\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
try {
$result = $apiInstance->youtubeSubscriberCountFast($channel_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling YouTubeApi->youtubeSubscriberCountFast: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| channel_id | string |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
youtubeSupportedMarkets(): mixedSupported markets
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\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
);
try {
$result = $apiInstance->youtubeSupportedMarkets();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling YouTubeApi->youtubeSupportedMarkets: ', $e->getMessage(), PHP_EOL;
}This endpoint does not need any parameter.
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
youtubeTrendingShorts(): mixedTrending shorts
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\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
);
try {
$result = $apiInstance->youtubeTrendingShorts();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling YouTubeApi->youtubeTrendingShorts: ', $e->getMessage(), PHP_EOL;
}This endpoint does not need any parameter.
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
youtubeTrendingVideos($gl, $type): mixedTrending videos
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\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
);
$gl = 'gl_example'; // string
$type = 'now'; // string | now|music|gaming|movies
try {
$result = $apiInstance->youtubeTrendingVideos($gl, $type);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling YouTubeApi->youtubeTrendingVideos: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| gl | string | [optional] | |
| type | string | now | music |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
youtubeUiLanguages(): mixedUI languages
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\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
);
try {
$result = $apiInstance->youtubeUiLanguages();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling YouTubeApi->youtubeUiLanguages: ', $e->getMessage(), PHP_EOL;
}This endpoint does not need any parameter.
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
youtubeVideoCategories($gl): mixedVideo categories
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\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
);
$gl = 'US'; // string
try {
$result = $apiInstance->youtubeVideoCategories($gl);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling YouTubeApi->youtubeVideoCategories: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| gl | string | [optional] [default to 'US'] |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
youtubeVideoComments($video_id, $sort_by, $continuation): mixedVideo comments
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\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
$sort_by = 'top'; // string | top|newest
$continuation = 'continuation_example'; // string
try {
$result = $apiInstance->youtubeVideoComments($video_id, $sort_by, $continuation);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling YouTubeApi->youtubeVideoComments: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| video_id | string | ||
| sort_by | string | top | newest |
| continuation | string | [optional] |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
youtubeVideoTranscript($video_id, $language): mixedVideo transcript
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\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
$language = 'language_example'; // string | BCP-47 language code
try {
$result = $apiInstance->youtubeVideoTranscript($video_id, $language);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling YouTubeApi->youtubeVideoTranscript: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| video_id | string | ||
| language | string | BCP-47 language code | [optional] |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
youtubeVideosUnderAHashtag($tag): mixedVideos under a hashtag
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\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
);
$tag = 'tag_example'; // string
try {
$result = $apiInstance->youtubeVideosUnderAHashtag($tag);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling YouTubeApi->youtubeVideosUnderAHashtag: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| tag | string |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
youtubeYoutubeScraperHealthCheck(): mixedYouTube scraper health check
Check health of the YouTube scraper service (accepts HEAD for UptimeRobot).
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\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
);
try {
$result = $apiInstance->youtubeYoutubeScraperHealthCheck();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling YouTubeApi->youtubeYoutubeScraperHealthCheck: ', $e->getMessage(), PHP_EOL;
}This endpoint does not need any parameter.
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
youtubeYoutubeScraperHealthCheckHead(): mixedYouTube scraper health check
Check health of the YouTube scraper service (accepts HEAD for UptimeRobot).
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\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
);
try {
$result = $apiInstance->youtubeYoutubeScraperHealthCheckHead();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling YouTubeApi->youtubeYoutubeScraperHealthCheckHead: ', $e->getMessage(), PHP_EOL;
}This endpoint does not need any parameter.
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]