Carvoyant [1] makes a small device that plugs into your car's OBD2 port, and exposes the data through an API. It's somewhat similar to Automatic [2], but available now and has an API. I've got one in my car, but haven't had a chance to play around with the API yet.
[1] http://www.carvoyant.com [2] http://www.automatic.com