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

Fill Autocomplete From Wikidata api by passing Category

I am stuck on a problem . I am having Code to fill autocomplete with results from wipipedia using wikidata api I have used the following git hub resource . My HTML CODE
2
votes
1 answer

Get wikipedia page url by pageId

I use wikipedia api to get an extract from a random page. There is example response: { "batchcomplete": "", "continue": { "grncontinue": "0.701350797294|0.701351244349|4312122|0", "continue": "grncontinue||" }, …
Alexandr
  • 3,859
  • 5
  • 32
  • 56
2
votes
1 answer

How to get all Wikipedia pages from category with title and primary image?

I want to list all pages from category with the title and primary image. My current API url is this: https://en.wikipedia.org/w/api.php?action=query&cmlimit=100&list=categorymembers&cmtitle=Category%3AAmerican%20male%20film%20actors with this…
juanpex
  • 140
  • 8
2
votes
2 answers

Getting license information from MediaWiki API?

I want to display images from Wikimedia Commons inside my website (as links) using the following mediawiki-api call to search for…
Ole Albers
  • 8,715
  • 10
  • 73
  • 166
2
votes
1 answer

Is there a Python module for parsing Wikipedia articles without MediaWiki?

I am trying to comb through Wikipedia articles and want the following information on each article: Content in plain text, links, redirects (titles of pages that redirect to current page), and metadata (page views and edits on monthly basis) The…
2
votes
2 answers

How do i write my own pre-save transform?

As described here, the mediawiki parser allows for a pre-save transform which will automatically replace wikitext with something else. How do I create my own? I did find this, but I can't even be sure it's relevant…
user606723
  • 4,918
  • 2
  • 27
  • 34
2
votes
1 answer

MediaWiki Query and/or WikidataQuery to find Wikipedia article

This isn't so much a question abut AngularJS as it is about the Wikimedia and Wikidata query API's. Although I am trying to display the content of a Wikipedia article in AngularJS after doing a certain query that isn't the problem. I already know…
Livi17
  • 1,620
  • 3
  • 25
  • 43
2
votes
1 answer

Wiktionary/MediaWiki Search & Suffix Filtering

I'm building an application that will hopefully use Wiktionary words and definitions as a data source. In my queries, I'd like to be able to search for all Wiktionary entries that are similar to user provided terms in either the title or definition,…
pcorey
  • 850
  • 2
  • 9
  • 14
2
votes
1 answer

How to get all Wikipedia article titles with MediaWiki API?

I know you can get all titles from Wikipedia's Database dump and that you can query for specific titles, but how can you get them all through the MediaWiki API?
Perry
  • 1,709
  • 1
  • 17
  • 25
2
votes
1 answer

Change page shown for non existing MediaWiki page

I want to change the content of the page that is shown if a wikipage doesn't exists. See for example: http://en.wikipedia.org/wiki/Xxxyyyzzz http://meta.wikimedia.org/wiki/Xxxyyyzzz For now my wiki only shows "There is currently no text in this…
waanders
  • 8,907
  • 22
  • 70
  • 102
2
votes
4 answers

Wikipedia API returning sorted data instead of random data

I am trying to generate random articles from a category using the Wikipedia API sandbox. …
Vishnu Ks
  • 483
  • 1
  • 5
  • 18
2
votes
2 answers

What API does facebook use for displaying the full Wikipedia articles?

I couldn't find any api that return the article in a usable HTML form. Most of them return extracts which have very poor HTML formatting which makes them useless for anything.
2
votes
2 answers

How can I get Wikipedia API results within alphabetical parameters?

I'm using the Wikipedia API to retrieve links within pages, and backlinks to those pages. Is there any way to filter results of prop=links, prop=linkshere or list=backlinks to retrieve only results that e.g. begin with a certain letter? Something…
thehattery
  • 125
  • 7
2
votes
1 answer

Get latitude and longitude from Wikipedia page via API

I wanted to use the following API and pss in different suburbs to get the latitude and longitude of the suburb or address. http://en.wikipedia.org/w/api.php?format=json&action=query&titles=Main%20Page&prop=revisions&rvprop=content Also, the list of…
JaiK
  • 367
  • 3
  • 8
  • 20
2
votes
1 answer

Using Wikipedia API for autocomplete search

I want to use the Wikipedia API to select a famous person's name from the People category from my Javascript application. Basically, I would like to send the name or partial name and get results that contains the Wikipedia URL, title, an excerpt of…
vtortola
  • 34,709
  • 29
  • 161
  • 263