> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bonai.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> The Bonai News API provides aggregated articles, publishers, and trending topics

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:

```
https://api.bonai.io/news
```

## 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](https://console.bonai.io). See [authentication](/news-api/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](/news-api/errors).

## Next steps

* [Quickstart](/news-api/quickstart): make your first request.
* [API Reference](/openapi/bonai-news-api.json): explore every endpoint interactively.
