Skip to content

News Search

Shows how to search Google News for recent articles.

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
using var client = new SerperClient(apiKey);

// Search Google News for recent articles on a topic.
var response = await client.NewsSearchAsync(new BaseSearchRequest
{
    Q = "technology startups 2026",
    Num = 5,
});

// The response contains a list of news articles with titles, sources, and dates.

foreach (var article in response.News)
{
    Console.WriteLine($"{article.Title}");
    Console.WriteLine($"    Source: {article.Source}, Date: {article.Date}");
    Console.WriteLine($"    {article.Link}");
}