Wikipedia API - is there a general category of "music"?

I have a problem with the Wikipedia API. I use openSearch to get results with links to Wikipedia pages. However, open search does not support + incategory. Moreover, I would like to look for a music performer (bands, solo singer and all other musicians). However, I cannot find a category called "music." Categories are too specific (i.e., musical groups of the 1980s, solo artists, etc.). However, when you look at the wikipedia values ​​page, for example for posterity, you can see this in the music:

http://en.wikipedia.org/wiki/Offspring_%28disambiguation%29

So to summarize:

A) how can I use categories with action = opensearch? I need this action because I need a wikipedia url and I don’t know how to get it differently.

B) how to set up a general category such as "music"?

+1
source share
1 answer

A) It appears that the Wikipedia OpenSearch implementation only searches for prefix pages. Cannot specify categories to view. Instead, you should look for action=query&list=search . Note that you can easily create a Wikipedia URL from the page title by simply percent-encoding and adding it to http://en.wikipedia.org/wiki/ .

B) As you already noted, the Wikipedia categorization system usually avoids broad categories such as “Music” in favor of more specific hierarchies. It is currently not possible to search in subcategories of a category. You could “tweak” this category by convincing the Wikipedia community to change the way they do it (go here ), but you are unlikely to succeed.

The “in music” that you can see on the meanings page has nothing to do with the categories that you could query or search, it's just the section of the page used to organize the list, different from the heading of the “Sites” section of the Article in Wikipedia on stack overflow .

+3
source

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


All Articles