R New York time APIs

#Scrapping
url <- "https://api.nytimes.com/svc/books/v3/lists/2018-05-25/hardcover-fiction.json?api-key=BSKZfFb0gIL0s263HFlxAAS5Clf5JZN0"
article<- fromJSON(url) 
article$results$books %>% as.data.frame() %>% select(1,2,3,6,7,8,9,10,11,13)
##    rank rank_last_week weeks_on_list primary_isbn10 primary_isbn13
## 1     1              1             2     0316274046  9780316274043
## 2     2              2             4     1538761394  9781538761397
## 3     3              0             1     1250126061  9781250126061
## 4     4              3             3     0735217351  9780735217355
## 5     5              0             1     052548342X  9780525483427
## 6     6              0             1     0525521194  9780525521198
## 7     7              8            34     0425284689  9780425284681
## 8     8              9            34     0735224293  9780735224292
## 9     9             10             3     031647231X  9780316472319
## 10   10             12            14     0312577230  9780312577230
## 11   11             11            19     0062678418  9780062678416
## 12   12             13             6     1501171682  9781501171680
## 13   13              5             2     0062696793  9780062696793
## 14   14              0             1     1101967382  9781101967386
## 15   15              4             2     1476756554  9781476756554
##           publisher
## 1     Little, Brown
## 2     Grand Central
## 3      St. Martin's
## 4            Putnam
## 5            Bantam
## 6             Knopf
## 7        Ballantine
## 8     Penguin Press
## 9     Little, Brown
## 10     St. Martin's
## 11           Morrow
## 12 Simon & Schuster
## 13           Harper
## 14       Ballantine
## 15         Scribner
##                                                                                                                                              description
## 1                              The latest installment in the Women’s Murder Club series. Detective Lindsay Boxer searches for a killer in San Francisco.
## 2                                         Amos Decker, known as the Memory Man, puts his talents toward solving a string of murders in a Rust Belt town.
## 3                        An eccentric millionaire enlists the attorney Brooke Trappnell to fix old wrongs, which sets up a potential scandal and murder.
## 4                           The 28th book in the Prey series. A federal marshal looks into the actions of a member of the Senate Intelligence Committee.
## 5                               The rogue F.B.I. agent Jane Hawk is on the lam from the government and a secret group causing a rash of murder-suicides.
## 6  In Britain after World War II, a pair of teenage siblings are taken under the tutelage of a mysterious man and his cronies who served during the war.
## 7                                                              A South Carolina lawyer learns about the questionable practices of a Tennessee orphanage.
## 8                                                                                                       An artist upends a quiet town outside Cleveland.
## 9                          Charlie Marder, a World War II veteran and unlikely congressman, gets entangled in a dangerous series of events in 1950s D.C.
## 10                                       A former prisoner of war returns from Vietnam and moves his family to Alaska, where they face tough conditions.
## 11                                A recluse who drinks heavily and takes prescription drugs may have witnessed a crime across from her Harlem townhouse.
## 12                                                              A high school guidance counselor tries to uncover the identity of her sister’s murderer.
## 13                                                                A missing baby unnerves a group of new mothers who meet in Prospect Park twice a week.
## 14                 Martha Gellhorn goes to Madrid to report on the Spanish Civil War and comes to a crossroad in her relationship with Ernest Hemingway.
## 15                               A woman is separated from her son when she begins two consecutive life sentences in a California correctional facility.
##    price                   title                          contributor
## 1      0        THE 17TH SUSPECT by James Patterson and Maxine Paetro
## 2      0              THE FALLEN                    by David Baldacci
## 3      0      THE HIGH TIDE CLUB                  by Mary Kay Andrews
## 4      0            TWISTED PREY                     by John Sandford
## 5      0   THE CROOKED STAIRCASE                       by Dean Koontz
## 6      0                WARLIGHT                  by Michael Ondaatje
## 7      0    BEFORE WE WERE YOURS                      by Lisa Wingate
## 8      0 LITTLE FIRES EVERYWHERE                        by Celeste Ng
## 9      0       THE HELLFIRE CLUB                       by Jake Tapper
## 10     0         THE GREAT ALONE                    by Kristin Hannah
## 11     0 THE WOMAN IN THE WINDOW                         by A.J. Finn
## 12     0 I'VE GOT MY EYES ON YOU                by Mary Higgins Clark
## 13     0      THE PERFECT MOTHER                      by Aimee Molloy
## 14     0           LOVE AND RUIN                      by Paula McLain
## 15     0           THE MARS ROOM                    by Rachel Kushner
url <- "https://api.nytimes.com/svc/movies/v2/reviews/search.json?query=godfather&api-key=BSKZfFb0gIL0s263HFlxAAS5Clf5JZN0"

