Search Books

"BookSearch" — search books by title or author

Book Information

"BookSummary" — information about a single book edition

"BookInformation" — information about readable versions of a single book edition

"BookText" — full text of a book

OpenersPrimaryExamplesSection(Spacer1)Examples  (1)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

Create a new connection by launching an authentication dialog:

openlibrary=ServiceConnect["OpenLibrary"]

Search books by author:

resultsByAuthor=openlibrary["BookSearch",{"Author"->"Kurt Vonnegut",MaxItems->20,"StartIndex"->5}]

Search books by author and subject:

results=openlibrary["BookSearch",{"Author"->"Kurt Vonnegut","Subject"->"science fiction"}];

results[9]

Analyze data from search results:

Tally@DeleteMissing@Flatten[Normal@resultsByAuthor[All,"Language"]]

DateListPlot[Tally@DeleteMissing@resultsByAuthor[[All,"FirstPublishYear"]],Joined->False,Filling->Bottom]

Get information on a specific edition of a book:

openlibrary["BookInformation",{"BibKeys"->{ "OLID","OL12580254M" },"ShowThumbnails"->True}]

result=openlibrary["BookInformation",{"BibKeys"->results[3,"EditionKey"][[15]],"ShowThumbnails"->True}];
result[Cases[Normal[Keys[result]],Except["Cover"]]]

openlibrary["BookSummary",{"BibKeys"->{"OLID","OL13996678M"},"ShowThumbnails"->True}]

Get the full text of a book:

text=openlibrary["BookText",{"BibKeys"->{{"OLID","OL13996678M"}}}];

StringTake[text[1],{2285,3063}]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[ServiceExecute, paclet:ref/ServiceExecute])  ▪  (RefLink[ServiceConnect, paclet:ref/ServiceConnect])  ▪  (RefLink[WikipediaSearch, paclet:ref/WikipediaSearch])  ▪  (RefLink[WikipediaData, paclet:ref/WikipediaData])}})}})