Know All About Numbers with the Numbers API

What is the answer to the Ultimate Question of Life, the Universe and Everything? The answer is 42. If you are interested in such number facts and were looking at a source of all such information aggregated from various internet sources, there is good news. Since we track APIs over here at ProgrammableWeb, it should come as no surprise that there is a Numbers API now that gets you access to all kinds of interesting information.

The Numbers API has been developed by university students, David Hu and Mack Duan. David announced the Numbers API at his blog and describes how an internship at the Khan Academy led to this project. David and Mack put this API together in a few weekends. The technology used is NodeJS and Express on the Server side and they utilized Sass + Compass on the front-end.  The data has been extracted from sources like Wikipedia and processed into consistent grammatical form.

The Home page itself is interesting and you could spend hours there with trivia about numbers that you never possibly knew. Alternately, you could use the Numbers API, to throw up a quick web mashup or mobile application if you want to go that route. The API is REST-based, returns plain text and currently does not use any authentication or rate limits. The request from the developers is to be nice to their servers. The API Usage stats are already being tracked.

The API documentation clearly states how you can get various kinds of information. The URL is of the following format:

where type is one of trivia, math, date and year and number is an integer or a keyword random or a day of the year , if the type is date.

Examples are given below:

Refer to the home page for documentation on various ways you can access and embed the information in your applications.

Interestingly, the Numbers API was selected by David from one of his ideas that he collected over a 30 day period last year. He jotted down over 286 ideas in 29 days, a living IDEA machine shall we say? If David is reading this, how about adding the following trivia for the number 5000 : Did you know ProgrammableWeb now lists more than 5000 APIs?

Be sure to read the next API article: New Facebook Page APIs Support Timeline Features