Skip to main content

nos-private-api

Python client and notes for the NOS Android app API

Python Status HTTPX

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.

[!IMPORTANT] This project targets an unofficial private API. Endpoints, response shapes, and header requirements can change without notice.

Features

  • Generate the app-style X-NOS header automatically.
  • Fetch paginated item feeds with category, subcategory, type, and before filters.
  • 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 .raw for 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)"

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nos_private_api-0.1.0.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nos_private_api-0.1.0-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file nos_private_api-0.1.0.tar.gz.

File metadata

  • Download URL: nos_private_api-0.1.0.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.9

File hashes

Hashes for nos_private_api-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8a1cc13f7e9aa62edf5c014d380fad46c8f4289dc3979f418d489116218de737
MD5 b4b1f8e88c6aa9bd0efd4fec54c489d3
BLAKE2b-256 6b6cf55bff249d76de474326e1288e4b35fbf84d18aa39658e5809ec1b7cb21e

See more details on using hashes here.

File details

Details for the file nos_private_api-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for nos_private_api-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5d10ee6509a514c62eb4eb2ae0a31bf52b83efbcaa829d7b9569d14a73f5b0be
MD5 78622245c0d749f571da59e87904ef7e
BLAKE2b-256 34780676b16e97bbb753fdd688c0c40ca9a197b100f39a2c47768821fe283318

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page