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

Extract value from deeply nested JSON file (Wikipedia API)

This is my first attempt, as a Go newbee, to access deeply nested values from a JSON file generated by the Wikipedia API using Go structs. Reading through all threads concerning Unmarshaling with Go didn't help much. Json sample file (extracted from…
ripat
  • 3,076
  • 6
  • 26
  • 38
-2
votes
1 answer

Why is try: except: not working for this particular line of code with python Wikipedia API?

i am trying to execute this very short code that took out from my bigger code because i was having problems with it. I was able to reproduce the problem (it gave the exact same error). BACKGROUND INFO: i am just trying to get the first sentence out…
FireHawkss
  • 11
  • 3
-2
votes
1 answer

How to get this json data by using javascript?

I am currently working on a telegram bot, and I want to add a function that can search Wikipedia, and I want to know how to get the 'extract' part without knowing the pageid from this wiki API that I fetch from URL? For example this one:…
Jim
  • 33
  • 7
-2
votes
1 answer

Fetch API results from Wikipedia

I must write a code which will take info from Wikipedia, and I wrote this: function getInfo() { let search = "Teatr Wielki"; fetch("https://en.wikipedia.org/w/api.php?&origin=*&action=opensearch&search=" + search + "&limit=5", { …
-2
votes
1 answer

Accessing and scraping sporadically available Wikipedia sections

I need to fetch some data but I'm completely stumped after trying a few things. I want to access Airlines & Destinations from the Albuquerque_International_Sunport's wiki page - keep in mind, I'll be going through a prepopulated list of airports…
dsp_099
  • 5,801
  • 17
  • 72
  • 128
-2
votes
1 answer

How to download Egyptian Arabic articles from Wikipedia

I am a researcher and I need to download many ( or all) the Egyptian dialect pages in Wikipedia? I am totally new to this. any help please
Shereen
  • 141
  • 6
  • 12
-2
votes
2 answers

Pywikibot MediaWiki Query API

I have a data dump of Wikipedia articles listed only by their pageid, and I am hoping to filter them by namespace. It would be relatively easy to write some python (probably using the requests module) to call the MediaWiki Query API, to query for…
brubsby
  • 388
  • 2
  • 13
-2
votes
1 answer

Consuming Wikipedia API by Universal App Windows 10 C#

I'm newbie in C# and I have no idea how to consume a JSON from an API. I would like to get this JSON:…
-2
votes
1 answer

PageRank - How is a link defined?

I am trying to learn more about the PageRank algorithm. I have a task to implement a wikipedia search engine implementation using PageRank. I wanted to know how a links are defined. So if Page A has a hyperlink in the wiki article to Page B, is that…
-2
votes
1 answer

Trouble with JQuery $.getJSON and Wikipedia API

So I'm trying to access the Wikipedia API for a Free Code Camp project. I tried using the standard Ajax interface, and it didn't work - I tried using .getJSON, and I still can't get it to work. The problem isn't my buttons, or the link, or the…
naregjan
  • 25
  • 6
-2
votes
1 answer

Is there any possibility to get the plain (MediaWiki-markup) source instead of HTML source of Wikipedia-pages via API?

As I asked above, I want to get the plain Wikipedia/Mediawiki-markup via the API instead of the HTML source code. If I try this I get the HTML source of the section and of course I've already read the documentation of the Mediawiki API but didn't…
csabinho
  • 1,579
  • 1
  • 18
  • 28
-2
votes
2 answers

Get wikipedia city info

Get city information from wikipedia, and show it on an Android APP. However, every time I try to transform the data to JSON, throws an…
Bruno
  • 131
  • 3
  • 17
-2
votes
1 answer

How to determine if 2 pages are of the same topic but in different languages?

I'm importing wiki pages based on their pageid (or url). Lest's say I've imported a page and I've stored, among others, its language (i.e EN). If I'm to import a translated page of the above EN version, by receiving only a new pageid (or url), how…
dror
  • 3,759
  • 6
  • 31
  • 45
-2
votes
1 answer

Getting Wikipedia Page Titles in Json

So I'm trying to get all the title links from a wikipedia page. I've successfully loaded the page in but I'm having trouble going through the JSON to get the titles. Here's the code I'm using. Can someone help? $.ajax({ url:…
Vinny
  • 309
  • 3
  • 11
-3
votes
1 answer

For a given wikipedia article, find all wikipedia articles containing hyperlink to the input article in the text

Let me try to explain my problem: For a Wikipedia article url, Let's say Yann LeCun (https://en.wikipedia.org/wiki/Yann_LeCun), I would like to retrieve URLs of wikipedia articles that contains a word with this hyperlink. In this case, for example,…
zwlayer
  • 1,752
  • 1
  • 18
  • 41
1 2 3
72
73