node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »



wikicites is a module that allows you to get a stream of recent citations out of Wikipedia(s) as JSON. Citations are the bedrock of Wikipedia, since editors are interested in verifiability not truth ... and citations are a big part of what makes verification possible.


  1. get nodejs
  2. npm install wikicites



WikiCites = require('wikicites').WikiCites
= new WikiCites(channels: ["#en.wikipedia"])
w.listen (citation) ->
  console.log citation


var WikiCites = require('wikicites').WikiCites;
= new WikiCites({channels: ["#en.wikipedia"]})
w.listen(function(citation) {

Citation Data

In these two examples a callback is receiving a citation as it occurs in an edit on Wikipedia. The citation is a JavaScript object that will look something like:

  "type": "news",
  "last": "Crace",
  "first": "John",
  "title": "David Cesarani: The making of a defiant moderate",
  "url": "",
  "accessdate": "19 April 2011",
  "newspaper": "The Guardian",
  "date": "12 October 2004",
  "change": {
    "channel": "#en.wikipedia",
    "flag": "",
    "page": "David Cesarani",
    "pageUrl": "",
    "url": "",
    "delta": 511,
    "comment": "Reverted 1 edit by [[Special:Contributions/Red Stone Arsenal|Red Stone Arsenal]] ([[User talk:Red Stone Arsenal|talk]]): Get consensus for your change, drive by reverts every few months aint that. ([[WP:TW|TW]])",
    "wikipedia": "English Wikipedia",
    "wikipediaUrl": "",
    "user": "Nableezy",
    "userUrl": "",
    "unpatrolled": false,
    "newPage": false,
    "robot": false,
    "anonymous": false,
    "namespace": "Article"

which would represent the following citation wikitext:

{{cite news
  |title=David Cesarani: The making of a defiant moderate
  |accessdate=19 April 2011
  |newspaper=The Guardian
  |date=12 October 2004}}

In addition to the citation information you can see that the JSON object includes information about the change itself, what Wikipedia article the citation appears in, what Wikipedia the article belongs to, who made the edit, etc.


To hack on wikicites you'll need to clone this repository, install the dependencies, and then run the test suite with mocha:

git checkout
cd wikicites
npm install

If you use mocha with other projects you may want to install it globally which will put it in your system PATH:

npm install -g mocha

Some tests may spuriously fail if they timeout before an edit with a citation occurs on Wikipedia.

Build Status


  • CC0