Skip to content

Genbox/Wikipedia

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wikipedia - An implementation of the full text search API of Wikipedia

NuGet Build Release License

Features

  • Support for all 283 languages on Wikipedia
  • Support for all search parameters as of MediaWiki v1.24

Example

Here is the simplest way of getting data from Wikipedia:

static async Task Main()
{
    using WikipediaClient client = new WikipediaClient();
    
    WikiSearchRequest req = new WikiSearchRequest("Albert Einstein");
    req.Limit = 5; //We would like 5 results
    
    WikiSearchResponse resp = await client.SearchAsync(req);
    
    foreach (SearchResult s in resp.QueryResult.SearchResults)
    {
        Console.WriteLine($" - {s.Title}");
    }
}

Output:

 - Albert Einstein
 - Hans Albert Einstein
 - Einstein family
 - Albert Brooks
 - Albert Einstein College of Medicine

About

A C# API for searching on Wikipedia

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages