{"id":30619074,"url":"https://github.com/aviz85/gemini-youtube-analyzer","last_synced_at":"2026-05-03T20:38:53.013Z","repository":{"id":310638290,"uuid":"1040633948","full_name":"aviz85/gemini-youtube-analyzer","owner":"aviz85","description":"🎥 YouTube Video Analyzer using Google Gemini AI with URL context support. Analyze any YouTube video with AI-powered insights.","archived":false,"fork":false,"pushed_at":"2025-08-19T10:17:29.000Z","size":58,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-19T11:35:16.394Z","etag":null,"topics":["ai","api","gemini-ai","javascript","nodejs","vercel","video-analysis","youtube-analyzer"],"latest_commit_sha":null,"homepage":"https://gemini-youtube-new.vercel.app","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aviz85.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-19T09:22:03.000Z","updated_at":"2025-08-19T10:17:32.000Z","dependencies_parsed_at":"2025-08-19T11:47:33.591Z","dependency_job_id":null,"html_url":"https://github.com/aviz85/gemini-youtube-analyzer","commit_stats":null,"previous_names":["aviz85/gemini-youtube-analyzer"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/aviz85/gemini-youtube-analyzer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aviz85%2Fgemini-youtube-analyzer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aviz85%2Fgemini-youtube-analyzer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aviz85%2Fgemini-youtube-analyzer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aviz85%2Fgemini-youtube-analyzer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aviz85","download_url":"https://codeload.github.com/aviz85/gemini-youtube-analyzer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aviz85%2Fgemini-youtube-analyzer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272847473,"owners_count":25003205,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-30T02:00:09.474Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","api","gemini-ai","javascript","nodejs","vercel","video-analysis","youtube-analyzer"],"created_at":"2025-08-30T12:17:03.107Z","updated_at":"2026-05-03T20:38:47.091Z","avatar_url":"https://github.com/aviz85.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# YouTube Video Analyzer with Gemini AI\n\nA powerful web application that analyzes YouTube videos using Google's Gemini AI with URL context support. Simply paste a YouTube URL and get detailed insights about the video content.\n\n## ✨ Features\n\n- **YouTube Video Analysis**: Analyze any public YouTube video using Google's Gemini AI\n- **URL Context Support**: Leverages Gemini's `urlContext` tool for direct video processing\n- **Beautiful Web Interface**: Clean, responsive design with loading states and error handling\n- **RESTful API**: Well-documented API endpoints for programmatic access\n- **Comprehensive Testing**: Full test suite with 9 automated tests\n- **Production Ready**: Deployed on Vercel with proper error handling and CORS support\n\n## 🚀 Live Demo\n\n- **Web Interface**: [https://gemini-youtube-new.vercel.app](https://gemini-youtube-new.vercel.app)\n- **API Endpoint**: `POST /api/analyze`\n\n## 🛠️ Quick Start\n\n### Prerequisites\n\n- Node.js 18+ \n- Google Gemini API key ([Get one here](https://makersuite.google.com/app/apikey))\n\n### Installation\n\n1. **Clone the repository**\n   ```bash\n   git clone https://github.com/aviz85/gemini-youtube-analyzer.git\n   cd gemini-youtube-analyzer\n   ```\n\n2. **Install dependencies**\n   ```bash\n   npm install\n   ```\n\n3. **Set up environment variables**\n   ```bash\n   echo \"GEMINI_API_KEY=your_api_key_here\" \u003e .env\n   ```\n\n4. **Run locally**\n   ```bash\n   # Option 1: Using Vercel dev\n   npm run vercel-dev\n   \n   # Option 2: Simple Express server\n   node -e \"\n   const express=require('express');\n   const app=express();\n   app.use(express.json(),express.static('.'));\n   app.all('/api/*',(req,res)=\u003erequire('./api/'+req.path.split('/')[2])(req,res));\n   app.listen(8080,()=\u003econsole.log('✅ Running: http://localhost:8080'));\n   \"\n   ```\n\n5. **Run tests**\n   ```bash\n   npm test\n   ```\n\n## 📋 API Usage\n\n### Analyze Video\n\n**Endpoint:** `POST /api/analyze`\n\n**Request Body:**\n```json\n{\n  \"youtubeUrl\": \"https://www.youtube.com/watch?v=dQw4w9WgXcQ\",\n  \"prompt\": \"What is this video about? Provide a detailed summary.\"\n}\n```\n\n**Response:**\n```json\n{\n  \"success\": true,\n  \"analysis\": \"This video is the official music video for Rick Astley's iconic song 'Never Gonna Give You Up.' It features Rick Astley singing and dancing in various locations...\"\n}\n```\n\n**Error Response:**\n```json\n{\n  \"error\": \"Please provide a valid YouTube URL\"\n}\n```\n\n### Test Connection\n\n**Endpoint:** `GET /api/analyze`\n\n**Response:**\n```json\n{\n  \"message\": \"YouTube Analyzer API is working\",\n  \"timestamp\": \"2025-08-19T08:52:36.715Z\",\n  \"endpoints\": {\n    \"POST /api/analyze\": \"Analyze YouTube video content\"\n  }\n}\n```\n\n## 🔧 Configuration\n\n### Environment Variables\n\n- `GEMINI_API_KEY` (required): Your Google Gemini API key\n\n### Deployment\n\n**Vercel (recommended):**\n```bash\nnpm run deploy\n```\n\n**Other platforms:**\n- The app works on any Node.js hosting platform\n- API functions are in the `/api` directory\n- Static files are served from the root\n\n## 🧪 Testing\n\nThe project includes comprehensive tests covering:\n\n- CORS handling\n- Input validation  \n- YouTube URL format validation\n- API error handling\n- Streaming response aggregation\n- Edge cases and error scenarios\n\n```bash\n# Run all tests\nnpm test\n\n# Run tests in watch mode\nnpm run test:watch\n\n# Run tests with coverage\nnpm run test:coverage\n```\n\n## 📁 Project Structure\n\n```\n├── api/\n│   ├── analyze.js          # Main YouTube analyzer endpoint\n│   └── hello.js            # Test endpoint\n├── __tests__/\n│   └── analyze.test.js     # Comprehensive test suite\n├── index.html              # Beautiful web interface\n├── vercel.json            # Vercel deployment config\n├── package.json           # Dependencies and scripts\n└── README.md              # This file\n```\n\n## 🔐 Security Features\n\n- Input validation and sanitization\n- CORS headers properly configured\n- Environment variable protection\n- Error message sanitization\n- Rate limiting ready (can be easily added)\n\n## 🤝 Contributing\n\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feature/amazing-feature`)\n3. Run tests (`npm test`)\n4. Commit changes (`git commit -m 'Add amazing feature'`)\n5. Push to branch (`git push origin feature/amazing-feature`)\n6. Open a Pull Request\n\n## 📝 License\n\nMIT License - see the [LICENSE](LICENSE) file for details.\n\n## 🙏 Acknowledgments\n\n- Google Gemini AI for the powerful video analysis capabilities\n- Vercel for seamless deployment platform\n- The open-source community for inspiration and tools\n\n## ⚡ Performance\n\n- Streaming responses for faster perceived performance\n- Efficient error handling\n- Minimal dependencies\n- Optimized for both development and production\n\n---\n\n**Made with ❤️ by [aviz85](https://github.com/aviz85)**","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faviz85%2Fgemini-youtube-analyzer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faviz85%2Fgemini-youtube-analyzer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faviz85%2Fgemini-youtube-analyzer/lists"}