Skip to content

News Search

Example showing how to search for news articles.

This example assumes using BraveSearch; is in scope and apiKey contains your BraveSearch API key.

1
2
3
4
5
6
7
8
using var client = new BraveSearchClient(apiKey);

// Search for recent news
var response = await client.NewsSearchAsync(
    q: "artificial intelligence",
    count: 5);

var firstResult = response.Results[0];