Reuters Private API
A small Python client and API map for Reuters' public mobile JSON endpoints.
Features - Installation - Quick Start - API - API Notes - Development
This repository turns the Reuters Android API mapping work into a minimal Python package. It can read public section pages, follow the mobile "fetch more" pagination flow, and fetch public article details while keeping the original JSON payload available for callers that need fields beyond the typed dataclasses.
Features
- Iterate Reuters category and section article summaries from paths such as
/world/americas/. - Optionally follow category pagination through Reuters'
fetch_moreendpoint. - Fetch public article detail payloads, including authors, timing metadata, and body content elements.
- Return frozen dataclasses with common fields plus the raw Reuters JSON.
- Include API mapping notes for mobile REST, GraphQL/identity behavior, and the Android widget feed.
Installation
Requires Python 3.9 or newer.
python -m pip install reuters-private-api
For local development, use an editable install:
python -m venv .venv
source .venv/bin/activate
python -m pip install -e .
Quick Start
from itertools import islice
from reuters_private_api import ReutersClient
client = ReutersClient()
summaries = list(islice(client.iter_articles("/world/americas/", load_more=True), 10))
for summary in summaries:
print(summary.display_time, summary.title)
print(summary.url)
article = client.get_article(summaries[0].url)
print(article.title)
print(article.read_minutes)
for element in article.content_elements:
print(element.get("type"), element.get("content"))
API
ReutersClient(timeout=30, client=None)
Creates an HTTP client configured for Reuters' public JSON endpoints. You can pass your own httpx.Client to control retries, proxies, custom transports, or shared connection pooling.
iter_articles(category_path, load_more=False)
Yields ArticleSummary objects for a Reuters category path.
for article in client.iter_articles("/world/", load_more=True):
print(article.id, article.title)
When load_more=True, the client follows the Reuters category pagination endpoint until Reuters returns an empty page. Results are de-duplicated by article ID.
get_article(article_path)
Fetches one public article detail payload and returns an Article.
summary = next(client.iter_articles("/business/"))
article = client.get_article(summary.url)
Data Models
| Type | Fields |
|---|---|
ArticleSummary |
id, url, title, description, display_time, section, section_url, authors, thumbnail, raw |
Article |
id, url, title, description, display_time, published_time, updated_time, word_count, read_minutes, authors, content_elements, raw |
API Notes
The detailed mapping is in docs/apis:
mobile-rest.mdcovers the public mobile JSON endpoints, category pagination, article detail responses, menu/config routes, markets quotes, and geo helper.graphql-identity.mddocuments the observed GraphQL transport, public search/feed behavior, authenticated-field boundaries, and embedded operation inventory.native-widget.mddescribes the Android widget feed and parsing behavior.
Development
The package is intentionally small: reuters_private_api/client.py contains the HTTP behavior, and reuters_private_api/types.py contains the dataclasses.
Run a quick syntax check with:
python -m compileall reuters_private_api
Metadata
Release files for reuters-private-api 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| reuters_private_api-0.1.0.tar.gz | 5.8 kB | Without provenance | Details for reuters_private_api-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| reuters_private_api-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for reuters_private_api-0.1.0-py3-none-any.whl |
Total release size: 12.3 kB
Release files / reuters_private_api-0.1.0.tar.gz
| Download URL | reuters_private_api-0.1.0.tar.gz |
|---|---|
| Size | 5.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e20e9edf6d78f19f7b38a8b743adef7433f0da5e70fc6b8e10e87246f0940848
|
|
BLAKE2b-256 checksum How to use checksums |
1e6f5b617450a20c5ec530ef3164230458f72e5fe6eb8c49bd69dc4d863b7b5f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.9
|
Release files / reuters_private_api-0.1.0-py3-none-any.whl
| Download URL | reuters_private_api-0.1.0-py3-none-any.whl |
|---|---|
| Size | 6.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
23610dfbf671f980c6946b7c703db2fcbfa8be742deb22a874b87ad6c7cb60fa
|
|
BLAKE2b-256 checksum How to use checksums |
d3f8f89469be76ab49324d5b0c20040cadb6d64dfd50cd79c900aee19dcd8f26
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.9
|
Security for reuters-private-api 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.