Udacity just (August 12, 2014) released an API that makes all of their course information easily available:

See the overview here: [Udacity Course Catalog API](https://www.udacity.com/catalog-api)

And the documentation here: [Udacity Course Catalog API Documentation](https://s3.amazonaws.com/content.udacity-data.com/techdocs/UdacityCourseCatalogAPIDocumentation-v0.pdf)

Some other APIs that have online course data:

* Coursera has an entire "[App Platform](https://tech.coursera.org/app-platform/)" including Catalog API
* Udemy has an [API](https://developers.udemy.com/) (version 1.1)
* EdX has an RSS feed of their courses (an a [full API on their roadmap](http://apievangelist.com/2014/06/09/the-edx-api/))