News Sentiment Analyzer
Track news sentiment for any topic, brand, or company. Fetches headlines from Google News RSS and analyzes overall sentiment, key themes, and media bias with Claude AI. No news API key required.
Download from GitHub
Free and open source. Google News RSS requires no API key - just run it with a topic.
View on GitHub →What it does
Fetches recent headlines for any search topic from Google News RSS (no API key needed), then sends them to Claude AI for sentiment analysis. You get an overall sentiment score (−1.0 to +1.0), a breakdown of positive vs. negative angles, key themes across coverage, and notes on how different outlets cover the topic differently.
Features
- Fetch headlines from Google News RSS - no API key needed
- Overall sentiment score and classification
- Per-article sentiment labels
- Key themes across coverage
- Positive vs. negative angle breakdown
- Media bias observation across sources
- Export to Markdown, HTML (visual meter), or JSON
Quick start
git clone https://github.com/Get-Ai-Tools/news-sentiment-analyzer cd news-sentiment-analyzer pip install -r requirements.txt # Analyze sentiment for a topic python analyzer.py --api-key sk-ant-... --topic "Tesla" # Last 7 days, HTML output with sentiment meter python analyzer.py --api-key sk-ant-... --topic "Bitcoin" --days 7 --output html # Analyze your own headlines python analyzer.py --api-key sk-ant-... --headlines my-headlines.txt
Use cases
- Brand monitoring - track press coverage sentiment for your company
- Investment research - gauge media sentiment on stocks before earnings
- Competitive analysis - compare how competitors are covered
- Content strategy - find positive angles in your niche to amplify
Requirements
- Python 3.8+
requests,anthropic(auto-installed)- Claude API key - get one free at console.anthropic.com
Does this require a Google News API key?
No. It uses Google News RSS which is freely available without any API key or account. A Claude API key is required for the AI sentiment analysis.
How accurate is the sentiment analysis?
Claude AI is excellent at understanding nuanced sentiment in news headlines and articles. It goes beyond simple positive/negative to identify the specific angles and frames used in coverage.