Skip to main content
The Bonai News API is a comprehensive news aggregation and search API. It gives you access to articles, publishers, and trending topics across many languages and countries in a consistent, predictable format.

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 the api.bonai.io/news base URL:

Authentication

Every request except GET /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 the api-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 }
Errors use { success: false, code, message, fields }. See errors.

Next steps