Supported topics
curl --request GET \
--url https://api.bonai.io/news/info/topics \
--header 'api-key: <api-key>'import requests
url = "https://api.bonai.io/news/info/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/news/info/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/news/info/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/news/info/topics \
--header 'api-key: <api-key>'{
"success": true,
"data": [
{
"id": "<string>",
"name": "<string>",
"allowed": true,
"subtopics": [
{
"id": "<string>",
"name": "<string>",
"allowed": true
}
]
}
]
}{
"success": false,
"code": 123,
"message": "<string>",
"fields": [
{
"name": "<string>",
"type": "<string>",
"description": "<string>"
}
]
}{
"success": false,
"code": 123,
"message": "<string>",
"fields": [
{
"name": "<string>",
"type": "<string>",
"description": "<string>"
}
]
}Info
Supported topics
Returns a list of all available news topics and their subtopics
GET
/
info
/
topics
Supported topics
curl --request GET \
--url https://api.bonai.io/news/info/topics \
--header 'api-key: <api-key>'import requests
url = "https://api.bonai.io/news/info/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/news/info/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/news/info/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/news/info/topics \
--header 'api-key: <api-key>'{
"success": true,
"data": [
{
"id": "<string>",
"name": "<string>",
"allowed": true,
"subtopics": [
{
"id": "<string>",
"name": "<string>",
"allowed": true
}
]
}
]
}{
"success": false,
"code": 123,
"message": "<string>",
"fields": [
{
"name": "<string>",
"type": "<string>",
"description": "<string>"
}
]
}{
"success": false,
"code": 123,
"message": "<string>",
"fields": [
{
"name": "<string>",
"type": "<string>",
"description": "<string>"
}
]
}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 (2024-01-01).
Available options:
2024-01-01 Response
Successful response
Available options:
true Was this page helpful?