Python News App using NewsAPI and GNews API

Build a Python news application that fetches real-time headlines and articles using NewsAPI and GNews API. Get top trending stories by topic or country.
News Application using python

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:

  1. News Mode: Enter a topic (e.g., “technology”, “sports”, “politics”) and get the latest published articles from around the world.

  2. Headlines Mode: Fetch the top headlines for a specific country using its ISO country code (e.g., us for the USA, pk for 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

Project Preview