This guide explains how to set up API keys for the enhanced person search functionality.
The person search works great out of the box with free APIs:
- β DuckDuckGo API - Instant answers, definitions, related topics
- β Wikipedia API - Encyclopedia information
Just run:
pip install -r requirements.txt
python unified_app.pyFor news articles about people, you can add the News API:
- Go to NewsAPI.org
- Sign up for a free account
- Copy your API key from the dashboard
Option A: Use the setup script (Recommended)
python setup_api_keys.pyOption B: Manual setup
# Create .env file
echo "NEWS_API_KEY=your_api_key_here" > .env
# Or set environment variable
export NEWS_API_KEY="your_api_key_here"- Free tier: 1,000 requests per day
- Rate limit: 1 request per second
- Perfect for: Personal use and testing
Test all APIs:
python test_search_api.pyTest the Flask API endpoint:
# Start the app
python unified_app.py
# Test in another terminal
curl "http://localhost:5000/api/search?q=John%20Smith"- This is normal for some queries
- The system gracefully handles API failures
- Manual search links are always provided as fallback
- Check your API key is correct
- Verify you haven't exceeded rate limits
- News API free tier has daily limits
- Check your internet connection
- Some APIs may be temporarily unavailable
- The system will continue working with available APIs
| API | Free | Provides | Rate Limits |
|---|---|---|---|
| DuckDuckGo | β | Instant answers, definitions, related topics | None |
| Wikipedia | β | Encyclopedia articles, summaries | None |
| News API | β * | Recent news articles | 1,000/day |
*Requires free account
- Start without API keys - The system works great with just free APIs
- Add News API later - Only if you want news articles
- Monitor usage - News API has daily limits
- Use fallback links - Manual search links always available
- Check the test script:
python test_search_api.py - Use the setup script:
python setup_api_keys.py - Test individual APIs in the Flask app:
/api/search?q=test