movies <- fromJSON(url) %>%
  as.data.frame() %>%
  select(1,3,4,5,6,7,8,9,10,11,12,13)

      names(movies) <- str_replace_all(names(movies), "results.","")
movies
##    status has_more num_results                           display_title
## 1      OK    FALSE          10                     The Black Godfather
## 2      OK    FALSE          10 Square Grouper: The Godfathers of Ganja
## 3      OK    FALSE          10                        Tokyo Godfathers
## 4      OK    FALSE          10                 The Godfather, Part III
## 5      OK    FALSE          10                  The Godfather, Part II
## 6      OK    FALSE          10                     The Black Godfather
## 7      OK    FALSE          10                           The Godfather
## 8      OK    FALSE          10                        Three Godfathers
## 9      OK    FALSE          10                     Miracle in the Sand
## 10     OK    FALSE          10                     El Compadre Mendoza
##    mpaa_rating critics_pick          byline
## 1                         0  BEN KENIGSBERG
## 2            R            0    RACHEL SALTZ
## 3        PG-13            1     A. O. Scott
## 4            R            1    Janet Maslin
## 5            R            1   VINCENT CANBY
## 6            R            0      NORA SAYRE
## 7            R            1   Vincent Canby
## 8                         0 BOSLEY CROWTHER
## 9                         0          J.T.M.
## 10                        0  Harry T. Smith
##                                                                    headline
## 1  ‘The Black Godfather’ Review: The Music Executive Who Made It All Happen
## 2                                             Adventures in the Drug Trades
## 3                     Three Down-and-Outs Rescue a Foundling From the Trash
## 4                                                GODFATHER PART III (MOVIE)
## 5                                           Godfather: Part II, The (Movie)
## 6                                              Black Godfather, The (Movie)
## 7                                                     THE GODFATHER (MOVIE)
## 8                                                          Three Godfathers
## 9                                                     Three Godfathers, The
## 10                                                     Compadre Mendoza, El
##                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 summary_short
## 1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Reginald Hudlin’s documentary about Clarence Avant includes many golden anecdotes.
## 2                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               “Square Grouper” is a documentary about pot smuggling in South Florida in the 1970s and ’80s.
## 3  Another marvel from Satoshi Kon, whose first two films, &quot;Perfect Blue&quot; and &quot;Millennium Actress,&quot; have already pushed Japanese feature-length animation toward greater realism and wilder fantasy. Loosely based on &quot;3 Godfathers,&quot; John Ford's maudlin 1948 western, this movie, a sweet fable of decency amid the down and out, also has echoes of Chaplin and Capra. Three homeless people — an embittered alcoholic, a middle-aged transvestite and a teenage runaway — find an abandoned baby on Christmas Eve. As they try to reunite the foundling with her parents, they revisit their own unhappy lives, and travel through a city rendered with unbelievable precision and tinted with undeniable love. The potentially sticky sentiments of the story are balanced by a crazily inventive narrative and by Mr. Kon's cool, obsessively detailed visual style. At the end, the skyscrapers of Tokyo wriggle and dance to a Japanese-language techno version of Beethoven's &quot;Ode to Joy,&quot; which pretty much sums up this indescribable, unforgettable movie. — A. O. Scott
## 4                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Mafia heir trapped by legacy of past. Coppola's director's cut. Deeply moving.
## 5                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
## 6                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
## 7                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               Puzo's Mafioso novel. Scalding and memorable.
## 8                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Outlaw trio and abandoned child. Typical, expert Ford western.
## 9                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Thieves reluctantly care for orphan. Tragic horse opera.
## 10                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           Landowner survives Mexican Revolution by supporting both sides. Directed by Fernando de Fuentes.
##    publication_date opening_date        date_updated
## 1        2019-06-06   2019-06-07 2019-06-14 16:44:01
## 2        2011-04-14   2011-04-15 2017-11-02 04:18:13
## 3        2004-01-16         <NA> 2017-11-02 04:16:23
## 4        1990-12-25   1990-12-25 2017-11-02 04:17:42
## 5        1974-12-13   1974-12-20 2017-11-02 04:17:27
## 6        1974-09-04         <NA> 2017-11-02 04:16:03
## 7        1972-03-16   1972-03-24 2017-11-02 04:17:26
## 8        1949-03-04   1948-12-01 2017-11-02 04:17:11
## 9        1936-03-09   1936-03-06 2017-11-02 04:16:58
## 10       1934-11-19   1934-11-18 2017-11-02 04:16:55