KontextNews

Quickstart

From zero to your first JSON response.

1. Get an API key

Sign in to the dashboard and create a key. Keys are shown once and stored hashed, so copy it immediately.

kn_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

2. Make your first request

The key goes in the X-API-Key header.

curl "https://api.kontextnews.online/v1/articles?limit=3" \
  -H "X-API-Key: kn_live_..."

Python:

import requests

r = requests.get(
    "https://api.kontextnews.online/v1/search",
    params={"q": "OpenAI", "limit": 5},
    headers={"X-API-Key": "kn_live_..."},
    timeout=15,
)
print(r.json())

JavaScript:

const r = await fetch("https://api.kontextnews.online/v1/search?q=OpenAI&limit=5", {
  headers: { "X-API-Key": "kn_live_..." },
});
console.log(await r.json());

3. Read the response

Search returns one object per matching article, newest-first after relevance and freshness are combined.

{
  "id": "5877259d-f521-4b08-b362-b4e2dd1209aa",
  "title": "To comply with the EU AI Act, OpenAI plans to add text watermarking...",
  "category": "ai",
  "domain": "ai",
  "region": "global",
  "lang": "en",
  "published_at": "2026-10-05T13:55:03+00:00",
  "rank": 0.802
}
Next: read Authentication for key handling and scopes, or jump to the Endpoints reference.