Questions tagged [wikipedia]

Consider the tags wikipedia-api (or the more general mediawiki-api) and mediawiki. Questions should be related to programming.

Source: Wikipedia

Wikipedia, the free encyclopedia, is a free web-based encyclopedia project written and maintained by people all over the world and is one of the most visited websites in the world(1,2). Consider also the tags,

  • if your question has to do with the use of the API on Wikipedia
  • if your question has to do with the use of the API on general Mediawiki sites
  • if your question has to do with the MediaWiki software.
1766 questions
14
votes
3 answers

Does the Wikipedia API support searches for a specific template?

Is it possible to query the Wikipedia API for articles that contain a specific template? The documentation does not describe any action that would filter search results to pages that contain a template. Specifically, I am after pages that contain…
grenade
  • 31,451
  • 23
  • 97
  • 126
14
votes
2 answers

MediaWiki removed MathJax. Can MathJax be forced on client side another way?

Much to my displeasure, MediaWiki has recently disabled support for MathJax (ticket: T99369) rendering of TeX formulae wikipedia-wide. Since me (and others, if you skim the ticket's discussion thread) find the rendering with the remaining options…
Jinxed
  • 356
  • 2
  • 16
14
votes
5 answers

How does Wikipedia's "What links here" work?

I recently used Wikipedia's function "What links here" (which is found under the "Toolbox" element in any entry's left menu) and it got me started wondering how this function actually works. I'm guessing that searching through all the article…
ehm
  • 23,789
  • 5
  • 28
  • 31
13
votes
3 answers

How to know if the wikipedia content from API contains an useful article or an ambiguous one

I can get the Wikipedia article in XML or any other format. But for a term I want to know first if the returned text contains full article or simply contains ambiguous terms like the entered one. So "SEO" is an ambiguous(or redirect) term, but how…
AgA
  • 2,078
  • 7
  • 33
  • 62
13
votes
6 answers

Parser for Wikipedia

I downloaded a Wikipedia dump and I want to convert the wiki format into my object format. Is there a wiki parser available that converts the object into XML?
Boolean
  • 14,266
  • 30
  • 88
  • 129
13
votes
4 answers

Wikipedia API: search for famous people

I have the following Wikipedia API search…
rybo111
  • 12,240
  • 4
  • 61
  • 70
13
votes
9 answers

Get the first lines of a Wikipedia article

I got a Wikipedia article and I want to fetch the first z lines (or the first x characters, or the first y words; it doesn't matter) from the article. The problem: I can get either the source Wiki text (via the API) or the parsed HTML (via a direct…
theomega
  • 31,591
  • 21
  • 89
  • 127
13
votes
6 answers

Reverse wikipedia geotagging lookup

Wikipedia is geotagging a lot of its articles. (Look in the top right corner of the page.) Is there any API for querying all geotagged pages within a specified radius of a geographical position? Update Okay, so based on lost-theory's answer I tried…
Bjarke Freund-Hansen
  • 28,728
  • 25
  • 92
  • 135
12
votes
2 answers

Wikipedia list=search REST API: how to retrieve also Url of matching articles

I'm studying Wikipedia REST API but I'm not able to find the right option to get also URLs for a search query. this is the URL of the…
Fabio Buda
  • 769
  • 2
  • 7
  • 16
12
votes
4 answers

Scalability of aho corasick

I want to search a text document for occurrences of keyphrases from a database of keyphrases (extracted from wikipedia article titles). (ie. given a document i want to find whether any of the phrases have a corresponding wikipedia article) I found…
z33m
  • 5,993
  • 1
  • 31
  • 42
12
votes
2 answers

Wikipedia api fulltext search to return articles with title, snippet and image

I've been looking for a way to query the wikipedia api based on a search string for a list of articles with the following properties: Title Snippet/Description One or more images related to the article. I also have to make the query using…
srosengren
  • 123
  • 1
  • 4
12
votes
2 answers

Query Wikipedia's API using AJAX (XMLHttpRequest)

I am trying to implement a simple request to Wikipedia's API using AJAX (XMLHttpRequest). If I type the url in the address bar of Firefox, I get a neat XML, no sweat there. Yet, calling the exact same url with: // this is my XMLHttpRequest…
Fred Rocha
  • 450
  • 3
  • 16
11
votes
3 answers

How do I make a "title" (tooltip, pop-up, alt-text) in a CSS to be used with SVG, without JavaScript

It is pretty easy to create a pop-up with the "title" attribute in SVG. But how do you achieve the same effect with CSS. This is for an illustration I'm making for Wikimedia and I strive to have most things other wikipedians would like to correct…
mja
  • 262
  • 3
  • 8
11
votes
2 answers

Wikipedia API: how to search for a term in a specific category

I'm having hard time to figure out a basic task: how to find a term restricted in a specific category.. i feel Wiki API documentation is kinda confusing... I'd just like to receive as output a JSON file with all the suggestions related to that…
Francesco
  • 24,839
  • 29
  • 105
  • 152
11
votes
4 answers

Fetch excerpt from Wikipedia article?

I've been up and down the Wikipedia API, but I can't figure out if there's a nice way to fetch the excerpt of an article (usually the first paragraph). It would be nice to get the HTML formatting of that paragraph, too. The only way I currently see…
Felix
  • 88,392
  • 43
  • 149
  • 167