Questions tagged [mediawiki-api]

The MediaWiki API is the interface for automated editing processes ("bots") and other programs to access data in a MediaWiki wiki.

Documentation for the API is available at mediawiki.org; a summary of all available parameters and short help is available by accessing the API endpoint on the wiki, e.g. here for the English .

Please make sure to check out the Etiquette page to get acquainted with the best practices and usage guidelines for using the API.

629 questions
2
votes
3 answers

How to get wikipedia data of Wikiprojects?

I recently found that wikipedia has Wikiprojects that are categorised based on discipline (https://en.wikipedia.org/wiki/Category:WikiProjects_by_discipline). As shown in the link it has 34 disciplines. I would like to know if it is possible to get…
EmJ
  • 4,398
  • 9
  • 44
  • 105
2
votes
0 answers

Mediawiki: Database must be null or a non-empty string

I try to setup a Mediawiki with Visual Editor, Parsoid and RESTBase. I have been able to setup the wiki with only Visual Editor and Parsoid, but when I try to get RESTBase to work, I get a lot of problems. Sometime I'm able to view the wiki,…
2
votes
1 answer

How to get a list of Wikipedia pages that contain certain types of content tables?

What is the best way to get a list of all Wikipedia pages that contain certain types of content tables such as 'Nutritional value' table and 'Scientific classification' table? Positive…
Tilek
  • 636
  • 1
  • 8
  • 14
2
votes
1 answer

Get location with Wikimedia API

How to get location of the Wikipedia article with Mediawiki API in terms of city/country? Let's say I want to determine what country, what city the Sagrada Familia cathedral is located in? What property should I use?
chainastole
  • 85
  • 1
  • 3
  • 11
2
votes
2 answers

Wikimedia Commons: Get names of sub-categories (using SPARQL or MediaWiki API)

Given a specific category (i.e. https://commons.wikimedia.org/wiki/Category:Motorcycles) I want to get names of all sub-categories recursively, either in SPARQL: SELECT ?category ?entityLabel WHERE { SERVICE wikibase:label { bd:serviceParam…
2
votes
1 answer

MediaWiki - Searching based on PageID

I'm using MediaWiki at work and creating a Knowledge Base. We've got everything set up but one requirement is to have a unique identifier on each page, then it can be referenced in official documentation. I've done this by using the magic word…
Groveham
  • 103
  • 1
  • 1
  • 8
2
votes
2 answers

Wikipedia links API returns links that aren't on the page

I'm experimenting with the python module wikipedia which is a wrapper for the wikipedia API. In particular I'm looking at the links API, which as I understand should return a 'List of titles of Wikipedia page links on a page', i.e. all the…
OldGeeksGuide
  • 2,888
  • 13
  • 23
2
votes
1 answer

How to add entries to Wiktionary programmatically?

I want to add new entries to Wiktionary programmatically. Is there a specific Wiktionary API or some sort of hacky way of doing that?
Aleksandar Savkov
  • 2,894
  • 3
  • 24
  • 30
2
votes
1 answer

Mediawiki API: get recent changes with categories of each page, or only those recentchanges entries which are in a certain category

I want to retrieve from Mediawiki the list of recent changes in a certain category. I am trying to use the recentchanges API; I would either need to be able to limit the results to that category, or for each recentchanges entry get the list of…
Velaro
  • 461
  • 1
  • 3
  • 20
2
votes
2 answers

Creating and appending blocks of data using jQuery

I'm creating a web app that queries 10 wikipedia entries using the mediapedia API and displays each of them in blocks. Here's the json: https://en.wikipedia.org/w/api.php?action=opensearch&format=json&search=Shakira&limit=10&profile=fuzzy What I…
tadm123
  • 8,294
  • 7
  • 28
  • 44
2
votes
1 answer

MediaWiki bot users read rights?

With the updates to MediaWiki 1.27, there were some authentication changes for the API made (to go alongside authentication changes in general for the Wiki engine). As part of that, I seem to be running into a permissions error in a wiki that's set…
MidnightLightning
  • 6,715
  • 5
  • 44
  • 68
2
votes
0 answers

Getting city quick facts with Wikipedia

Is it possible to get quick or interesting facts about a city using any API appropriate for this task by having available the City's name, country, latitude and longitude? For example, a query for London would return something like this: London,…
Zomtorg
  • 153
  • 1
  • 11
2
votes
1 answer

Trying to search WikiNews

I'm trying to search WikiNews, both for specific news stories and for the latest headlines. I've been reading about the MediaWiki API (https://www.mediawiki.org/wiki/API:Main_page), but it doesn't seem to map to what I'm trying to do. Taking two…
headbanger
  • 1,038
  • 1
  • 11
  • 32
2
votes
1 answer

Querying wikipedia / mediawiki api by location using bounding box via automation python

I'm looking to obtain Wikipedia article titles and locations (lat/long) over a large area, too large for an individual url query such…
James
  • 21
  • 1
2
votes
3 answers

Is there MediaWiki API to convert mediawiki text to HTML?

Is there any MediaWIki API where I can submit entire (potentially very large) mediawiki text (for wikipedia article) that will give me HTML that is exactly the same as HTML article viewed on wikipedia for the english language?
ace
  • 11,526
  • 39
  • 113
  • 193