yebto/youtube-api
Composer 安装命令:
composer require yebto/youtube-api
包简介
Laravel SDK for the Youtube API (yeb.to)
README 文档
README
Youtube API Laravel SDK
Official Laravel SDK for the Youtube API by NETOX Ltd. – designed to make YouTube data retrieval and content generation seamless from within Laravel applications.
Table of Contents
- Installation
- Usage
- Available Methods
- Parameters Reference
- Configuration
- Features
- Free Tier Access
- Troubleshooting
- Support
- License
Installation
Install the package using Composer:
composer require yebto/youtube-api
Publish the configuration file:
php artisan vendor:publish --tag=youtubeapi-config
Add your API key to your .env file:
YEB_KEY_ID=your_api_key_here
Usage
Import the facade and start making API calls:
use YoutubeAPI;
Examples
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 ]);
Available Methods
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
Parameters Reference
| 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.
Configuration
The SDK uses a single environment variable:
YEB_KEY_ID=your_api_key_here
You may customize other configuration settings via the config/youtubeapi.php file after publishing.
Features
-
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
Free Tier Access
🎁 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!
Troubleshooting
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
Support
- 📘 API Documentation: https://docs.yeb.to
- 📧 Email: support@yeb.to
- 🐛 Issues: GitHub Issues
License
© 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!
yebto/youtube-api 适用场景与选型建议
yebto/youtube-api 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 07 月 30 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「api」 「sdk」 「youtube」 「laravel」 「yeb」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 yebto/youtube-api 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 yebto/youtube-api 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 yebto/youtube-api 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Easy to use SDK with grabber for multiple platforms at once like YouTube, Dailymotion, Facebook and more.
A PSR-7 compatible library for making CRUD API endpoints
♺ Laravel Nova Hashids card. Convert your ids.
Generate short, unique, non-sequential ids (like YouTube and Bitly) from numbers
TYPO3 Plugin that displays YouTube-videos faster by loading the video-player on demand while displaying a cacheable preview picture.
Media library for interaction with Youtube and Vimeo web media Api's.
统计信息
- 总下载量: 2
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 17
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-07-30