Words API

You can use the words API to fetch random snippets of public domain English literature. Just send a GET request to /denomination/count/, where count is the number of things that you want and denomination is one of the following:

The response will be JSON text representing one or more levels of nested lists. For words requests, the response will be a one-layer deep list of words. For paragraphs requests, it will be a list of lists of words, where each sub-list is a single paragraph. For chapters requests, it will be a list of lists of lists, where the outer-most sublists are chapters and the inner-most sublists are paragraphs.

The server imposes a maximum count for each type of request, beyond which it will not return any more items. To retrieve the maximum number of chapters, paragraphs, and words, send a GET request to /limits/.

Note that you should not depend on this server. It may break or disappear at any time and fetches from a limited set of works. If you need to use this API for your own purposes, you should host a copy on your own servers.

Source Code: http://www.github.com/bieber/wordserv/