How to get information in the information window of Wikipedia articles using Wikipedia api?

I am trying to get the name of a lead actor from a Wikipedia article.

I tried different values ​​for prop, prop = info seems to be the most relevant. But this does not contain information in the information window of the Wikipedia article.

Cm:

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 infoboxes using the Wikipedia API?

0
source share
1 answer

MediaWiki API does not understand infobox. So you have basically two options:

  • Disassemble the infobox yourself. You can either analyze wikitext directly or the generated HTML table (both are accessible from the API).
  • Let someone else understand. This is exactly what DBPedia does. Wikidata is trying to do something similar, but probably will not contain enough data for long-term use; see growth statistics .
+2
source

Source: https://habr.com/ru/post/1333522/


All Articles