Using Wikipedia Suggest API

This entry was posted on Saturday, October 8th, 2011 and is filed under apps, JavaScript, jQuery, JSON.

In this post, I will explain how to use Retrieve Wikipedia Suggest Using JSON . Wikipedia Suggest API is free and simple to use. API is offered in XML and JSON. We will make use of jQuery UI autocomplete to build application.
URL for Wikipedia Suggest is:-

(["a",["Animal","Association football","Australia","African American (U.S. Census)","Allmusic","Arthropod","Album","Actor"]])

The above is JSON response for Query=a. In URL we have specified callback=? for security purpose since jQuery does not allow cross domain request.
We can see that JSON response of Wikipedia Suggest is multidimensional array and jQuery autocomplete needs related suggest in array.

$( "#tags" ).autocomplete({
		function (data)

In demo i have shown a Wikipedia XML Search about which I will write in my next Article

You Might Also Like

Filed Under: apps, JavaScript, jQuery, JSON