Call NY Times API, parse the results and display it in a table.

url <- 'https://api.nytimes.com/svc/topstories/v2/home.json'
response<- httr::GET(url, query = param) 
content<-content(response, as='text') %>%
  fromJSON() %>%
  as.data.frame()%>%
  mutate(title = cell_spec(results.title , "html", link = results.short_url))%>%
  mutate(published_date = str_replace( results.published_date,'T',' ')) %>%
  select(results.section, title, results.abstract,results.byline,published_date )
## No encoding supplied: defaulting to UTF-8.
names(content)<- c('Section','Title', 'Abstract', "By", 'Published Date')


kable(content,escape = FALSE)%>% kable_styling(bootstrap_options = c("striped", "hover",'condensed') )
Section Title Abstract By Published Date
U.S. 11 Killed in Pittsburgh Synagogue Massacre; Suspect Charged With 29 Counts The suspect in the Saturday morning attack, identified as Robert D. Bowers, 46, was in custody, law enforcement officials said. At least 11 people were reported killed. By CAMPBELL ROBERTSON, CHRISTOPHER MELE and SABRINA TAVERNISE 2018-10-27 10:59:25-04:00
U.S. Used to Hearing ‘Shabbat Shalom,’ a Historic Jewish Enclave Rings Out With Gunshots Pittsburgh’s Squirrel Hill neighborhood is a close-knit Jewish community. Its day of worship turned into one of mourning after a gunman stormed into a synagogue. By CAMPBELL ROBERTSON 2018-10-27 20:37:56-04:00
U.S. Trump Calls for Unity After Synagogue Shooting, Then Swiftly Denounces Democrats The president again demonstrated that he would not be swayed from the call of the campaign trail during a politically volatile and violent midterm election season. By KATIE ROGERS and JEFFERY C. MAYS 2018-10-27 14:23:31-04:00
U.S. Who Is Robert Bowers, the Suspect in the Pittsburgh Synagogue Shooting? Mr. Bowers showed a virulent anti-Semitism on his social media accounts. The police accuse him of killing 11 congregants at Tree of Life. By JULIE TURKEWITZ and KEVIN ROOSE 2018-10-27 16:13:33-04:00
U.S. Shootings at Houses of Worship: Pittsburgh Synagogue Attack Was Among the Deadliest From a Texas church to a Sikh temple in Wisconsin, houses of worship have become a recurring target for mass shooters. By SARAH MERVOSH 2018-10-27 21:26:41-04:00
Technology Cesar Sayoc’s Path on Social Media: From Food Photos to Partisan Fury By the time he was arrested, Mr. Sayoc appeared to fit a familiar profile of a modern extremist, radicalized online and sucked into a vortex of partisan furor. By KEVIN ROOSE 2018-10-27 11:15:07-04:00
U.S. Cesar Sayoc, Mail Bombing Suspect, Found an Identity in Political Rage and Resentment Mr. Sayoc styled himself as a successful bodybuilder and entrepreneur in South Florida. But court records and people who knew him recalled him differently. By JACK HEALY, JULIE TURKEWITZ and RICHARD A. OPPEL Jr. 2018-10-27 12:19:13-04:00
New York Outspoken Trump Supporter in Florida Charged in Attempted Bombing Spree The suspect was identified as Cesar Sayoc Jr., 56, of Aventura, Fla. Attorney General Jeff Sessions said he “appears to be a partisan.” By WILLIAM K. RASHBAUM, ALAN FEUER and ADAM GOLDMAN 2018-10-26 09:02:32-04:00
U.S. Republicans Rushing to Save House Seats From Onslaught of Democratic Money With the G.O.P. confident about holding onto their Senate majority on Election Day, the party is fortifying defenses in conservative-leaning districts they thought were secure but now may be at risk. By JONATHAN MARTIN and ALEXANDER BURNS 2018-10-27 10:31:45-04:00
Business Day Red-Hot Economy? Women Aren’t Convinced A remarkable gender gap, transcending party lines, has opened up in Americans’ views of both their own finances and the broader national economy. By BEN CASSELMAN and JIM TANKERSLEY 2018-10-27 05:00:12-04:00
U.S. A ‘No’ on Kavanaugh Yields a Windfall for Heitkamp’s Campaign Coffers Facing an uphill battle for re-election, Senator Heidi Heitkamp of North Dakota raised a staggering $12.5 million in 17 days. By CATIE EDMONDSON and RACHEL SHOREY 2018-10-27 09:00:53-04:00
Climate Driven by Trump Policy Changes, Fracking Booms on Public Lands The administration is auctioning off millions of acres of drilling rights and rolling back regulations, raising environmental concerns in states like Wyoming. By ERIC LIPTON and HIROKO TABUCHI 2018-10-27 12:00:08-04:00
Style Silicon Valley Nannies Are Phone Police for Kids Child care contracts now demand that nannies hide phones, tablets, computers and TVs from their charges. By NELLIE BOWLES 2018-10-26 10:00:03-04:00
Style The Digital Gap Between Rich and Poor Kids Is Not What We Expected America’s public schools are still touting devices with screens — even offering digital-only preschools. The rich are banning screens from class altogether. By NELLIE BOWLES 2018-10-26 10:00:05-04:00
Style A Dark Consensus About Screens and Kids Begins to Emerge in Silicon Valley “I am convinced the devil lives in our phones.” By NELLIE BOWLES 2018-10-26 10:00:07-04:00
Arts 11 of Our Best Weekend Reads The Beastie Boys wrote a book. Silicon Valley parents say not to screen time. The creator of green-bean casserole is dead. And more. By KALY SOTO 2018-10-27 05:00:09-04:00
Briefing The Week in Good News: London Jazz, Lavender for Anxiety, Candy Sometimes it seems as if we’re living under a constant barrage of heavy news. But it isn’t all bad out there. By DES SHOE 2018-10-25 12:03:17-04:00
Opinion A Massacre in the Heart of Mr. Rogers’ Neighborhood Squirrel Hill will continue to live by the values that Jews have sustained for more than 2,000 years. They can never be gunned down. By BARI WEISS 2018-10-27 19:25:20-04:00
Opinion Shaking My Faith in America The bloodshed in the Tree of Life synagogue is a sign that hatred of The Other is poisoning our public life. By HOWARD FINEMAN 2018-10-27 21:57:20-04:00
Sunday Review Who Says Allie Kieffer Isn’t Thin Enough to Run Marathons? Success that shows we might be able to achieve even more when we break all the rules. By LINDSAY CROUSE 2018-10-27 14:36:25-04:00
Opinion Not Every C-section Is a Bad Birth Story Rates are rising worldwide. That’s a problem. But don’t forget: This surgery also saves lives. By HONOR JONES 2018-10-27 14:30:04-04:00
Opinion ‘Riling Up the Crazies’ The only thing we have to fear is Trump himself. By MAUREEN DOWD 2018-10-27 14:37:42-04:00
New York Gay Fathers, Going It Alone As the traditional concept of family continues to evolve, single gay men having children through surrogacy are beginning to emerge. By AVICHAI SCHER and SARA NAOMI LEWKOWICZ 2018-10-25 13:49:46-04:00
Arts Hungary Turned Far Right. That’s Meant Millions for Its Opera. Viktor Orban’s government has invested hundreds of millions of dollars in the Hungarian State Opera. Now the company is coming to Trump’s America. By MICHAEL COOPER 2018-10-26 05:00:17-04:00
Style How I Discovered This Thing Called Music I was 27, new to New York and suffering from terrible anxiety. Then, on doctor’s orders, I slapped on some headphones. By JACKIE DESFORGES 2018-10-25 05:00:02-04:00
World English Soccer Team Owner’s Helicopter Crashes After Game Vichai Srivaddhanaprabha, a billionaire Thai businessman, bought the Leicester City team in 2010. He regularly leaves games by helicopter, but the authorities did not confirm he was on board Saturday. By RORY SMITH 2018-10-27 17:28:06-04:00
World Mattis Vows U.S. Will Hold Khashoggi’s Killers Accountable Defense Secretary Jim Mattis’s remarks reflected the administration’s struggle to defend the value of its alliance with Saudi Arabia. By ERIC SCHMITT 2018-10-27 10:44:43-04:00
World Irish President Is Re-Elected, but a Reality Star Surges Michael D. Higgins, a leftist, easily won a second term despite a late surge by a ex-reality show celebrity whose support grew after he criticized an ethnic minority group. By ED O’LOUGHLIN 2018-10-27 15:57:02-04:00
World Italians Protest in Rome About Dismal State of the City Thousands gathered on Saturday morning to protest the state of the Italian capital, where garbage is piled high and where public buses catch on fire. By EMMA JOHANNINGSMEIER 2018-10-27 12:33:02-04:00
World Israel Accuses Iran of Ordering Palestinian Rocket Fire From Gaza The Israeli military said Syria had also played an unspecified role in the rocket fire from the militant group Palestinian Islamic Jihad. By ISABEL KERSHNER 2018-10-27 11:29:44-04:00
New York How a Hugely Popular Pretzel Bun Became a Political Minefield For months, immigration activists have been protesting restaurants that rely on breads from Tom Cat, a baker targeted by ICE. Has activism run amok? By GINIA BELLAFANTE 2018-10-26 05:00:12-04:00
Sports How Weird Was Game 3 of the World Series? Let’s Take a Look The Dodgers struck back against the Red Sox in one of the zaniest games in World Series history. By JAMES WAGNER 2018-10-27 12:07:14-04:00
U.S. Marijuana Legalization Has Gone Mainstream. Rick Steves Has Helped. Mr. Steves, a travel writer and public radio and television host, is an outspoken activist for the legalization of recreational marijuana, which is on the ballot next month in North Dakota and Michigan. He says smoking pot is like a “declaration of independence.” By LIAM STACK 2018-10-27 05:00:03-04:00
U.S. Shopping for Insurance? Don’t Expect Much Help Navigating Plans Consumers seeking health insurance will see relatively stable premiums when open enrollment under the Affordable Care Act starts Thursday, but there will be fewer sources of advice and assistance. By ROBERT PEAR 2018-10-27 08:58:18-04:00
Arts The Playlist: Cardi B Hits Pay Dirt, and 11 More New Songs Hear tracks from Maggie Rogers, Julia Holter, Tyler, the Creator and others. By JON PARELES, JON CARAMANICA and GIOVANNI RUSSONELLO 2018-10-26 12:29:35-04:00
Smarter Living Smart-Home Devices to Make Your Holidays Easier These gadgets can take on your most mundane holiday tasks so you can focus on the fun stuff. By WIRECUTTER STAFF 2018-10-26 14:07:13-04:00
Books 6 New Books We Recommend This Week Suggested reading from critics and editors at The New York Times. 2018-10-25 13:21:40-04:00
Books Indigenous Stories for Young Readers Young adult and middle grade fiction to educate children in the vast terrain of Native American history. By NICOLE LAMY 2018-10-17 14:46:07-04:00
Movies Watch Timothée Chalamet Play an Addict in ‘Beautiful Boy’ The director Felix Van Groeningen narrates a difficult talk between father (Steve Carell) and son (Chalamet) in this drama. By MEKADO MURPHY 2018-10-25 18:22:44-04:00
Lens Living Beneath the Ground in an Australian Desert For about a century, residents of Coober Pedy have escaped the searing heat by building their homes underground. Tamara Merino captured life beneath the earth. By MATTHEW SEDACCA 2018-10-24 04:00:10-04:00
Arts Why Are Antiques So Cheap? Because Everyone Lives in the Kitchen Changes in the way we live in our homes have created a serious problem for the art and collectible industry. By SCOTT REYBURN 2018-10-26 03:47:46-04:00
Travel My Very Personal Taste of Racism Abroad For an African-American woman, a study-abroad program in Italy led to an eye-opening experience. “Disgusting black women” were the stinging words of one racial encounter. By NICOLE PHILLIP 2018-10-23 08:50:12-04:00
Magazine Why Suppress the ‘Experience’ of Half the World? Every effort to obscure, deny or restrict the experiences of women just creates a new, shared experience — that of being controlled. By CARINA CHOCANO 2018-10-23 05:00:08-04:00
Science Stephen Hawking’s Final Paper: How to Escape From a Black Hole In a study from beyond the grave, the theoretical physicist sings (mathematically) of memory, loss and the possibility of data redemption. By DENNIS OVERBYE 2018-10-23 17:44:33-04:00
Science Scientists Catch Rare Glimpses of the Endangered Vaquita An expedition in the Gulf of California yielded photographs and video of a species nearing extinction. By ELISABETH MALKIN 2018-10-17 08:51:25-04:00
Science Pando, the Most Massive Organism on Earth, Is Shrinking The grove of 47,000 quivering aspen trees in Utah is being diminished by mule deer, foraging cattle and human mismanagement. By JOANNA KLEIN 2018-10-17 14:00:06-04:00
Well Can There Really Be Two Moms? A lesbian mother grapples with the pain of a child favoring the mother who gave birth to her. By STEPHANIE FAIRYINGTON 2018-10-25 05:00:06-04:00