This demo currently uses simulated data based on artist names. To use real YouTube Data API v3, follow these steps:
- Go to Google Cloud Console
- Create a new project or select existing one
- Enable YouTube Data API v3
- Create credentials (API Key)
- Copy your API key
export YOUTUBE_API_KEY="your_api_key_here"Or add to your .env file:
YOUTUBE_API_KEY=your_api_key_here
pip install requests python-dotenvThe current implementation in insta485/api/discovery.py includes:
- Simulated Data Generation: Based on artist name hash for consistent results
- Real API Integration: Ready for actual YouTube Data API v3 calls
- Error Handling: Falls back to demo mode if API fails
- Dynamic Content: Different data for different artists
- ✅ Different data for different artist names
- ✅ Realistic metrics generation
- ✅ Dynamic video titles with artist names
- ✅ Genre-based keyword generation
- ✅ Random but consistent data per artist
- 🔗 Actual YouTube channel search
- 📊 Real subscriber counts and metrics
- 🎬 Actual video data and statistics
- 🏷️ Real trending keywords from video content
YouTube Data API v3 has daily quotas:
- 10,000 units per day (default)
- Search: 100 units per request
- Channel details: 1 unit per request
- Video details: 1 unit per request
- Implement caching to reduce API calls
- Add rate limiting
- Store results in database
- Implement proper error handling
- Add API key rotation
The current implementation works in demo mode without an API key, generating realistic data based on artist names. This is perfect for showcasing the functionality during interviews while avoiding API costs and setup complexity.