Reputation: 2372
I'm trying to implement something similar to query wikipedia like google is doing. To explain better; for example if we search "youtube.com" in google, google displays some information on the right.
But couldn't find the right wikipedia API function to get these details. It's important to search for the website url but not for a general topic like "youtube". Because what I need is exactly to get some details about the website but not for the company only.
I've found a couple of API functions but still couldn't find the right one.
This one for example is returning the original wikipedia link.
https://en.wikipedia.org/w/api.php?action=opensearch&search=**google.com**&limit=1&format=json
The response is:
["google.com",["GOOGLE.com"],[""],["https://en.wikipedia.org/wiki/GOOGLE.com"]]
And this one is not exactly returning what I need and also for some other websites it's just returning different results for different websites.
Any suggestion please.
Upvotes: 0
Views: 272
Reputation: 2372
The solution for me is using 2 APIs. First checking the url exists here;
and if the last node is not empty then;
exsentences is key on this function.
Hope it helps someone else.
Upvotes: 1