Quick Guide to Searching
Learn the basics of searching with the Bonai News API: query syntax, filters, and result formatting.
Basic Search
The simplest way to search for news is with a keyword query.
curl -X GET "https://api.bonai.io/news/search/articles?query=artificial+intelligence" \
-H "api-key: YOUR_API_KEY" \
-H "api-version: 2026-08-01"
This returns articles matching the keyword “artificial intelligence” across all sources and languages.
Filtering by Language
Add the language parameter to get results in a specific language.
curl -X GET "https://api.bonai.io/news/search/articles?query=climate+change&language=en" \
-H "api-key: YOUR_API_KEY" \
-H "api-version: 2026-08-01"
Supported language codes include en (English), es (Spanish), fr (French), de (German), ja (Japanese), and more.
Filtering by Country
Use the country parameter to get news from a specific market.
curl -X GET "https://api.bonai.io/news/search/articles?query=elections&country=us&language=en" \
-H "api-key: YOUR_API_KEY" \
-H "api-version: 2026-08-01"
Filtering by Date Range
Use from and to parameters to get articles published within a specific time period.
curl -X GET "https://api.bonai.io/news/search/articles?query=stock+market&from=2025-07-01&to=2025-07-21" \
-H "api-key: YOUR_API_KEY" \
-H "api-version: 2026-08-01"
Trending Topics
Get the most-discussed stories right now with the trending endpoint.
curl -X GET "https://api.bonai.io/news/trendings?topic=technology&country=us&language=en" \
-H "api-key: YOUR_API_KEY" \
-H "api-version: 2026-08-01"
Publisher Lookup
Find all articles from a specific news source.
curl -X GET "https://api.bonai.io/news/search/publishers?query=Reuters" \
-H "api-key: YOUR_API_KEY" \
-H "api-version: 2026-08-01"
Full Article Text
Get the complete body text of a specific article by its URL.
curl -X GET "https://api.bonai.io/news/article?url=https://example.com/article" \
-H "api-key: YOUR_API_KEY" \
-H "api-version: 2026-08-01"
Query Tips
- Use specific keywords for better results
- Combine filters to narrow down results
- Use the
limitparameter to control page size - Use the
pageparameter to navigate through results