Google Ngram Viewers gives information about the frequency of words in Google Books. You can query for several words and the results is a graph. But they do not offer a way to export the data. To do so follow the instructions (Mac OS 10.12.2, Chrome 55):
- Specify the query and select a smoothing of 0. This ensures that you get the raw data that was not subjected to smoothing.
- Open Developer Tools.
- Run the query.
- Select the Sources panel
- Select “search all files” (click on the three dots to see a menu where you can select this)
- Search for “var data”
- Look in the resulting list of domains for something like “books.google.com/ngrams/graph?content=long&year_start=1800…..”
- Copy and clean the data