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
4
votes
4 answers

Getting Wikipedia infoboxes in a format that Ruby can understand

I am trying to get the data from Wikipedia's infoboxes into a hash or something so that I can use it in my Ruby on Rails program. Specifically I'm interested in the Infobox company and Infobox person. The example I have been using is "Ford Motor…
hadees
  • 1,754
  • 2
  • 25
  • 36
4
votes
2 answers

Using fetch library for Wikipedia API - Javascript

I'm developing a Wikipedia Viewer and I'm trying to extract some data from the Wikipedia API. This is supposed to be a normal request, any idea why this method is not giving any response? I'm using fetch library. The line console.log(data) doesn't…
4
votes
2 answers

How to use Wikipedia API to get page statistics for all pages in a Category?

I am looking to identify the most popular pages in a Wikipedia Category (for example, which graph algorithms had the highest page views in the last year?). However, there seems to be little up-to-date information of Wikipedia APIs, especially for…
4
votes
2 answers

Cannot access Wikidata API

I'm trying to use the Wikidata API, but all I'm getting is: Fetch API cannot load https://www.wikidata.org/w/api.php?action=wbsearchentities&search=Ingmar%20Bergman&language=en&limit=20&format=json&origin=http%3A%2F%2Fwww.dev.example.com%3A3000.…
4
votes
1 answer

How to download files from Wikimedia Commons by API?

How can I download a lot of audio (.ogg) files from Wikimedia Commons? Is it possible using the Mediawiki API?
Saku
  • 383
  • 2
  • 12
4
votes
0 answers

Reverse paging in the Mediawiki API

I'm currently using the continue parameter when retrieving pages of results from Mediawiki (specifically the Wikimedia Commons installation) which is working well. What I'd like to do is also support reverse paging and I found the following proposal…
Friedrich 'Fred' Clausen
  • 3,321
  • 8
  • 39
  • 70
4
votes
1 answer

How can I harnest Wikidata to build a Siri-like service?

I'd like to discuss the first part of this Siri-like service. Ideally, I'd like to be able to query for things like: "the social network" "beethoven" "bad blood taylor swift" And get results like…
Vulkan
  • 1,004
  • 16
  • 44
4
votes
1 answer

Displaying edit count on MediaWiki

I would like to display number of edits / contribution on user page. Is there any way to do that? I tried to use link mentioned here: http://en.wikipedia.org/wiki/Help:User_contributions So if follow that, I got a URL something like…
dreamer
  • 1,039
  • 2
  • 16
  • 36
4
votes
3 answers

Why is this python request returning the same value each time?

I'm using they python requests library for the first time, and I am confused. When I run the function below in a for loop, with different base URLs, it appears to receive a response, but the content that is returned is the same for both URLs. If I…
Jeremy
  • 1,960
  • 4
  • 21
  • 42
4
votes
1 answer

Retrieve the number of edits made by bots, registered users and anonymous users for a Wikipedia article

I'm trying to retrieve the number of edits made by bots, registered users and anonymous users separated for a specific wikipedia article. I know I can get all revisions for an article by the revision prop in the MediaWiki API, I was thinking to use…
Afnan Ahmad
  • 163
  • 5
4
votes
1 answer

Wikimedia Commons API query to get count of sub categories and photos in a category

I want to query a Wikimedia Commons category and get the count of sub categories and photos in a category. For example when you look at the web page "Category:Collections of the Brooklyn Museum" in Wikimedia Commons, you get the list of…
user1881214
  • 73
  • 1
  • 8
4
votes
2 answers

How to embed MediaWiki page content into my site?

Our corporate wiki is Mediawiki. I have no problem to put iframe into my site to refer for some article on wiki. But my own site have a lot of widgets and own style. I don't want to include Mediawiki navigation/search/login widgets, logo image. Is…
gavenkoa
  • 45,285
  • 19
  • 251
  • 303
4
votes
2 answers

Unmarshaling values of JSON objects

If given the string, from a MediaWiki API request: str = ` { "query": { "pages": { "66984": { "pageid": 66984, "ns": 0, "title": "Main Page", "touched":…
Hairr
  • 1,088
  • 2
  • 11
  • 19
4
votes
1 answer

How to approve new articles and edits in Mediawiki?

When users create or edit articles I want to approve them first and then publish them. How can I achieve that or What extension make this possible?
Zim3r
  • 580
  • 2
  • 14
  • 36
4
votes
2 answers

Programmatically create Media Wiki pages using C#

I have installed a media wiki (www.mediawiki.org) on my server and need to create Wiki pages automatically using c#. Does anyone know how to programmatically create Media Wiki pages using C#. Many thanks,
DafaDil
  • 2,463
  • 6
  • 23
  • 33