I have the following Wikipedia API search query:
http://en.wikipedia.org/w/api.php?&action=query&generator=search&gsrnamespace=0&gsrlimit=20&prop=pag
There is two urls to search famous peoples :
https://en.wikipedia.org/w/api.php?action=query&generator=search&format=json&exintro&exsentences=1&exlimit=max&gsrlimit=20&gsrsearch=hastemplate:Birth_date_and_age+Melanie_laurent&pithumbsize=100&pilimit=max&prop=pageimages%7Cextracts
https://en.wikipedia.org/w/api.php?action=query&generator=search&format=json&exintro&exsentences=1&exlimit=max&gsrlimit=20&gsrsearch=hastemplate:Birth_date+Melanie_laurent&pithumbsize=100&pilimit=max&prop=pageimages%7Cextracts
The only difference between both url is gsrsearch
parameter :
To get people alive you have to use hastemplate:Birth_date_and_age
To get dead people you have to use hastemplate:Birth_date
In my case, i have to do two requests.
In this example url, juste replace Melanie_laurent
by your query.