News topics
curl --request GET \
--url https://api.bonai.io/google-news/topics \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.bonai.io/google-news/topics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.bonai.io/google-news/topics', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.bonai.io/google-news/topics"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}curl --request GET \
--url https://api.bonai.io/google-news/topics \
--header 'Authorization: Bearer <token>'{
"metadata": {
"id": "<string>",
"took_ms": 123,
"timestamp": "2023-11-07T05:31:56Z"
},
"errors": [
{
"code": "INVALID_PARAMETER",
"message": "<string>",
"details": {}
}
]
}{
"metadata": {
"id": "<string>",
"took_ms": 123,
"timestamp": "2023-11-07T05:31:56Z"
},
"errors": [
{
"code": "INVALID_PARAMETER",
"message": "<string>",
"details": {}
}
]
}{
"metadata": {
"id": "<string>",
"took_ms": 123,
"timestamp": "2023-11-07T05:31:56Z"
},
"errors": [
{
"code": "INVALID_PARAMETER",
"message": "<string>",
"details": {}
}
]
}{
"metadata": {
"id": "<string>",
"took_ms": 123,
"timestamp": "2023-11-07T05:31:56Z"
},
"errors": [
{
"code": "INVALID_PARAMETER",
"message": "<string>",
"details": {}
}
]
}{
"metadata": {
"id": "<string>",
"took_ms": 123,
"timestamp": "2023-11-07T05:31:56Z"
},
"errors": [
{
"code": "INVALID_PARAMETER",
"message": "<string>",
"details": {}
}
]
}{
"metadata": {
"id": "<string>",
"took_ms": 123,
"timestamp": "2023-11-07T05:31:56Z"
},
"errors": [
{
"code": "INVALID_PARAMETER",
"message": "<string>",
"details": {}
}
]
}{
"metadata": {
"id": "<string>",
"took_ms": 123,
"timestamp": "2023-11-07T05:31:56Z"
},
"errors": [
{
"code": "INVALID_PARAMETER",
"message": "<string>",
"details": {}
}
]
}API Reference
News topics
GET
/
topics
News topics
curl --request GET \
--url https://api.bonai.io/google-news/topics \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.bonai.io/google-news/topics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.bonai.io/google-news/topics', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.bonai.io/google-news/topics"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}curl --request GET \
--url https://api.bonai.io/google-news/topics \
--header 'Authorization: Bearer <token>'{
"metadata": {
"id": "<string>",
"took_ms": 123,
"timestamp": "2023-11-07T05:31:56Z"
},
"errors": [
{
"code": "INVALID_PARAMETER",
"message": "<string>",
"details": {}
}
]
}{
"metadata": {
"id": "<string>",
"took_ms": 123,
"timestamp": "2023-11-07T05:31:56Z"
},
"errors": [
{
"code": "INVALID_PARAMETER",
"message": "<string>",
"details": {}
}
]
}{
"metadata": {
"id": "<string>",
"took_ms": 123,
"timestamp": "2023-11-07T05:31:56Z"
},
"errors": [
{
"code": "INVALID_PARAMETER",
"message": "<string>",
"details": {}
}
]
}{
"metadata": {
"id": "<string>",
"took_ms": 123,
"timestamp": "2023-11-07T05:31:56Z"
},
"errors": [
{
"code": "INVALID_PARAMETER",
"message": "<string>",
"details": {}
}
]
}{
"metadata": {
"id": "<string>",
"took_ms": 123,
"timestamp": "2023-11-07T05:31:56Z"
},
"errors": [
{
"code": "INVALID_PARAMETER",
"message": "<string>",
"details": {}
}
]
}{
"metadata": {
"id": "<string>",
"took_ms": 123,
"timestamp": "2023-11-07T05:31:56Z"
},
"errors": [
{
"code": "INVALID_PARAMETER",
"message": "<string>",
"details": {}
}
]
}{
"metadata": {
"id": "<string>",
"took_ms": 123,
"timestamp": "2023-11-07T05:31:56Z"
},
"errors": [
{
"code": "INVALID_PARAMETER",
"message": "<string>",
"details": {}
}
]
}Authorizations
Your Bonai API key, sent as Authorization: Bearer <key>. The api-key and x-api-key headers are also accepted.
Headers
API version to consume. Defaults to the latest version (2026-05-25).
Available options:
2026-05-25, 2024-01-01, 2022-01-01 Query Parameters
Topic ID (e.g., TECHNOLOGY, BUSINESS or CAAq...)
Subtopic ID (CAAq...)
Response
Successful topic headlines
Was this page helpful?