Problem: Applications need a machine interface to a certain capability or information in your website. Scraping data from rendered HTML pages can be cumbersome. Unlike full-fledged APIs (which are covered in Chapter 8, Working Asynchronously) this refers to the need for a single endpoint for a specialized purpose or one-time use.
Solution: Create lightweight services that return data in machine-friendly formats, such as JSON or XML.