I don't know of a Wikipedia-API way to do this, but I can think of a Freebase way. The following freebase query will get you the Freebase "types" associated with a given Wikipedia article. "People", "Politicians", "Artists", "Places", etc -- are all easily recognizable from those types.
{
"key": [{
"namespace": "/wikipedia/en",
"value": "William_Ambrose"
}],
"type": []
}
(Replace en
with the actual Wikipedia language, of course, and "William_Amrose"
with the Wikipedia article name. See my note below on escaping, though!)
The result, in this case, is:
{
"result": {
"type": [
"/common/topic",
"/people/person",
"/people/deceased_person",
"/government/politician"
],
"key": [{
"namespace": "/wikipedia/en",
"value": "William_Ambrose"
}]
}
}
... which clearly means that's a "Person" and a "Politician" (and also a "deceased person" at that, but that's another matter.)
See my answer to get wikipedia linked links for notes on how the API works, and a REST example. Especially, take a good look at the notes for getting API keys from Google and for Freebase-escaping the strings.
Good luck.