Bing News API

import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

HttpRequest request = HttpRequest.newBuilder()
		.uri(URI.create("https://bing-news-search1.p.rapidapi.com/news?safeSearch=Off&textFormat=Raw"))
		.header("X-BingApis-SDK", "true")
		.header("X-RapidAPI-Key", "74bd99649amsha1c396dfa85e888p1c1773jsn35b095711d42")
		.header("X-RapidAPI-Host", "bing-news-search1.p.rapidapi.com")
		.method("GET", HttpRequest.BodyPublishers.noBody())
		.build();
HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
{"_type": "News", "webSearchUrl": "https:\/\/www.bing.com\/news\/search?q=top+stories&form=TNSA02", "value": [{"_type": "NewsArticle", "name": "Russia’s ‘kamikaze’ drones pose new threat, Ukraine says", "url": "https:\/\/www.msn.com\/en-us\/news\/world\/russia-s-kamikaze-drones-pose-new-threat-ukraine-says\/ar-AA12FYMR", "description": "Ukraine is accusing Russia of striking deep inside its territory with what it says are Iranian-made “kamikaze” drones as Moscow’s troops are facing mounting setbacks on the battlefield.Ukrainian", "provider": [{"_type": "Organization", "name": "NBC News", "image": {"_type": "ImageObject", "thumbnail": {"_type": "ImageObject", "contentUrl": "https:\/\/www.bing.com\/th?id=ODF.ighWNnrr5MMFUs8WKMme2A&pid=news"}}}], "datePublished": "2022-10-06T16:35:02.0000000Z"}, {"_type": "NewsArticle", "name": "Dozens dead after mass shooting at child-care center in Thailand", "url": "https:\/\/www.msn.com\/en-us\/news\/world\/dozens-dead-after-mass-shooting-at-child-care-center-in-thailand\/ar-AA12ERV4", "image": {"_type": "ImageObject", "thumbnail": {"_type": "ImageObject", "contentUrl": "https:\/\/www.bing.com\/th?id=OVFT.HFQLecyMrSXP5L7h_HRmBy&pid=News", "width": 1200, "height": 630}, "isLicensed": true}, "description": "  At least 36 people, including 24 children, were dead after a mass shooting at a child-care center in northeast Thailand, the country's Central Investigation Bureau said.   The suspect, who was", "provider": [{"_type": "Organization", "name": "ABC News", "image": {"_type": "ImageObject", "thumbnail": {"_type": "ImageObject", "contentUrl": "https:\/\/www.bing.com\/th?id=ODF.-LMnifaGw_NvPvJr_0E9tA&pid=news"}}}], "datePublished": "2022-10-06T13:37:41.0000000Z"}, {"_type": "NewsArticle", "name": "Russian missiles slam apartments; refugees missing at border", "url": "https:\/\/www.msn.com\/en-us\/news\/world\/russian-missiles-slam-apartments-refugees-missing-at-border\/ar-AA12ENa3", "image": {"_type": "ImageObject", "thumbnail": {"_type": "ImageObject", "contentUrl": "https:\/\/www.bing.com\/th?id=OVFT.sOfz4AeIwH5eH-z-WXoAuS&pid=News", "width": 1200, "height": 630}, "isLicensed": true}, "description": "KYIV, Ukraine (AP) — Russian missiles hit apartment buildings in the southern Ukrainian city of Zaporizhzhia on Thursday, a local official said, killing three people and wounding at least 12 in a", "provider": [{"_type": "Organization", "name": "The Associated Press", "image": {"_type": "ImageObject", "thumbnail": {"_type": "ImageObject", "contentUrl": "https:\/\/www.bing.com\/th?id=ODF.AlMAEy7MoWNz0OI_xSWQiw&pid=news"}}}], "datePublished": "2022-10-06T07:43:29.0000000Z"}, {"_type": "NewsArticle", "name": "Kevin Spacey faces sexual misconduct civil trial in NY", "url": "https:\/\/www.msn.com\/en-us\/money\/companies\/kevin-spacey-faces-sexual-misconduct-civil-trial-in-ny\/ar-AA12EUhK", "image": {"_type": "ImageObject", "thumbnail": {"_type": "ImageObject", "contentUrl": "https:\/\/www.bing.com\/th?id=OVFT.H3ij49Ba0s2Qb7d1aroYey&pid=News", "width": 1200, "height": 630}, "isLicensed": true}, "description": "NEW YORK (Reuters) -   It has been just under five years since Kevin Spacey's Oscar-winning career was upended by a slew of sexual misconduct accusations, starting when Anthony Rapp accused him of", "provider": [{"_type": "Organization", "name": "Reuters", "image": {"_type": "ImageObject", "thumbnail": {"_type": "ImageObject", "contentUrl": "https:\/\/www.bing.com\/th?id=ODF.jFXbg3L7Ce_1pS4_IOR8CA&pid=news"}}}], "datePublished": "2022-10-06T10:07:52.0000000Z"}, {"_type": "NewsArticle", "name": "Live Updates: Russia-Ukraine War", "url": "https:\/\/www.msn.com\/en-us\/news\/world\/live-updates-russia-ukraine-war\/ar-AA12EZ7b", "image": {"_type": "ImageObject", "thumbnail": {"_type": "ImageObject", "contentUrl": "https:\/\/www.bing.com\/th?id=OVFT.RHpEa0UBKGEFRaDAeuva9i&pid=News", "width": 1200, "height": 630}, "isLicensed": true}, "description": "KYIV, Ukraine — The head of Ukraine’s human rights commission says Russian authorities detained hundreds of Ukrainians as they neared Russia's border with Estonia.Dmytro Lubinets wrote in a post on", "provider": [{"_type": "Organization", "name": "The Associated Press", "image": {"_type": "ImageObject", "thumbnail": {"_type": "ImageObject", "contentUrl": "https:\/\/www.bing.com\/th?id=ODF.AlMAEy7MoWNz0OI_xSWQiw&pid=news"}}}], "datePublished": "2022-10-06T10:01:22.0000000Z"}, {"_type": "NewsArticle", "name": "Biden visiting New York with IBM poised to announce $20B program; what to know", "url": "https:\/\/www.msn.com\/en-us\/news\/politics\/biden-visiting-new-york-with-ibm-poised-to-announce-20b-program-what-to-know\/ar-AA12FuaW", "image": {"_type": "ImageObject", "thumbnail": {"_type": "ImageObject", "contentUrl": "https:\/\/www.bing.com\/th?id=ORMS.e23b23cd603d79bf68ad363ed1790978&pid=Wdp", "width": 3114, "height": 2336}, "isLicensed": true}, "description": "IBM is expected to announce a $20 billion initiative when President Joe Biden visits the company’s Poughkeepsie facility Thursday afternoon.                                                      ", "provider": [{"_type": "Organization", "name": "USA TODAY", "image": {"_type": "ImageObject", "thumbnail": {"_type": "ImageObject", "contentUrl": "https:\/\/www.bing.com\/th?id=ODF.m1iod5ODNIyyKu23kGIllQ&pid=news"}}}], "datePublished": "2022-10-06T12:43:03.0000000Z"}, {"_type": "NewsArticle", "name": "Report: Mom of Walker's child says he paid for her abortion", "url": "https:\/\/www.msn.com\/en-us\/news\/politics\/report-mom-of-walkers-child-says-he-paid-for-her-abortion\/ar-AA12E7oD", "image": {"_type": "ImageObject", "thumbnail": {"_type": "ImageObject", "contentUrl": "https:\/\/www.bing.com\/th?id=OVFT.ikzp5XPH_sxsgAVVUZJyGS&pid=News", "width": 1200, "height": 630}, "isLicensed": true}, "description": "ATLANTA (AP) — A woman who said Herschel Walker paid for her 2009 abortion is the mother of one of his children, according to a new report Wednesday, undercutting the Georgia Republican Senate", "provider": [{"_type": "Organization", "name": "The Associated Press", "image": {"_type": "ImageObject", "thumbnail": {"_type": "ImageObject", "contentUrl": "https:\/\/www.bing.com\/th?id=ODF.AlMAEy7MoWNz0OI_xSWQiw&pid=news"}}}], "datePublished": "2022-10-06T02:24:19.0000000Z"}, {"_type": "NewsArticle", "name": "Russian Missiles Hit Civilian Targets in Southeastern Ukraine", "url": "https:\/\/www.msn.com\/en-us\/news\/world\/russian-missiles-hit-civilian-targets-in-southeastern-ukraine\/ar-AA12ETig", "image": {"_type": "ImageObject", "thumbnail": {"_type": "ImageObject", "contentUrl": "https:\/\/www.bing.com\/th?id=OVFT.hGn8BxGACUGhjEPh6Imbgy&pid=News", "width": 552, "height": 314}, "isLicensed": true}, "description": "KYIV, Ukraine—Russian missiles struck the city center of the southeastern Ukrainian city of Zaporizhzhia, killing at least one person early on Thursday while Ukraine’s forces reclaimed more territory", "provider": [{"_type": "Organization", "name": "The Wall Street Journal.", "image": {"_type": "ImageObject", "thumbnail": {"_type": "ImageObject", "contentUrl": "https:\/\/www.bing.com\/th?id=ODF.15fnkpKGfQuTaaskfJ-smw&pid=news"}}}], "datePublished": "2022-10-06T10:29:00.0000000Z"}, {"_type": "NewsArticle", "name": "Rochester reaches $12M settlement for Daniel Prude's kids", "url": "https:\/\/www.msn.com\/en-us\/news\/crime\/rochester-reaches-12m-settlement-for-daniel-prudes-kids\/ar-AA12FKCH", "image": {"_type": "ImageObject", "thumbnail": {"_type": "ImageObject", "contentUrl": "https:\/\/www.bing.com\/th?id=ORMS.1201afeaeb96a5a29685d803ea07dc2b&pid=Wdp", "width": 4268, "height": 2764}, "isLicensed": true}, "description": "ROCHESTER, N.Y. (AP) — City officials agreed to pay $12 million to the children of Daniel Prude, a Black man who died after police held him down until he stopped breathing after encountering him", "provider": [{"_type": "Organization", "name": "The Associated Press", "image": {"_type": "ImageObject", "thumbnail": {"_type": "ImageObject", "contentUrl": "https:\/\/www.bing.com\/th?id=ODF.AlMAEy7MoWNz0OI_xSWQiw&pid=news"}}}], "datePublished": "2022-10-06T15:46:09.0000000Z"}, {"_type": "NewsArticle", "name": "Search continues for missing California family of four as new video shows kidnapping at gunpoint", "url": "https:\/\/www.msn.com\/en-us\/news\/crime\/search-continues-for-missing-california-family-of-four-as-new-video-shows-kidnapping-at-gunpoint\/ar-AA12DQ2m", "image": {"_type": "ImageObject", "thumbnail": {"_type": "ImageObject", "contentUrl": "https:\/\/www.bing.com\/th?id=OVFT.3RxLOfwTGZf1NiXwQLk6wS&pid=News", "width": 600, "height": 315}, "isLicensed": true}, "description": "             Authorities released surveillance video Wednesday showing the moments a masked suspect kidnapped a California family of four, including an 8-month-old girl, at gunpoint.              A", "provider": [{"_type": "Organization", "name": "USA TODAY", "image": {"_type": "ImageObject", "thumbnail": {"_type": "ImageObject", "contentUrl": "https:\/\/www.bing.com\/th?id=ODF.m1iod5ODNIyyKu23kGIllQ&pid=news"}}}], "datePublished": "2022-10-05T19:47:38.0000000Z"}, {"_type": "NewsArticle", "name": "Amid end to COVID help, homelessness surging in many cities", "url": "https:\/\/www.msn.com\/en-us\/news\/us\/amid-end-to-covid-help-homelessness-surging-in-many-cities\/ar-AA12FJah", "image": {"_type": "ImageObject", "thumbnail": {"_type": "ImageObject", "contentUrl": "https:\/\/www.bing.com\/th?id=ORMS.69f298ae668b8a38358b222fed8b1144&pid=Wdp", "width": 4206, "height": 2805}, "isLicensed": true}, "description": "SACRAMENTO, Calif. (AP) — In California’s capital, massive tent encampments have risen along the American River and highway overpasses have become havens for homeless people, whose numbers have", "provider": [{"_type": "Organization", "name": "The Associated Press", "image": {"_type": "ImageObject", "thumbnail": {"_type": "ImageObject", "contentUrl": "https:\/\/www.bing.com\/th?id=ODF.AlMAEy7MoWNz0OI_xSWQiw&pid=news"}}}], "datePublished": "2022-10-06T14:11:21.0000000Z"}, {"_type": "NewsArticle", "name": "Over 60 clinics in 15 U.S. states ceased abortion care post-Roe - study", "url": "https:\/\/www.msn.com\/en-us\/news\/us\/over-60-clinics-in-15-us-states-ceased-abortion-care-post-roe-study\/ar-AA12Etc6", "image": {"_type": "ImageObject", "thumbnail": {"_type": "ImageObject", "contentUrl": "https:\/\/www.bing.com\/th?id=OVFT.prxiNufAvx8go_rm63pboS&pid=News", "width": 1200, "height": 630}, "isLicensed": true}, "description": "By Gabriella Borter   WASHINGTON (Reuters) -   More than 60 abortion clinics across 15 states have stopped providing abortions since the U.S. Supreme Court overturned Roe v. Wade in June, according", "provider": [{"_type": "Organization", "name": "Reuters", "image": {"_type": "ImageObject", "thumbnail": {"_type": "ImageObject", "contentUrl": "https:\/\/www.bing.com\/th?id=ODF.jFXbg3L7Ce_1pS4_IOR8CA&pid=news"}}}], "datePublished": "2022-10-06T04:09:11.0000000Z"}]}