问题
I'm looking for some callable way to get information about famous people and celebrities. Given a string, I'd like to determine if it's the name of a famous person, and if so, if they're alive and perhaps what category they fall into (e.g. Actor, Musician, Athlete).
Does anyone know of any publicly available APIs to do such a thing? The best I can come up with is Wikipedia, but it's pretty problematic because much of the info must be parsed, and isn't in a reliable and predictable format.
I'd also like to be able to offer suggestions for possible names when the initial search turns up nothing (since the strings will be from people and may contain misspellings).
回答1:
Try DBpedia, the "preparsed" (RDF) version of Wikipedia. It can be queried using SPARQL. It includes much of the info in the English-language Wikipedia.
回答2:
Try the Wikipedia API:
http://en.wikipedia.org/wiki/Wikipedia:Creating_a_bot#APIs%5Ffor%5Fbots
It appears there's also an API for IMDB: http://www.deanclatworthy.com/imdb/
来源:https://stackoverflow.com/questions/5872326/api-to-retrieve-info-about-famous-people