I'm working on a PHP project where I create a more readable version of a text transcript for a judicial inquiry, and one thing I'd really like to do is have photos depicting each speaker.
Some of them are public figures (I.e., well-known UK judges and lawyers; UK politicians), others are journalists, some are celebrities.
It seems like Wikipedia is the best thing to use for this (I may be wrong, however), however, I'm really unfamiliar with the MediaWiki API.
So, my questions:
- Is Wikipedia the best thing to use for this task? Or is there a database of headshots somewhere with a very wide variety of subjects? If the latter, where's its API documentation?
- If Wikipedia, what API call would I use for fetching an article's main image URL?
- Lastly, how would I translate a string like "SIR PAUL STEPHENSON" to how it's listed in Wikipedia, i.e., "Paul_Stephenson_(police_officer)"
Note that I'm aware special cases will come up where no photo on Wikipedia exists or there needs to be disambiguation -- I'm quite aware I'll have to deal with those on a per-case basis.
Thanks!