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
8
votes
1 answer

Retrieve another language of a Wikipedia page

Task: We have Wikipedia English page and need to retrieve the same page address in Russian. I know the Semantic Web solution - use simple query to DbPedia, but I am curious whether there are traditional solutions. I have asked the same question in…
SiberianGuy
  • 24,674
  • 56
  • 152
  • 266
8
votes
3 answers

Retrieve a list of all Wikipedia languages programmatically

I need to retrieve a list of all existing languages for a certain wiki project. For example, all Wikivoyage or all Wikipedia languages, just like on their landing pages. I prefer to do this via MediaWiki API, if it's possible. Thanks for your time.
Damjan Pavlica
  • 31,277
  • 10
  • 71
  • 76
8
votes
3 answers

Easy way to get wiktionary titles only in one language?

I can get easily a dump with all the titles in the wiktionary, but this dump contains every word, even non-English ones. For example, you find souris (mousein French): https://en.wiktionary.org/wiki/souris Is there an easy way or an existing script…
Andreas Schwarz
  • 1,788
  • 17
  • 42
7
votes
2 answers

Parse Wiktionary

Is there any .Net library to parse pages I've retrieved through the mediawiki api? A standard mediawiki parser that could just give titles and the data in pure data would be fine, but I would rather have one that is specifically suited to…
user513064
7
votes
1 answer

Get total number of articles from a MediaWiki wiki programmatically

How can I get the total number of articles using the MediaWiki API? I couldn't find it in the docs: http://www.mediawiki.org/wiki/API:Search http://en.wikipedia.org/wiki/Help:Searching#Search_engine_features Even a rough approximation is fine.
Mulone
  • 3,603
  • 9
  • 47
  • 69
7
votes
1 answer

Mediawiki error: File upload not working

I've installed Mediawiki v1.24.1 on my server which is running RHEL7. I've installed it under /var/www/foohelp/wiki. However, when I try to upload a file, I get the following error: [f3eae72a] /foohelp/wiki/index.php/Special:Upload Exception from…
7
votes
2 answers

Parsing Wikipedia countries, regions, cities

Is it possible to get a list of all Wikipedia countries, regions and cities with relations between them? I couldn't find any API appropriate for this task. What is be the easiest way to parse all the information I need? PS: I know, that there are…
7
votes
1 answer

Wikimedia Commons API search images by (latitude, longitude)

I would like to retrieve images from Wikimedia Commons to display on a map. This means that given a pair (latitude, longitude) I would like to find pictures around this point. After a day of searching and trying I have still no idea whether this is…
Flavio
  • 846
  • 1
  • 9
  • 21
7
votes
1 answer

How can I make the Wikipedia API normalize and redirect without knowing the exact case of all characters?

If I try to get the language links for a page on Wikipedia via their API like this: http://en.wikipedia.org/w/api.php?action=query&prop=langlinks&format=json&lllimit=10&llurl=&titles=wreck-it%20Ralph&redirects= I get a list of results. But if I…
Peter Jaric
  • 5,162
  • 3
  • 30
  • 42
7
votes
1 answer

Finding and downloading images within the Wikipedia Dump

I'm trying to find a comprehensive list of all images on wikipedia, which I can then filter down to the public domain ones. I've downloaded the SQL dumps from here: http://dumps.wikimedia.org/enwiki/latest/ And studied the DB…
Keith Schacht
  • 1,998
  • 15
  • 23
7
votes
2 answers

Why does full-text search inside titles return error

When I perform full-text search with Wikipedia API, I can not narrow it to titles only (srwhat=title). So while search anywhere (default) http://en.wikipedia.org/w/api.php?action=query&list=search&srsearch=sql&srnamespace=14&format=xml returns…
Maksee
  • 2,311
  • 2
  • 24
  • 34
7
votes
2 answers

Download images with MediaWiki API?

Is it possible to download images from Wikipedia with MediaWiki API?
Suzan Cioc
  • 29,281
  • 63
  • 213
  • 385
7
votes
3 answers

MediaWiki URL parameters without values

The query part of a URL seems to consist of key-value pairs separated by & and associated by =. I've taken to always using jQuery's $.param() function to URL-encode my query strings because I find it makes my code more readable and maintainable. In…
hippietrail
  • 15,848
  • 18
  • 99
  • 158
6
votes
1 answer

Wikipedia API - Accessing JSON Object

I'm trying to pull the text out of a Wikipedia article using their API (API is a generous term for what they are offering, but we'll use it I guess), and I am running into issues regarding parsing of the subsequent JSON object I am getting back.…
6
votes
3 answers

Rails + MediaWiki API for Wikipedia data extraction

I am trying to use Rails to extract data from Wikipedia, based on a search term. For example, 1) if I have the String "American Idol", I want to pass that to Wikipedia and get a list of the articles that relate to that. My goal will be to take the…
Carlos F
  • 893
  • 2
  • 12
  • 30
1 2
3
41 42