Reputation: 9
I want to do an android app and need to get the data from a table of content from wikipedia. I know that there is an API for wikipedia but couldn't find out how to get the data from a toc. On this site is an example of such a toc:
http://de.wikipedia.org/wiki/Liste_der_Tatort-Folgen
What is the best way to get the data? How does such a request look like?
Upvotes: -1
Views: 656
Reputation: 11
What about this query? It returns the first 500 page links. The remaining links can be retrieved by updating the plcontinue parameter.
Unfortunately, there is no way to get a list in chronological order. To achieve that you would have to extract the information directly from Html.
Upvotes: 0
Reputation: 244787
You don't say what data do you actually need, but to retrieve the TOC of a page, you can use action=parse
with prop=sections
. E.g.:
http://de.wikipedia.org/w/api.php?action=parse&page=Liste_der_Tatort-Folgen&prop=sections
Upvotes: 5