News topics
curl --request GET \
--url https://api.bonai.io/google-news/topics \
--header 'api-key: <api-key>'import requests
url = "https://api.bonai.io/google-news/topics"
headers = {"api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'api-key': '<api-key>'}};
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("api-key", "<api-key>")
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 'api-key: <api-key>'{
"metadata": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timestamp": "2023-11-07T05:31:56Z",
"took_ms": 123,
"total_hits": 123
},
"parameters": {},
"news_articles": [
{
"type": "article",
"title": "<string>",
"url": "<string>",
"date": "2023-11-07T05:31:56Z",
"image": "<string>",
"source": {
"name": "<string>",
"url": "<string>",
"favicon": "<string>",
"publication_id": "<string>"
},
"authors": [
"<string>"
]
}
],
"navigation_links": [
{
"name": "<string>",
"topic_id": "<string>"
}
],
"title": "<string>",
"subtopic_links": [
{
"name": "<string>",
"subtopic_id": "<string>"
}
]
}{
"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 'api-key: <api-key>'import requests
url = "https://api.bonai.io/google-news/topics"
headers = {"api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'api-key': '<api-key>'}};
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("api-key", "<api-key>")
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 'api-key: <api-key>'{
"metadata": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timestamp": "2023-11-07T05:31:56Z",
"took_ms": 123,
"total_hits": 123
},
"parameters": {},
"news_articles": [
{
"type": "article",
"title": "<string>",
"url": "<string>",
"date": "2023-11-07T05:31:56Z",
"image": "<string>",
"source": {
"name": "<string>",
"url": "<string>",
"favicon": "<string>",
"publication_id": "<string>"
},
"authors": [
"<string>"
]
}
],
"navigation_links": [
{
"name": "<string>",
"topic_id": "<string>"
}
],
"title": "<string>",
"subtopic_links": [
{
"name": "<string>",
"subtopic_id": "<string>"
}
]
}{
"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": {}
}
]
}Polymorphic response.
news_articles items vary by type — article, story, storyline, or social_post.Authorizations
Your Bonai API key. Create one in the Bonai console (https://console.bonai.io).
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
The query parameters used for this request
Polymorphic list. Each item's type is article, story, storyline, or social_post.
- Option 1
- Option 2
- Option 3
- Option 4
Hide child attributes
Hide child attributes
Available options:
article Was this page helpful?