Questions tagged [wikipedia-api]

Related to the use of the MediaWiki API on Wikipedia. Consider also the tags [wikipedia] if your question isn't about the API or [mediawiki-api] if your question isn't about Wikipedia.

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.

In addition, there is a REST API that allows fetching commonly used data in a simple format. A list of all endpoints can be found in the REST API Documentation.

Please make sure to read the etiquette for best practices for using the API and general usage guidelines.

1085 questions
3
votes
1 answer

How can I read Wikipedia dump files similarly to how I can get information through the Mediawiki API?

I've been trying to create a local Mediawiki instance of the english Wikipedia so that I can do lots of heavy and time consuming calls to the Mediawiki API (e.x. iterate over all pages and get their category and internal links) So far it hasn't…
01AutoMonkey
  • 2,515
  • 4
  • 29
  • 47
3
votes
2 answers

Wikipedia Page Id from URL

I am parsing through wikipedia dump in java. In my module I want to know the page id of the internal pages of wiki those are referred by the current page. Getting the internal links and thus the url from it is easy. But how to get Page ID from…
MrTambourineMan
  • 1,025
  • 1
  • 11
  • 19
3
votes
1 answer

MediaWiki api for Wikipedia - is it possible to search by title on ALL languages?

I know that to search for a page id of a wikipedia with known title, i can do: https://en.wikipedia.org/w/api.php?action=query&titles=7_Studios However, in this case, 7_Studios is a french wikipedia article, so the above link would not work. Instead…
Ziqi
  • 2,445
  • 5
  • 38
  • 65
3
votes
1 answer

Parsing Wikipedia API json in PHP

I'm successfully returning json from Wikipedia but am not having any luck grabbing the value I need in PHP (trying to do this in a Drupal site). Here is the code I'm using, you can substitute $safeurl for this…
Corey
  • 166
  • 3
  • 14
3
votes
1 answer

Is there a way to get last and first edit timestamp for given article in one query?

What I found is how to get last revisions for an article: http://en.wikipedia.org/w/api.php?action=query&titles=42&prop=revisions&rvlimit=1 ...and the creation date, that is first…
rsk82
  • 28,217
  • 50
  • 150
  • 240
3
votes
4 answers

Reach a string behind unknown value in JSON

I use Wikipedia's API to get information about a page. The API gives me JSON like this: "query":{ "pages":{ "188791":{ "pageid":188791, "ns":0, "title":"Vanit\u00e9", "langlinks":[ { …
Oyabi
  • 824
  • 3
  • 10
  • 27
3
votes
1 answer

Install Wikipedia and its API Locally

Wikipedia Search API has usage limits. I can get the source code for the API server from here, but there is no documentation about which Wikipeida format it takes or how to deploy it. Any help regarding this matter is greatly appreciated!
MFARID
  • 700
  • 1
  • 12
  • 18
3
votes
2 answers

Wikipedia in ios app

I want to integrate wikipedia in my iOS App (is it related to the mediawiki ?) If so, I would like to know how I would tell wikipedia to give me an article about the o2 arena london (it is a one venue of London city) for example. What would the url…
Krunal
  • 6,440
  • 21
  • 91
  • 155
3
votes
2 answers

How to get all links(id) of specific page in wikipedia by pageid

I`m trying to build query with Wiki API that will return all internal links from specific article in id format. I have pageId of some article. For example for article "Android (Operational System)" id is 12610483. In my client side i need to work…
Yonatan Levin
  • 342
  • 5
  • 17
3
votes
2 answers

Wikipedia API: Excluding References From Parse Request

I'm trying to get the links from a particular page in order as presented on page, or reasonably close. I believe I found the correct API call to do so using the parse request, however I'm noticing that I'm getting alot of what I consider "junk"…
Nobosi
  • 1,066
  • 6
  • 14
3
votes
3 answers

How to specify or increase the content length of snippet by wikipedia api

I am using this url to extract data from wikipedia http://en.wikipedia.org/w/api.php?format=xml&action=query&list=search&srsearch=google&srlimit=1&prop=revisions This gives snippet as : Google Inc. is an American multinational corporation…
Vishnu Lal
  • 189
  • 1
  • 4
  • 13
3
votes
1 answer

How to get the complete list of pages titles from wikipedia ?

I want to get this list to later work on it for linquistic researches. The API:Allpages is limited to 500 queries. I need them all (4millions). Maybe attack it using dbpedia. Any trick to do it ?
Hugolpz
  • 17,296
  • 26
  • 100
  • 187
3
votes
1 answer

MediaWiki API query for images for multiple titles

When I ask the MediaWiki API to provide images for each title, it just returns images for the first specified title. For example, the…
sadensmol
  • 93
  • 1
  • 7
3
votes
4 answers

Whats the fastest way to extract "external links" data from dbpedia (or wikipedia)?

I need to get the "external links" links from specific Wikipedia articles in an array in either jquery (preferable) or php. I've gone through the wikipedia api and it doesn't seem there's a way to do that. It looks like there is a way to do it in…
Phil
  • 1,719
  • 6
  • 21
  • 36
3
votes
0 answers

wikipedia api results vary between list and generator queries

I'm exploring wiki apis... Based on the below post, i 've some doubts. Wikipedia list=search REST API: how to retrieve also Url of matching articles I need to fetch the wiki URLs for my search. So I used generator=search instead of list=search But…
deeshank
  • 4,286
  • 4
  • 26
  • 32