If I search for "George Bush"
manually on wikipedia I'll get this page which lists homonyms with short descriptions.
I would like to feed my search to an api and get the following info :
- George H. W. Bush
- George W. Bush
- George Bush (biblical scholar)
- George Bush (footballer)
- George Bush (racing driver)
- George P. Bush
- George Washington Bush
I don't mind getting more as long as I can unambiguously parse it.
My goal is to have a website's users able to tag a public person, but I want to restrict their choices and avoid ambiguities, so this list could be slightly different, any other decent database with an api would do.
I haven't figured out how to do it with wikipedia nor wikidata, I just managed to do queries on a specific id/page once I know it, which isn't the case here.
There are a couple of ways to do this, depending on what sort of data you want.
For example - https://en.wikipedia.org/w/api.php?action=query&titles=George%20Bush&prop=links - will tell you if there is a "disambiguation" for that person's name.
That will return:
You can get more data at once using - https://en.wikipedia.org/w/api.php?action=query&utf8=&list=search&srsearch=George%20Bush
That will get you: