AI News Fetcher is a Django-based web application that fetches and displays articles related to "Artificial Intelligence" using Google Search API and NewsAPI. This project demonstrates the integration of multiple APIs within a Django framework to provide a seamless user experience for accessing the latest AI news.
- Python 3.x
- Django 3.x or higher
- Git
git clone https://github.com/yourusername/ai-news-aggregator.git cd ai-news-aggregator
python3 -m venv env
source env/bin/activate # On Windows use env\Scripts\activate
pip install -r requirements.txt
- GOOGLE_API_KEY=your_google_api_key
- GOOGLE_CX=your_google_cx
- NEWSAPI_KEY=your_newsapi_key
python manage.py migrate
python manage.py runserver
The Google Search API is used to fetch articles related to “Artificial Intelligence” from across the web. The API returns search results, including titles, descriptions, URLs, publishers, and images. To use this API, you need:
• An API key
• A custom search engine ID (CX)
Refer to the Google Custom Search JSON API documentation for more details.
NewsAPI is used to fetch the latest news articles related to “Artificial Intelligence” from various news sources. The API provides article titles, descriptions, URLs, authors, and images. To use this API, you need an API key.
Refer to the NewsAPI documentation for more details.
To navigate through pages, use the “Previous Page” and “Next Page” links at the bottom of the page.