The New York Times web site provides a rich set of APIs, as described here: http://developer.nytimes.com/docs

You’ll need to start by signing up for an API key.

Your task is to choose one of the New York Times APIs, construct an interface in R to read in the JSON data, and transform it to an R dataframe.

After setting up an account and creating an app which consequently generated an api key and secrete on the NYT’s api web site, I opted to retrieve data from their books api. But I want to get only books written by Stephen King

I will select certain variables from the dataframe so as to display meaningful information

booksSubset <- stephenKingBooks$results %>% select(book_title, publication_dt, book_author, byline, summary)
datatable(booksSubset, colnames = c('Title', 'Date Published', 'Author', 'Byline', 'Summary'), class = 'cell-border stripe', options = list(
  initComplete = JS(
    "function(settings, json) {",
    "$(this.api().table().header()).css({'background-color': '#26868d', 'color': '#fff', 'text-align': 'center !important'});",
    "$(this.api().table().body()).css({'color': '#000', 'text-align': 'center !important'});",
    "}")
))