Wikipedia API: how to search for a term in a specific category

It is difficult for me to find the main task: how to find a term limited in a certain category.

I feel the wiki API documentation is a bit confused ...

I would just like to receive a JSON file with all the sentences related to this term as an output

ex. I am looking for a matrix, a category of films, so I can get Matrix 1, Matrix 2, etc., Excluding math results, etc.

thanks

+7
source share
2 answers

I feel your brother’s pain, I’ll try something like:

http://en.wikipedia.org/w/api.php?action=query&list=search&format=jsonfm&srsearch=matrix+incategory:English-language_films

Change the above format from jsonfm to json for real json output.

+13
source

You cannot tell the API to, unfortunately, return articles from a category that meets certain criteria. However, you can tell the API to return articles in a specific category, such as the 1990s science fiction , and then use a different programming language such as PHP or JavaScript to return articles matching your specified criteria.

+3
source

All Articles