API Exercises

Acquiring data via APIs

 

N.B. In the queries below, you can make use of API keys which can be downloaded here.

  1. The NYT The Books API enables you to get data about books reviews and bestseller lists.
    Lists of bestsellers can be retieved using the following base URL:
    http://api.nytimes.com/svc/books/v3/lists
    The API key must be given after the api-key parameter.
    You can use the names.xml function to get the complete list of bestseller names.
    For example:
    http://api.nytimes.com/svc/books/v3/lists/names.xml?api-key=0123456789
    To find a specific bestseller list, provide the date of of the list in the format YYY-MM-DD, and use the name of the list, in combination with the required data format.
    For example:
    http://api.nytimes.com/svc/books/v3/lists/2015-01-01/combined-print-and-e-book-fiction.xml?api-key=0123456789
  2. You can use the GoodReads API to get data about book titles, ratings, reviews and related titles, among many other data.
    Base URL:
    https://www.goodreads.com/book/
    The API key must be given after the key parameter.
    You can use the ISBN function to get the review statistics for a given book, using its ISBN.
    Example:
    https://www.goodreads.com/book/isbn/9780385537148?key=0123456789