Ben Croker wrote an article dealing with building a RESTful API using ExpressionEngine and ExpressionEngine templates.
Ben walks through the process of taking URI segments, filtering channel data, and returning the information in JSON, all with standard templates and template groups.
He concludes with the following:
And this really is an API – a specification intended to be used as an interface by software components to communicate with each other. Granted it is not an ideal way to build an API – for that you would really want to build an add-on – however it very nicely demonstrates how API’s work and how EE template tags give us all the tools we need to build one.
Again, this shows the flexibility of ExpressionEngine, and how we can essentially manage our content however we see fit.