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.

library(tidyverse)
## Warning: package 'tidyverse' was built under R version 3.5.3
## -- Attaching packages ------------------------------------------------------------------------ tidyverse 1.2.1 --
## v ggplot2 3.1.1       v purrr   0.3.1  
## v tibble  2.0.1       v dplyr   0.8.0.1
## v tidyr   0.8.3       v stringr 1.4.0  
## v readr   1.3.1       v forcats 0.4.0
## Warning: package 'ggplot2' was built under R version 3.5.3
## Warning: package 'readr' was built under R version 3.5.3
## Warning: package 'forcats' was built under R version 3.5.3
## -- Conflicts --------------------------------------------------------------------------- tidyverse_conflicts() --
## x dplyr::filter() masks stats::filter()
## x dplyr::lag()    masks stats::lag()
library(jsonlite)
## Warning: package 'jsonlite' was built under R version 3.5.3
## 
## Attaching package: 'jsonlite'
## The following object is masked from 'package:purrr':
## 
##     flatten
library(knitr)
## Warning: package 'knitr' was built under R version 3.5.3
library(dplyr)
library(httr)
## Warning: package 'httr' was built under R version 3.5.3
library(rjson)
## 
## Attaching package: 'rjson'
## The following objects are masked from 'package:jsonlite':
## 
##     fromJSON, toJSON
library(stringi)

Get my key from New York Times website

my_key = "VyfZDT2zI2fvSp2OyKogKtzD6HrmTu5l"

read json files of all movie reviews with my key

df <- jsonlite::fromJSON(txt = paste0("https://api.nytimes.com/svc/movies/v2/reviews/all.json?api-key=", my_key)) %>% 
  data.frame

df %>%
  head()
