Official Laravel SDK for the Youtube API by NETOX Ltd. – designed to make YouTube data retrieval and content generation seamless from within Laravel applications.
- Installation
- Usage
- Available Methods
- Parameters Reference
- Configuration
- Features
- Free Tier Access
- Troubleshooting
- Support
- License
Install the package using Composer:
composer require yebto/youtube-apiPublish the configuration file:
php artisan vendor:publish --tag=youtubeapi-configAdd your API key to your .env file:
YEB_KEY_ID=your_api_key_hereImport the facade and start making API calls:
use YoutubeAPI;1. Channel Statistics
$stats = YoutubeAPI::channel('statistics', [
'channel' => 'UC_x5XG1OV2P6uZZ5FSM9Ttw'
]);2. Generate Video Title
$title = YoutubeAPI::generate('title-generator', [
'topic' => 'Laravel queue best practices',
'keywords' => ['laravel queue', 'horizon', 'redis'],
'language' => 'EN',
'mood' => 'energetic',
'tone' => 'educational',
'emojis_mode' => 'random_inject',
'hashtags_mode' => 'end',
'channel' => 'UC_x5XG1OV2P6uZZ5FSM9Ttw'
]);3. Video Engagement Rate
$eng = YoutubeAPI::video('engagement-rate', [
'video' => 'dQw4w9WgXcQ'
]);4. Full-Text Video Search
$search = YoutubeAPI::search('videos', [
'q' => 'ai music generation',
'limit' => 30,
'sort' => 'date',
'duration' => 'medium',
'published_after' => '2024-01-01'
]);5. Trending Gaming Videos in Germany
$trending = YoutubeAPI::trending([
'country' => 'DE',
'category' => 20,
'limit' => 50
]);YoutubeAPI::channel($action, $params = [])– API DocsYoutubeAPI::video($action, $params = [])– API DocsYoutubeAPI::generate($action, $params = [])– API DocsYoutubeAPI::search($action, $params = [])– API DocsYoutubeAPI::trending($params = [])– API Docs
| Helper | Required | Optional |
|---|---|---|
channel |
channel, action |
order, limit, after, before |
video |
video, action |
limit, order, repliesOn, country, categoryId |
generate |
topic/channel/video, action |
keywords, language, mood, tone, emojis_mode, hashtags_mode, person |
search |
q, action |
limit, sort, duration, published_after, published_before |
trending |
– | country, category, limit |
💡 All methods accept any additional parameters supported by the API.
The SDK uses a single environment variable:
YEB_KEY_ID=your_api_key_hereYou may customize other configuration settings via the config/youtubeapi.php file after publishing.
-
Simple, expressive API
-
Fully integrated with Laravel
-
Supports powerful YouTube features like:
- Channel & video analytics
- Full-text search with filters
- Title and metadata generation
- Engagement rate calculations
- Trending content discovery
🎁 You can get 1,000+ free API requests by registering on yeb.to using your Google account.
Steps:
- Visit https://yeb.to
- Click Login with Google
- Retrieve your API key and add it to your
.envasYEB_KEY_ID
No credit card required!
If you encounter issues:
- Ensure your API key is correct and active
- Double-check that the config file is published
- Validate parameters against the API reference
- Check for typos in method names or required fields
- 📘 API Documentation: https://docs.yeb.to
- 📧 Email: support@yeb.to
- 🐛 Issues: GitHub Issues
© NETOX Ltd. Licensed under a proprietary or custom license unless stated otherwise in the repository.
💬 Have an idea, feature request, or want to suggest a new YouTube-related API? Reach out to us at support@yeb.to — we’d love to hear from you!