Here are a few collections of text that are freely available for text mining and analysis. Usually, a freely available or accessible corpora comes with an API which assists the user in pulling the information they need. See below for information on how to get started with using APIs.
Here is some information to learn how to pull in some of these free content and worok with their API (Application Programming Interface).