nos-private-api
Python client and notes for the NOS Android app API
Features - Installation - Usage - API map
nos-private-api is a small Python package for reading NOS app content through the same first-party endpoints used by the Android app. It includes a typed client for article feeds and item details, plus reverse-engineered API notes in docs/apis.
Features
- Generate the app-style
X-NOSheader automatically. - Fetch paginated item feeds with category, subcategory, type, and
beforefilters. - Fetch full article details by item ID.
- Parse item summaries, articles, images, videos, links, tags, and categories into dataclasses.
- Keep the original API payload available on
.rawfor fields that are not modeled yet.
Installation
Install from the repository root:
python -m pip install .
For local development:
python -m pip install -e .
Usage
List news articles
from nos_private_api import NosClient
client = NosClient()
page = client.list_items(
main_categories="nieuws",
types="article",
)
for item in page.items:
print(item.id, item.title)
Fetch an article
article = client.get_item(page.items[0].id)
print(article.title)
print(article.published_at)
print(article.text)
for image in article.images:
print(image.description, image.best_url(width=800, ratio="16:9"))
for video in article.videos:
print(video.title, video.best_url())
for link in article.links:
print(link.title, link.url)
Filter by subcategory
page = client.list_items(
main_categories="nieuws",
sub_categories="politiek",
types="article",
)
Common news subcategories include binnenland, buitenland, cultuur-en-media, economie, koningshuis, opmerkelijk, politiek, and tech.
Follow pagination
page = client.list_items(main_categories="nieuws")
while page.links.next:
page = client.list_items(url=page.links.next)
for item in page.items:
print(item.id, item.title)
API map
The docs/apis directory documents the Android API research behind the client:
| Area | Notes |
|---|---|
auth.md |
Timestamp endpoint and X-NOS header format |
nos-content.md |
Items, pages, search, live, weather, soccer, and widget endpoints |
recommendations.md |
Content-based and collaborative recommendation endpoints |
region-and-third-party.md |
Regional broadcaster APIs and NPO telemetry endpoints |
Development
This package uses setuptools and depends on httpx.
python -m pip install -e .
python -c "from nos_private_api import NosClient; print(NosClient.BASE_URL)"
Metadata
Release files for nos-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 |
|---|---|---|---|---|
| nos_private_api-0.1.0.tar.gz | 7.8 kB | Without provenance | Details for nos_private_api-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nos_private_api-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for nos_private_api-0.1.0-py3-none-any.whl |
Total release size: 16.0 kB
Release files / nos_private_api-0.1.0.tar.gz
| Download URL | nos_private_api-0.1.0.tar.gz |
|---|---|
| Size | 7.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8a1cc13f7e9aa62edf5c014d380fad46c8f4289dc3979f418d489116218de737
|
|
BLAKE2b-256 checksum How to use checksums |
6b6cf55bff249d76de474326e1288e4b35fbf84d18aa39658e5809ec1b7cb21e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.9
|
Release files / nos_private_api-0.1.0-py3-none-any.whl
| Download URL | nos_private_api-0.1.0-py3-none-any.whl |
|---|---|
| Size | 8.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5d10ee6509a514c62eb4eb2ae0a31bf52b83efbcaa829d7b9569d14a73f5b0be
|
|
BLAKE2b-256 checksum How to use checksums |
34780676b16e97bbb753fdd688c0c40ca9a197b100f39a2c47768821fe283318
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.9
|
Security for nos-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.