An API that will give you the word count of any given(or most) book’s? [closed]

I’m working on a new website right now and need to be able to get the word count from a large range of popular/classic titles to compare the users input.
I’ve tried google books, penguin publishing, and open library. I’ll even take page count at this point. Preferably a free library.