Search articles
curl --request GET \
--url https://api.bonai.io/news/search \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.bonai.io/news/search"
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/news/search', 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/search"
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/news/search \
--header 'Authorization: Bearer <token>'{
"status": "ok",
"totalResults": 123,
"articles": [
{
"title": "<string>",
"url": "<string>",
"published_date": "<string>",
"publisher": {
"name": "<string>",
"url": "<string>",
"favicon": "<string>"
},
"keywords": [
"<string>"
],
"author": [
"<string>"
],
"description": "<string>",
"thumbnail": "<string>"
}
]
}{
"status": "error",
"code": 123,
"message": "<string>"
}{
"status": "error",
"code": 123,
"message": "<string>"
}API Reference
Search articles
Search for news articles with various filters. This is the v1 search endpoint.
GET
/
search
Search articles
curl --request GET \
--url https://api.bonai.io/news/search \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.bonai.io/news/search"
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/news/search', 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/search"
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/news/search \
--header 'Authorization: Bearer <token>'{
"status": "ok",
"totalResults": 123,
"articles": [
{
"title": "<string>",
"url": "<string>",
"published_date": "<string>",
"publisher": {
"name": "<string>",
"url": "<string>",
"favicon": "<string>"
},
"keywords": [
"<string>"
],
"author": [
"<string>"
],
"description": "<string>",
"thumbnail": "<string>"
}
]
}{
"status": "error",
"code": 123,
"message": "<string>"
}{
"status": "error",
"code": 123,
"message": "<string>"
}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-08-01).
Available options:
2026-08-01, 2024-01-01, 2022-01-01 Query Parameters
Search query string
Minimum string length:
1Country code (e.g., 'us', 'uk')
Language code (e.g., 'en', 'es')
Number of results per page
Required range:
1 <= x <= 100Start date for date range filter
End date for date range filter
Publisher URL to filter by
Sort order
Response
Successful response
Example:
"ok"
Total number of matching items
Hide child attributes
Hide child attributes
Publish date
Was this page helpful?