newsapi-python
An unofficial Python client for the News API
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-pythonuv
uv add newsapi-pythonpoetry
poetry add newsapi-pythonInstalling 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
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
eventregistryQuery news articles and events from Event…
permissive · top 15,000 on PyPI
gnewsGNews searches Google News RSS feeds and…
permissive · top 15,000 on PyPI
asknewsPython SDK for the AskNews API that retrieves…
permissive · top 15,000 on PyPI
coreapiA Python client library for interacting with…
permissive · top 5,000 on PyPI
spotifyaioAsynchronous Python client for fetching data…
permissive · top 15,000 on PyPI
brave-search-python-clientA Python client library for the Brave Search…
permissive · top 15,000 on PyPI
brave-searchWrapper for the Brave Search API that provides…
unclear · top 15,000 on PyPI
pagerdutyLightweight Python client library for…
unclear · top 5,000 on PyPI
newspaper4kExtracts article text, metadata, and images…
permissive · top 15,000 on PyPI
URLObjectURLObject provides a utility class for parsing,…
permissive · top 15,000 on PyPI