nu-private-api
Read-only Python client for discovering and parsing public NU.nl articles.
Overview | Install | Quick Start | API | Development
Overview
nu-private-api wraps the public NU.nl web GraphQL endpoint used by the site
itself. It is intentionally small: give it a section or article URL, get back
article URLs or a parsed article object.
Use it for scripts, experiments, and lightweight content extraction where a full browser is unnecessary.
Features
- Fetch de-duplicated article URLs from public NU.nl section/list pages.
- Fetch and parse public article pages.
- Return normalized article fields: URL, title, description, publish time, modified time, author, and body text.
- Fetch section URLs from NU.nl's section sitemap.
- Bring your own configured
httpx.Clientwhen you need custom timeouts, proxies, headers, or lifecycle control.
Install
python -m pip install nu-private-api
Quick Start
from nu_private_api import NuClient
client = NuClient()
section_urls = client.sitemap_urls()
urls = client.section_by_url(section_urls[0])
article = client.article_by_url(urls[0])
print(article.title)
print(article.author)
print(article.body)
Raw URLs work too:
urls = client.section_by_url("https://www.nu.nl/binnenland")
article = client.article_by_url("https://www.nu.nl/123456/example.html")
Use your own httpx.Client if you want to control connection settings:
import httpx
from nu_private_api import NuClient
with httpx.Client(timeout=10) as http:
client = NuClient(client=http)
article = client.article_by_url("https://www.nu.nl/123456/example.html")
API
NuClient.sitemap_urls(url="https://www.nu.nl/sitemap_sections.xml")
Fetches a sitemap and returns the URLs from its <loc> entries.
from nu_private_api import NuClient
client = NuClient()
section_urls = client.sitemap_urls()
NuClient.section_by_url(url)
Fetches a NU.nl section/list page and returns de-duplicated absolute article URLs.
from nu_private_api import NuClient
client = NuClient()
section_urls = client.sitemap_urls()
urls = client.section_by_url(section_urls[0])
url is a NU.nl section/list URL string.
NuClient.article_by_url(url)
Fetches and parses a public article URL.
article = client.article_by_url(urls[0])
Returns an immutable Article dataclass:
Article(
url="...",
title="...",
description="...",
published_at="...",
modified_at="...",
author="...",
body="...",
)
Notes
- Public article reads do not require cookies or login.
- Video pages and live blogs are not supported.
- The current parser follows the observed NU.nl article shape:
base64 JSON-LD schema,
screenMetadata, and article text blocks. - API research notes live in
docs/apis.
Metadata
Release files for nu-private-api 0.3.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 | |
|---|---|---|---|
| nu_private_api-0.3.0.tar.gz | 5.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nu_private_api-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.7 kB
Release files / nu_private_api-0.3.0.tar.gz
| Download URL | nu_private_api-0.3.0.tar.gz |
|---|---|
| Size | 5.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2035d093913b7627f68fd503e8153eb8a05384c944ad083354e7e61ff4244792
|
|
BLAKE2b-256 checksum How to use checksums |
063d204604a67141927307d5487285048408c2bdf4f2471666fabdbd273de7a8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.7
|
Release files / nu_private_api-0.3.0-py3-none-any.whl
| Download URL | nu_private_api-0.3.0-py3-none-any.whl |
|---|---|
| Size | 6.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e15c36a6144ce3e3b9164c5c47cf01481ddfecdb964fc9eaa6559df8e6e3a9a2
|
|
BLAKE2b-256 checksum How to use checksums |
b556a4334b02175d0beb7cbf380615446e487b2eada0d034086cb9b5b24341c4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.7
|