angular-wiki-search | AngularJS module for consuming Wikipedia API



Stars : 10

Forks : 10

Created by Damjan Pavlica

Demo Download GitHub

Angular Wiki Search

AngularJS module for consuming Wikipedia API.

See it in action:

You can find an advanced version here:


Just download the directory and open index.html file:

$ git clone
$ bower install
$ open index.html

If you don't use Bower, you can manually resolve dependencies from bower.json file.


The main WikiController consists of two main public methods: - wiki.openArticle(title) - wiki.searchWikipedia(term)

Those methods getting data from Wikipedia API in JSONP format (see API documentation).

Both methods have those common URL params:

var params = {
    action: 'query',
    prop: 'extracts|pageimages',    // get article's content and images
    format: 'json',
    formatversion: 2,  // support utf-8
    callback: 'JSON_CALLBACK'

Specific params for openArticle method are:

    titles: title,   // title is a variable
    redirects: ''  // auto-redirecting to an article

Specific params for searchWikipedia method are:

    generator: 'search',
    gsrsearch: term,  // term is a variable
    pilimit: 'max', // enable images for all results
    exlimit: 'max', // enable content for all results
    exintro: ''    // get only article's intro

To-do list

  • error handling


Javascript plugin