##   status
## 1     OK
## 2     OK
## 3     OK
## 4     OK
## 5     OK
## 6     OK
##                                                             copyright
## 1 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 2 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 3 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 4 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 5 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 6 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
##   has_more num_results                    results.display_title
## 1     TRUE          20                                 Synonyms
## 2     TRUE          20                           Black and Blue
## 3     TRUE          20                            Western Stars
## 4     TRUE          20 Making Waves: The Art of Cinematic Sound
## 5     TRUE          20                             Burning Cane
## 6     TRUE          20                            The Kill Team
##   results.mpaa_rating results.critics_pick results.byline
## 1                                        1 MANOHLA DARGIS
## 2                   R                    1     A.O. SCOTT
## 3                  PG                    1 KEN JAWOROWSKI
## 4                                        1    GLENN KENNY
## 5                                        1    GLENN KENNY
## 6                   R                    0 BEN KENIGSBERG
##                                                results.headline
## 1      ‘Synonyms’ Review: Brilliant. Relentless. Comic. Tragic.
## 2  ‘Black and Blue’ Review: A Cop Thriller for Our Age of Dread
## 3  ‘Western Stars’ Review: Bruce Springsteen and Broken Cowboys
## 4           ‘Making Waves’ Review: How Sound in Cinema Moves Us
## 5 ‘Burning Cane’ Review: Poverty and Despair in Rural Louisiana
## 6           ‘The Kill Team’ Review: Bullying on the Battlefield
##                                                                                                                                     results.summary_short
## 1                        In this scorching movie from Nadav Lapid, a young Israeli flees to Paris and tries to transform into a Frenchman. It goes badly.
## 2                                   Naomie Harris plays a rookie running from bad police officers and drug dealers in Deon Taylor’s violent, astute film.
## 3                                    This concert film, directed by the singer and Thom Zimny, puts Bruce in a barn with an orchestra to make some magic.
## 4                                                                        A documentary provides vivid examples of the power of audio in a motion picture.
## 5 The director Phillip Youmans completed this, his first feature, while still in his teens. It feels like the work of an older, and fully formed, artist.
## 6                                  Alexander Skarsgard stars in a film based on the murders of Afghan civilians by American soldiers nearly a decade ago.
##   results.publication_date results.opening_date results.date_updated
## 1               2019-10-24           2019-10-25  2019-10-27 16:44:22
## 2               2019-10-24           2019-10-25  2019-10-27 16:44:22
## 3               2019-10-24           2019-10-25  2019-10-27 16:44:21
## 4               2019-10-24           2019-10-25  2019-10-27 16:44:21
## 5               2019-10-24           2019-10-25  2019-10-27 16:44:20
## 6               2019-10-24           2019-10-25  2019-10-24 17:56:02
##   results.link.type
## 1           article
## 2           article
## 3           article
## 4           article
## 5           article
## 6           article
##                                                                               results.link.url
## 1                                http://www.nytimes.com/2019/10/24/movies/synonyms-review.html
## 2                          http://www.nytimes.com/2019/10/24/movies/black-and-blue-review.html
## 3                           http://www.nytimes.com/2019/10/24/movies/western-stars-review.html
## 4 http://www.nytimes.com/2019/10/24/movies/making-waves-the-art-of-cinematic-sound-review.html
## 5                            http://www.nytimes.com/2019/10/24/movies/burning-cane-review.html
## 6                           http://www.nytimes.com/2019/10/24/movies/the-kill-team-review.html
##                                             results.link.suggested_link_text
## 1                                 Read the New York Times Review of Synonyms
## 2                           Read the New York Times Review of Black and Blue
## 3                            Read the New York Times Review of Western Stars
## 4 Read the New York Times Review of Making Waves: The Art of Cinematic Sound
## 5                             Read the New York Times Review of Burning Cane
## 6                            Read the New York Times Review of The Kill Team
##   results.multimedia.type
## 1     mediumThreeByTwo210
## 2     mediumThreeByTwo210
## 3     mediumThreeByTwo210
## 4     mediumThreeByTwo210
## 5     mediumThreeByTwo210
## 6     mediumThreeByTwo210
##                                                                                                                         results.multimedia.src
## 1     https://static01.nyt.com/images/2019/10/24/arts/24synonyms/merlin_162980427_b8788cef-d2c4-4e28-a9a5-7a2f1539577a-mediumThreeByTwo210.jpg
## 2 https://static01.nyt.com/images/2019/10/25/arts/24blackandblue/merlin_162979524_8fe68107-5e63-4c42-aab1-e951f9dde0e7-mediumThreeByTwo210.jpg
## 3       https://static01.nyt.com/images/2019/10/24/arts/western1/merlin_162980691_01b11a6f-d4c0-48de-a1a3-bb081a6082d5-mediumThreeByTwo210.jpg
## 4                                          https://static01.nyt.com/images/2019/10/25/arts/24makingwaves/24makingwaves-mediumThreeByTwo210.jpg
## 5      https://static01.nyt.com/images/2019/10/25/arts/24burning/merlin_162979698_0fef3cbf-1f57-4374-a5d4-8da952532c16-mediumThreeByTwo210.jpg
## 6     https://static01.nyt.com/images/2019/10/24/arts/24killteam/merlin_162980196_c2a146f1-5a88-4e2e-bec6-19dfd36fa254-mediumThreeByTwo210.jpg
##   results.multimedia.width results.multimedia.height
## 1                      210                       140
## 2                      210                       140
## 3                      210                       140
## 4                      210                       140
## 5                      210                       140
## 6                      210                       140

Retrieve column names on data frame

colnames(df)
##  [1] "status"                   "copyright"               
##  [3] "has_more"                 "num_results"             
##  [5] "results.display_title"    "results.mpaa_rating"     
##  [7] "results.critics_pick"     "results.byline"          
##  [9] "results.headline"         "results.summary_short"   
## [11] "results.publication_date" "results.opening_date"    
## [13] "results.date_updated"     "results.link"            
## [15] "results.multimedia"

The link list contains the link information to the movie review article

kable(names(df$results.link), format="markdown")
x
type
url
suggested_link_text

Get information about the number of movie reviews returned by API data request

nrow(df)
## [1] 20