David Janes' Code Weblog

February 27, 2009

Introducing The Almost Universal API

auapi · David Janes · 9:54 am ·

The Almost Universal API is a culmination – or at least a local maxima – of several projects I’ve been working on for the last few months: in particular, Web Object Records, Pipe Cleaner and PyBM. The AUAPI is:

  • a way of presenting results returned from many popular APIs
  • a Python library to actual do this

I’ll be making several posts about how to use the AUAPI, including installation instructions. The plan is to make an easy_install version, but initially this will be a SVN from Google Code thing.

The AUAPI is mainly about how to present results returned from APIs, not how to send data to APIs nor how to encode requests. The encoding is designed to “look good” in JSON and be easily and algorithmically encoded into XML. The AUAPI data model is based on:

  • Atom, the “core” vocabulary, particularly providing title, content, summary, updated, category, link and links
  • MediaRSS, for encoding images
  • hCard, for encoding information about people
  • hCalendar, for encoding information about events

There are several “maybe” standards too:

  • hProduct, for encoding information about things
  • Google’s SGN URLs, for providing a universal way of talking about accounts

I have already worked a fair number of APIs into the AUAPI. These are documented on the Mashematica Wiki:


  1. […] quickly review, the AUAPI sees API results as composing of two parts. A “response” (formerly the […]

  2. […] is a brief outline of how one would “naively” transform Almost Universal API’s (AUAPI) JSON into XML. We say “naive” because in general one wants to make a […]

  3. […] community has adapted the vCard standard for serialization into HTML using hCard. In the Almost Universal API (AUAPI), people and organizations should almost always be described using a JSON-encoded […]

  4. […] is the way to encode images in the Almost Universal API (AUAPI). Because MediaRSS encodes its values in attributes, we use the @ symbol to prefix […]

  5. […] location is a little more problematic to encode than other data types we’ve looked at for the Almost Universal API. The issue is that standards for adding geographic information are either overly complicated or […]

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Powered by WordPress