API for JSON data?

There are some examples in the docs.

EDIT: There was a similar request some time ago, might be helpful for you.