Chakradar Raju
Chakradar Raju

Reputation: 2811

How to get information in info box of Wikipedia articles using Wikipedia api?

I'm trying to get lead actor's name from movie's Wikipedia article.

I tried different values for prop, prop=info seems most relevant. But this doesn't contain the information in info box of Wikipedia article.

See:

http://en.wikipedia.org/w/api.php?action=query&prop=info&titles=Casino_Royale_(2006_film)&format=jsonfm

Is it possible to extract information in infobox using Wikipedia API?

Upvotes: 0

Views: 594

Answers (1)

svick
svick

Reputation: 244757

The MediaWiki API doesn't understand infoboxes. So, you have basically two options:

  1. Parse the infobox yourself. You can either parse the wikitext directly or the generated HTML table (both are available from the API).
  2. Let somebody else do the parsing. This is exactly what DBPedia does. Wikidata tries to do something similar, but it probably won't contain enough data to be usable for a long time; see growth statistics.

Upvotes: 2

Related Questions