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

get list of desambiguated homonyms from wikipedia / wikidata / linked data

If I search for "George Bush" manually on wikipedia I'll get this page which lists homonyms with short descriptions. I would like to feed my search to an api and get the following info : George H. W. Bush George W. Bush George Bush (biblical…
moodymudskipper
  • 46,417
  • 11
  • 121
  • 167
6
votes
1 answer

How to get coordinates from a Wikipedia page through API?

I want to get the coordinates of a Wikipedia page through their API. I want to put the page title as 'titles' parameter. I have searched SO for a solution but seems they are scrapping the page then extracting. Is it possible through their API?
Nasir Ahmed
  • 501
  • 2
  • 14
6
votes
1 answer

How to get table data from Wikipedia page?

Is there somebody who knows how to use the Wikipedia API to get JSON or XML data out from a table on a specific Wikipedia page? Is there maybe a different way to do this? For example from here…
ST80
  • 3,565
  • 16
  • 64
  • 124
6
votes
2 answers

How to get more than default 10 results from Wikipedia API?

I am using Wikipedia API where I get the images of certain string I input. It always returns 10 result but I want more than that approx…
WISHY
  • 11,067
  • 25
  • 105
  • 197
6
votes
2 answers

Getting all Wikipedia articles with coordinates inside London

Generally I want to get the links (and titles) of all Wikipedia articles with coordinates inside London. I tried using Google, but unfortunately did't come with proper search terms. Any hints?
user1602492
6
votes
1 answer

Mediawiki API: How do I list all pages of a category and for each page show all of it's categories?

I am using the following wikimedia API to list all pages with a certain category: https://www.mediawiki.org/wiki/API:Categorymembers E.g. https://en.wikipedia.org/w/api.php?action=query&list=categorymembers&cmtitle=Category:Physics This gives me a…
6
votes
1 answer

How to get all city pages from Wikipedia by using LINQ-to-Wiki?

I have used LINQ-to-Wiki to get pages from Wikipedia to my ASP.NET MVC webapplication.I have used the below query to get Pages having title like "India". var wikipedia = new Wiki("Example"); var data = wikipedia.Query.allpages() .Where(i =>…
Midhuna
  • 4,523
  • 4
  • 21
  • 22
6
votes
2 answers

How to get more info within only one geosearch call via Wikipedia API?

I am using an API call similar to http://en.wikipedia.org/w/api.php?action=query&list=geosearch&gsradius=10000&gscoord=41.426140|26.099319. I returns something like this
Michael
  • 4,786
  • 11
  • 45
  • 68
6
votes
2 answers

Retrieving the Interlanguage links from an exported Wikipedia article?

I used to retrieve the interlanguage links from an exported Wikipedia article by parsing the export with some regular expressions. In phase 1 of the WikiData project these links have been moved to a separate page on Wikidata. For example the article…
Dawied
  • 897
  • 10
  • 16
6
votes
2 answers

Wiki quotes API?

I would want to get a structured version of a Wikiquote page via JSON (basically I need all phrases) Example: http://en.wikiquote.org/wiki/Fight_Club_(film) I tried with:…
sparkle
  • 7,530
  • 22
  • 69
  • 131
6
votes
2 answers

A robust search on DBpedia by title

I need to write a SPARQL query to get movies from dbpedia. I have wrote almost all the query but I have this problem: I have all of these titles, and they have to give me the same wikipedia resource: Spider-man Spiderman Film: Spiderman Spiderman…
sparkle
  • 7,530
  • 22
  • 69
  • 131
6
votes
1 answer

Wikimedia API image search with public domain filter

I would like to query Wikimedia API to find all images that contain a keyword and filter only the images that are public domain. So no additional CC-SA license. Curently I'm using the following query to extract the…
6
votes
3 answers

Scrape Data from Wikipedia

I am trying to find or build a web scraper that is able to go through and find every state/national park in the US along with their GPS coordinates and land area. I have looked into some frameworks like Scrapy and then I see there are some sites…
clifgray
  • 4,313
  • 11
  • 67
  • 116
6
votes
2 answers

How to extract data from a Wikipedia article?

I have a question regarding parsing data from Wikipedia for my Android app. I have a script that can download the XML by reading the source from http://en.wikipedia.org/w/api.php?action=parse&prop=text&format=xml&page=ARTICLE_NAME (and also the JSON…
user766650