> ## 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.

# Quickstart

> Make your first request to the Bonai News API

This guide gets you from zero to your first Bonai News API request. You'll need an API key from the [Bonai console](https://console.bonai.io). See [getting started](/getting-started) if you don't have one yet.

## Search for articles

The `GET /search/articles` endpoint is the fastest way to get results:

```bash theme={null}
curl --request GET \
  --url "https://api.bonai.io/news/search/articles?query=technology" \
  --header "api-key: YOUR_API_KEY"
```

The response is paginated:

```json theme={null}
{
  "success": true,
  "size": 10,
  "totalHits": 12843,
  "hitsPerPage": 10,
  "page": 1,
  "totalPages": 1285,
  "timeMs": 42,
  "data": [
    {
      "title": "Example article title",
      "url": "https://example.com/article",
      "excerpt": "A short description of the article.",
      "thumbnail": "https://example.com/image.jpg",
      "language": "en",
      "paywall": false,
      "contentLength": 4821,
      "date": "2026-07-30T09:00:00+00:00",
      "authors": ["Jane Doe"],
      "keywords": ["technology"],
      "publisher": {
        "name": "Example Publishing",
        "url": "https://example.com",
        "favicon": "https://example.com/favicon.ico"
      }
    }
  ]
}
```

## Refine your search

Add filters to narrow results:

```bash theme={null}
curl --request GET \
  --url "https://api.bonai.io/news/search/articles?query=ai&language=en&country=us&sort=date&limit=20" \
  --header "api-key: YOUR_API_KEY"
```

* `query` (required): the search text.
* `language`: ISO language code, for example `en`.
* `country`: country code, for example `us`.
* `publisher`: filter by a publisher's URL.
* `paywall`: filter by paywall status (`true` or `false`).
* `from` / `to`: date range for published articles.
* `sort`: `relevance` or `date`.
* `page` / `limit`: pagination. `limit` defaults to 25 and is capped by your plan.

## Get trending articles

```bash theme={null}
curl --request GET \
  --url "https://api.bonai.io/news/trendings?topic=technology&language=en&country=us" \
  --header "api-key: YOUR_API_KEY"
```

## Next steps

* Explore all endpoints in the [API Reference](/openapi/bonai-news-api.json).
* Understand [rate limits](/news-api/rate-limits) and [errors](/news-api/errors).
