I would go one step further and suggest people that need structured queries use the Google BigTable API to query their structured Wikipedia data. Granted, their public dataset is from 2010, so is slightly outdated, but you can write structured SQL against all of the wikipedia article metadata and then use the mediawiki api itself to grab only the article text that you're interested in.
The wikipedia data is hosted here: https://bigquery.cloud.google.com/table/publicdata:samples.w...
Here is a sample query, searching for all articles that start with Positive:
SELECT id,title FROM [publicdata:samples.wikipedia] WHERE (REGEXP_MATCH(title,r'^Positive*')) LIMIT 10
Query complete (2.0s elapsed, 9.13 GB processed
Here is the python API documentation: https://developers.google.com/api-client-library/python/