Capabilities
- Search articles: full-text search across indexed articles with filters for language, country, publisher, paywall status, and date range.
- Search publishers: find news publishers by name, category, country, or language.
- Article content: fetch the full content of a specific article, as plain text or HTML.
- Random articles: retrieve a random article for discovery and demos.
- Trending topics: get the latest trending articles for a topic, language, and country.
Base URL
All requests use theapi.bonai.io/news base URL:
Authentication
Every request exceptGET /ping requires your API key in the api-key header. Keys are product-scoped and created in the Bonai console. See authentication.
Versioning
The API uses header-based versioning with theapi-version header. The latest version is 2024-01-01, which is also the default when the header is omitted. See the API Reference for versioned behavior.
Response format
Successful responses use a consistent envelope:- Paginated results (search, trending):
{ success, size, totalHits, hitsPerPage, page, totalPages, timeMs, data } - Single results (article, info, publishers):
{ success: true, data }
{ success: false, code, message, fields }. See errors.
Next steps
- Quickstart: make your first request.
- API Reference: explore every endpoint interactively.