Python News App using NewsAPI and GNews API
Built With
Explore the Full Project
Detailed Description
The Python News Application is a simple yet powerful command-line tool that allows users to fetch the latest news and headlines in real-time using the NewsAPI and GNews API.
Users can choose between two modes:
-
News Mode: Enter a topic (e.g., “technology”, “sports”, “politics”) and get the latest published articles from around the world.
-
Headlines Mode: Fetch the top headlines for a specific country using its ISO country code (e.g.,
usfor the USA,pkfor Pakistan).
This project demonstrates how Python interacts with REST APIs, handles JSON data, and presents it in a readable format. It’s perfect for learning about API integration, HTTP requests, and data parsing in real-world applications.
⚙️ Features
-
Fetches real-time news using NewsAPI or GNews API
-
User input for custom topics or country-based headlines
-
Displays up to 10 latest headlines with numbering
-
Clean command-line interface
-
Easy to modify or extend with GUI later
🧠 Technologies Used
-
Python
-
Requests Library (for API communication)
-
NewsAPI & GNews API (for fetching real-time news data)
-
JSON Parsing
