Real-time fact-checking for YouTube videos using AI.
- Chrome Extension - Frontend overlay on YouTube videos
- FastAPI Backend - Processing pipeline with async queues
- AI Services - Whisper, RunPod Deep Cogito v2 70B, ACI, OpenAI
cd backend
pip install -r requirements.txt# Copy the example file
cp env.example .env
# Edit .env with your API keys:
# OPENAI_API_KEY=sk-your-openai-api-key-here
# RUNPOD_API_KEY=your-runpod-api-key-here
# ACI_API_KEY=your-aci-api-key-here# Install FFmpeg (required for yt-dlp audio processing)
brew install ffmpeg # macOS
# sudo apt install ffmpeg # Ubuntu/Debiancd backend
uvicorn main:app --reload --host 0.0.0.0 --port 8000# Health check
curl http://localhost:8000/health
# Process a video
curl "http://localhost:8000/api/process-video?video_url=https://www.youtube.com/watch?v=jNQXAC9IVRw"GET /health- Health checkGET /api/process-video?video_url=URL- Process YouTube video for fact-checking
GET /api/process-video?video_url=https://youtube.com/watch?v=VIDEO_ID
{
"video_id": "VIDEO_ID",
"title": "Processed Video",
"total_claims": 1,
"claim_responses": [
{
"claim": {
"start": 0.0,
"claim": "factual claim text"
},
"status": "verified|false|disputed|inconclusive",
"written_summary": "Detailed explanation of fact-check result...",
"evidence": [
{
"source_url": "https://example.com",
"source_title": "Source Title",
"snippet": "Evidence excerpt..."
}
]
}
]
}We created interfaces.
Once you have the backend app running, you'll need to unpack the Chrome extension
- Go to Chrome, navigate the manu towards
Extensionsand thenManage Extensions - Switch on the
Developer modetoggle - Click on
Load unpackedand unpack the chrome-extension in the frontend project directory:Stockholm-Hackathon/frontend/public/chrome-extension - You'll then see
YouTube Fact-Checkerextension. Re-open your browser. - Go to Youtube, play a video, then click on the liquid-glass circle in the upper-right corner to activate fact checking
Once you have the backend app running, you'll need to unpack the Chrome extension
- Go to Chrome, navigate the manu towards
Extensionsand thenManage Extensions - Switch on the
Developer modetoggle - Click on
Load unpackedand unpack the chrome-extension in the frontend project directory:Stockholm-Hackathon/yt-fact-checker-extension - You'll then see
YouTube Fact-Checker (Live)extension. Re-open your browser. - Go to Youtube, play a video, the fact-checker pop-up will be immediately available. Note that it takes a few seconds to start transcribing
Run the backend and frontend in separate terminals.
- Start the backend API (terminal A)
cd backend
uvicorn main:app --reload --host 0.0.0.0 --port 8000- Start the dashboard UI (terminal B)
cd frontend
npm run devThen open http://localhost:3000 in your browser. Paste a YouTube URL, click Analyze, and watch claims and fact‑checks appear when processing completes.
- Transcription - Download audio with yt-dlp → OpenAI Whisper API → Sentences with timestamps
- Claim Extraction - RunPod Deep Cogito v2 70B → Extract factual claims
- Evidence Gathering - ACI + EXA_AI → Find web sources and evidence
- Fact-Checking - OpenAI GPT-4 → Analyze evidence → Return verdict
- FastAPI - Async web framework
- OpenAI Whisper - Audio transcription with timestamps
- RunPod Deep Cogito v2 70B - Advanced claim extraction
- ACI + EXA_AI - Evidence gathering and web search
- OpenAI GPT-4 - Fact-checking analysis
- yt-dlp - YouTube audio download
- Pydantic - Data validation and structured outputs
The backend uses async queues for concurrent processing:
- Sentences are streamed from transcription
- Claims are extracted in real-time
- Fact-checking happens concurrently
- Results are returned as structured JSON
Perfect for hackathon development with clean separation of concerns and production-ready architecture.
$env:PATH += ';C:\ffmpeg\bin'
cd .\backend\
.\venv\Scripts\activate
python -m uvicorn main:app --reload --host 0.0.0.0 --port 8000
