WOLFRAM

Enable JavaScript to interact with content and submit forms on Wolfram websites. Learn how
Wolfram Language & System Documentation Center
Connect to Open Library using the Wolfram Language to retrieve information about books.

Connecting & Authenticating

ServiceConnect ["OpenLibrary"] creates a connection to the Open Library API. If a previously saved connection can be found, it will be used; otherwise, a new authentication request will be launched.

Requests

ServiceExecute ["OpenLibrary" ,"request",params] sends a request to the Open Library API, using parameters params. The following give possible requests.

Search Books

"BookSearch" search books by title or author

Parameters:
  • "Query" None query string
    "Author" None author name
    "Title" None book title
    "Subject" None subject
    MaxItems 100 maximum number of items returned
    "StartIndex" 0 start index
  • Book Information

    "BookSummary" information about a single book edition

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

    Parameters:
  • "BibKeys" (required) key(s) identifying specific book edition(s)
    "ShowThumbnails" False whether to include cover thumbnail in results
  • "BookText" full text of a book

    Parameters:
  • "BibKeys" (required) key(s) identifying specific book edition(s)
  • Examples

    Basic Examples  (1)

    Create a new connection to Open Library:

    Wolfram Language code: openlibrary = ServiceConnect["OpenLibrary"]

    Search books by author:

    Wolfram Language code: resultsByAuthor = openlibrary["BookSearch", <|"Author" -> "Kurt Vonnegut", MaxItems -> 20, "StartIndex" -> 5|>]

    Analyze data from search results:

    Wolfram Language code: Tally@DeleteMissing@Flatten[Normal@resultsByAuthor[All, "Language"]]
    Wolfram Language code: DateListPlot[Tally@DeleteMissing@resultsByAuthor[[All, "FirstPublishYear"]], Joined -> False, Filling -> Bottom]

    Get information on a specific edition of a book:

    Wolfram Language code: openlibrary["BookInformation", {"BibKeys" -> { "OLID", "OL12580254M" }, "ShowThumbnails" -> True}]
    Wolfram Language code: openlibrary["BookSummary", {"BibKeys" -> {"OLID", "OL13996678M"}, "ShowThumbnails" -> True}]

    Get the full text of a book:

    Wolfram Language code: text = openlibrary["BookText", {"BibKeys" -> {{"OLID", "OL13996678M"}}}];
    Wolfram Language code: StringTake[text[1], {2285, 3063}]
    Top [フレーム]

    AltStyle によって変換されたページ (->オリジナル) /