skillfed

newsapi-python

An unofficial Python client for the News API

newsapi-python v0.2.7 275.2K downloads/30d#8,181 on PyPI504
Permissive license MIT AGING released

What it is and what it does

newsapi-python is an unofficial Python wrapper around the News API service, allowing you to query news articles and sources programmatically. It provides three main methods—get_top_headlines(), get_everything(), and get_sources()—that map to the News API's REST endpoints, abstracting away HTTP details and response parsing. The library depends only on requests, making it lightweight and easy to integrate into news aggregation, content curation, or research workflows.

The package is stable and permissively licensed, but has been aging since its last release in 2023-03-02. It supports both Python 2 and Python 3, and the repository remains unarchived. Use it when you need straightforward programmatic access to News API data without building raw HTTP calls yourself, but be aware that active maintenance has stalled.

Use it for:

  • Build a news aggregation dashboard that pulls top headlines from multiple sources and displays them in real time.
  • Search for articles on a specific topic and retrieve results for analysis or archival.
  • Populate a content feed or chatbot with current news articles from curated news sources.
  • Automate daily news briefing reports by querying headlines and sending summaries via email.
  • Research trending news by querying the News API's everything endpoint with custom filters.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

A Python client library that wraps the News API, providing methods to query top headlines, search articles, and list news sources via simple function calls.

Yes, if you need a simple Python wrapper for News API and are comfortable with a package that is no longer actively maintained. The library is stable, has low install friction, carries no known vulnerabilities, and is permissively licensed. However, if you require ongoing support or bug fixes, consider checking whether a more recently maintained wrapper exists.

Install

newsapi-python on PyPI

pip

pip install newsapi-python

uv

uv add newsapi-python

poetry

poetry add newsapi-python

Installing newsapi-python

Before you install

Installation is straightforward with low friction—a pure-Python wheel with only requests as a runtime dependency. However, the package is aging: last release was 2023-03-02 and maintenance status is aging. Suitable for stable use cases but not actively maintained.

License in practice

Licensed under MIT (permissive), so you may use, modify, and distribute the package freely in commercial or private projects with minimal restrictions, provided you retain the license notice.

Quickstart

pip install newsapi-python

from newsapi import NewsApiClient

api = NewsApiClient(api_key='YOUR_API_KEY')
api.get_top_headlines(sources='bbc-news')

Requires a valid News API key from https://newsapi.org/ to make requests; the package itself does not provide one.

Verify before relying

  • Whether the package's Python 2 support (2.6, 2.7) and older Python 3 versions (3.3–3.5) remain functional given modern dependency versions.
  • Current compatibility with the News API V2 specification and whether all documented endpoints are fully supported.
  • Performance and rate-limiting behavior under high-volume or concurrent request scenarios.

Package facts

License MIT (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 1 — requests
Maintenance aging — 1,261 days since the last release
Last repo commit
First released
Downloads 275,226/month — #8,181 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: newsapi_python-0.2.7-py2.py3-none-any.whl

Keywords: newsapi, news

Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: Financial and Insurance IndustryIntended Audience :: Information TechnologyLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 2Programming Language :: Python :: 2.6Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Topic :: Software Development :: Libraries :: Python Modules

Tags

news api python clientfetch news articles programmaticallyquery headlines by topicnews aggregation api wrappersearch news sourcesnews data retrieval library
news-aggregationapi-clientrest-wrapper

More Python Modules packages