I have used LINQ-to-Wiki to get pages from Wikipedia to my ASP.NET MVC webapplication.I have used the below query to get Pages having title like "India".
var wikipedia = new Wiki("Example");
var data = wikipedia.Query.allpages()
.Where(i => i.prefix == "India")
.ToList();
But it gives all pages related to "India" not only Places/Cities.How to get only Places/Cities from this query?Or how to search a place by 'categorymembers' property.Can anyone please help?
Check out this other SO answer: Wikipedia API - is there a general 'music' category?.
Wikipedia's OpenSearch implementation does not support categories in the search text.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With