{"id":9111,"date":"2026-09-28T17:43:59","date_gmt":"2026-09-28T12:13:59","guid":{"rendered":"https:\/\/newsdata.io\/blog\/?p=9111"},"modified":"2026-09-28T17:43:59","modified_gmt":"2026-09-28T12:13:59","slug":"connect-newsdata-io-websocket-api","status":"publish","type":"post","link":"https:\/\/newsdata.io\/blog\/connect-newsdata-io-websocket-api\/","title":{"rendered":"How to Connect to NewsData.io&#8217;s WebSocket-based API in 5 Minutes"},"content":{"rendered":"[vc_row type=&#8221;in_container&#8221; full_screen_row_position=&#8221;middle&#8221; column_margin=&#8221;default&#8221; column_direction=&#8221;default&#8221; column_direction_tablet=&#8221;default&#8221; column_direction_phone=&#8221;default&#8221; scene_position=&#8221;center&#8221; text_color=&#8221;dark&#8221; text_align=&#8221;left&#8221; row_border_radius=&#8221;none&#8221; row_border_radius_applies=&#8221;bg&#8221; overflow=&#8221;visible&#8221; overlay_strength=&#8221;0.3&#8243; gradient_direction=&#8221;left_to_right&#8221; shape_divider_position=&#8221;bottom&#8221; bg_image_animation=&#8221;none&#8221;][vc_column column_padding=&#8221;no-extra-padding&#8221; column_padding_tablet=&#8221;inherit&#8221; column_padding_phone=&#8221;inherit&#8221; column_padding_position=&#8221;all&#8221; column_element_direction_desktop=&#8221;default&#8221; column_element_spacing=&#8221;default&#8221; desktop_text_alignment=&#8221;default&#8221; tablet_text_alignment=&#8221;default&#8221; phone_text_alignment=&#8221;default&#8221; background_color_opacity=&#8221;1&#8243; background_hover_color_opacity=&#8221;1&#8243; column_backdrop_filter=&#8221;none&#8221; column_shadow=&#8221;none&#8221; column_border_radius=&#8221;none&#8221; column_link_target=&#8221;_self&#8221; column_position=&#8221;default&#8221; gradient_direction=&#8221;left_to_right&#8221; overlay_strength=&#8221;0.3&#8243; width=&#8221;1\/4&#8243; tablet_width_inherit=&#8221;default&#8221; animation_type=&#8221;default&#8221; bg_image_animation=&#8221;none&#8221; border_type=&#8221;simple&#8221; column_border_width=&#8221;none&#8221; column_border_style=&#8221;solid&#8221; column_padding_type=&#8221;default&#8221; gradient_type=&#8221;default&#8221; offset=&#8221;vc_hidden-sm vc_hidden-xs&#8221;][\/vc_column][vc_column column_padding=&#8221;no-extra-padding&#8221; column_padding_tablet=&#8221;inherit&#8221; column_padding_phone=&#8221;inherit&#8221; column_padding_position=&#8221;all&#8221; column_element_direction_desktop=&#8221;default&#8221; column_element_spacing=&#8221;default&#8221; desktop_text_alignment=&#8221;default&#8221; tablet_text_alignment=&#8221;default&#8221; phone_text_alignment=&#8221;default&#8221; background_color_opacity=&#8221;1&#8243; background_hover_color_opacity=&#8221;1&#8243; column_backdrop_filter=&#8221;none&#8221; column_shadow=&#8221;none&#8221; column_border_radius=&#8221;none&#8221; column_link_target=&#8221;_self&#8221; column_position=&#8221;default&#8221; el_class=&#8221;text_block_wrapper&#8221; gradient_direction=&#8221;left_to_right&#8221; overlay_strength=&#8221;0.3&#8243; width=&#8221;3\/4&#8243; tablet_width_inherit=&#8221;default&#8221; animation_type=&#8221;default&#8221; bg_image_animation=&#8221;none&#8221; border_type=&#8221;simple&#8221; column_border_width=&#8221;none&#8221; column_border_style=&#8221;solid&#8221; column_padding_type=&#8221;default&#8221; gradient_type=&#8221;default&#8221; offset=&#8221;vc_col-lg-9 vc_col-md-12&#8243;][image_with_animation image_url=&#8221;9122&#8243; image_size=&#8221;full&#8221; animation_type=&#8221;entrance&#8221; animation=&#8221;None&#8221; animation_movement_type=&#8221;transform_y&#8221; hover_animation=&#8221;none&#8221; alignment=&#8221;&#8221; border_radius=&#8221;none&#8221; box_shadow=&#8221;none&#8221; image_loading=&#8221;default&#8221; max_width=&#8221;100%&#8221; max_width_mobile=&#8221;default&#8221;][vc_raw_html]JTNDZGl2JTIwY2xhc3MlM0QlMjJ0bGRyLWJveCUyMiUyMHN0eWxlJTNEJTIyYm9yZGVyLWxlZnQlM0ElMjA0cHglMjBzb2xpZCUyMCUyMzE4NUZBNSUzQiUyMHBhZGRpbmclM0ElMjAxNHB4JTIwMThweCUzQiUyMGJhY2tncm91bmQlM0ElMjAlMjNFNkYxRkIlM0IlMjBib3JkZXItcmFkaXVzJTNBJTIwMCUyMDhweCUyMDhweCUyMDAlM0IlMjBtYXJnaW4lM0ElMjAyMHB4JTIwMCUzQiUyMiUzRSUwQSUyMCUyMCUzQ3AlMjBzdHlsZSUzRCUyMmZvbnQtc2l6ZSUzQSUyMDExcHglM0IlMjBmb250LXdlaWdodCUzQSUyMDYwMCUzQiUyMGNvbG9yJTNBJTIwJTIzMTg1RkE1JTNCJTIwbGV0dGVyLXNwYWNpbmclM0ElMjAwLjA3ZW0lM0IlMjB0ZXh0LXRyYW5zZm9ybSUzQSUyMHVwcGVyY2FzZSUzQiUyMG1hcmdpbi1ib3R0b20lM0ElMjA4cHglM0IlMjIlM0VRdWljayUyMGFuc3dlciUzQSUzQyUyRnAlM0UlMEElMjAlMjAlM0NwJTIwc3R5bGUlM0QlMjJmb250LXNpemUlM0ElMjAxNXB4JTNCJTIwY29sb3IlM0ElMjAlMjMxYTFhMWElM0IlMjBsaW5lLWhlaWdodCUzQSUyMDEuNyUzQiUyMG1hcmdpbiUzQSUyMDAlM0IlMjIlM0UlMEFUbyUyMGNvbm5lY3QlMjB0byUyMHRoZSUyME5ld3NEYXRhLmlvJTIwV2ViU29ja2V0LWJhc2VkJTIwU3RyZWFtaW5nJTIwTmV3cyUyMEFQSSUyQyUyMHJlZ2lzdGVyJTIwYSUyMHF1ZXJ5JTIwd2l0aCUyMGF0JTIwbGVhc3QlMjBvbmUlMjBmaWx0ZXIuJTIwQ29weSUyMHRoZSUyMHJlZ2lzdHJhdGlvbiUyMElEJTIweW91JTIwcmVjZWl2ZS4lMjBUaGVuJTIwb3BlbiUyMGElMjBXZWJTb2NrZXQlMjBjb25uZWN0aW9uJTIwd2l0aCUyMHlvdXIlMjBBUEklMjBrZXklMjBhbmQlMjB0aGF0JTIwSUQuJTIwTWF0Y2hpbmclMjBhcnRpY2xlcyUyMHdpbGwlMjBhcnJpdmUlMjBhdXRvbWF0aWNhbGx5JTJDJTIwd2l0aCUyMG5vJTIwcmVmcmVzaGluZyUyMGFuZCUyMG5vJTIwcmVwZWF0JTIwcmVxdWVzdHMuJTBBJTIwJTIwJTNDJTJGcCUzRQ==[\/vc_raw_html][vc_column_text]This guide explains how <a href=\"http:\/\/newsdata.io\">NewsData.io<\/a> WebSocket works and how to connect to it in five minutes. Without the need for any coding.[\/vc_column_text][vc_column_text]\n<h2><b>What is the NewsData.io WebSocket-based API?<\/b><\/h2>\n<p>The NewsData.io WebSocket-based API is the live delivery channel of the <a href=\"https:\/\/newsdata.io\/blog\/real-time-streaming-api\/\"><strong>NewsData.io Streaming News API<\/strong><\/a>. You connect once and stay connected. New articles that match the filters in your query are pushed automatically the moment they are published.<\/p>\n<p>Think of it as a phone call. You don\u2019t need to redial to stay connected to the line. It stays open, and news reaches you when it happens.<\/p>\n<p>NewsData.io draws on more than 100,000+ news sources across 2026 countries and 89 languages. Your stream taps into that same coverage.[\/vc_column_text][vc_column_text]\n<h2><b>Why Use the NewsData.io Streaming News API?<\/b><\/h2>\n<p>Standard News APIs need repeated requests to get new articles. This is called <strong><a href=\"https:\/\/newsdata.io\/blog\/polling-vs-real-time-streaming\/\">polling<\/a><\/strong>. It delays results and misses major updates.<\/p>\n<p>The NewsData streaming news API fixes this loop:<\/p>\n<ul>\n<li><b>Instant delivery:<\/b> Articles are fetched as they are published and matched.<\/li>\n<li><b>Precise filters:<\/b> Filter by keyword, language, region, domain, or more.<\/li>\n<li><b>Richer data:<\/b> Request images, videos, and full content where available.<\/li>\n<li><b>Fair credit use:<\/b> Credits are used when articles are delivered, not when you connect.<\/li>\n<li><b>Easy testing:<\/b> An official Postman collection lets you test without code.<\/li>\n<\/ul>\n<h4><b>What you need before you start<\/b><\/h4>\n<ul>\n<li>A <a href=\"http:\/\/newsdata.io\">NewsData.io<\/a> account and API key.<\/li>\n<li>A free or paid plan. Both include real-time streaming.<\/li>\n<li>A topic you want to track.<\/li>\n<li>Postman, a free tool, for no-code setup.<\/li>\n<\/ul>\n[\/vc_column_text][vc_column_text]\n<h2><b>How to Connect in 5 Minutes<\/b><\/h2>\n<table>\n<tbody>\n<tr>\n<td><b>Step<\/b><\/td>\n<td><b>Action<\/b><\/td>\n<td><b>Time<\/b><\/td>\n<\/tr>\n<tr>\n<td>1<\/td>\n<td>Get your API key<\/td>\n<td>1 min<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>Register a query<\/td>\n<td>1 min<\/td>\n<\/tr>\n<tr>\n<td>3<\/td>\n<td>Copy your registration ID<\/td>\n<td>30 sec<\/td>\n<\/tr>\n<tr>\n<td>4<\/td>\n<td>Connect to the stream<\/td>\n<td>1 min<\/td>\n<\/tr>\n<tr>\n<td>5<\/td>\n<td>Watch articles arrive<\/td>\n<td>1 min<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3><b>Step 1: Get Your API Key<\/b><\/h3>\n<p>Sign up at NewsData.io and copy your key from the dashboard. Keep it private.<\/p>\n<h3><b>Step 2: Register a Query<\/b><\/h3>\n<p>A registered query is your personal news feed. It tells NewsData.io what to send you.<\/p>\n<p>Add at least one filter. A query can&#8217;t be registered without one. For example:<\/p>\n<ul>\n<li><b>Topic:<\/b> artificial intelligence<\/li>\n<li><b>Country:<\/b> United States<\/li>\n<li><b>Language:<\/b> English<\/li>\n<\/ul>\n<p>In Postman, choose New \u2192 HTTP Request \u2192 POST. Paste the registration address from the table below. Add your filters under <b>Params<\/b>, then click <b>Send<\/b>.<\/p>\n<h3><b>Step 3: Copy Your Registration ID<\/b><\/h3>\n<p>A successful request returns a unique registration ID. Save it. It connects you to the stream and lets you manage the query later.<\/p>\n<p>If you see a 409 message, the parameter already exists. Reuse the ID that comes with it. Check <a href=\"https:\/\/newsdata.io\/documentation#http-response\">NewsData.io\u2019s Documentation<\/a> to learn more about error codes.<\/p>\n<h3><b>Step 4: Connect to the Stream<\/b><\/h3>\n<p>Open a WebSocket connection using your API key and registration ID. In Postman, choose New \u2192 WebSocket, paste the address, and click <b>Connect<\/b>. Keep it open.<\/p>\n<h3><b>Step 5: Watch News Arrive<\/b><\/h3>\n<p>Every news article that matches your query appears automatically. You can now view or delete queries at any time.[\/vc_column_text][vc_column_text]\n<h2><b>Quick Address Sheet<\/b><\/h2>\n<table>\n<tbody>\n<tr>\n<td><b>Action<\/b><\/td>\n<td><b>Request type<\/b><\/td>\n<td><b>Address<\/b><\/td>\n<\/tr>\n<tr>\n<td>Register a query<\/td>\n<td>POST<\/td>\n<td>newsdata.io\/api\/1\/websocket\/register<\/td>\n<\/tr>\n<tr>\n<td>Connect to the stream<\/td>\n<td>WebSocket<\/td>\n<td>wss:\/\/ws.newsdata.io\/ws\/event<\/td>\n<\/tr>\n<tr>\n<td>View your queries<\/td>\n<td>GET<\/td>\n<td>newsdata.io\/api\/1\/websocket\/fetch<\/td>\n<\/tr>\n<tr>\n<td>Delete a query<\/td>\n<td>DELETE<\/td>\n<td>newsdata.io\/api\/1\/websocket\/delete<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Every request needs your key as apikey. Connecting and deleting also need registration_id.[\/vc_column_text][vc_column_text]\n<h2><b>Filters You Can Use<\/b><\/h2>\n<p>Advanced options include sentiment, tag, and region. Some filters can\u2019t be combined. For example, you can\u2019t use Country and excludeCountry together.<\/p>\n<h2><b>Manage Your Queries<\/b><\/h2>\n<p>Viewing your queries shows each registration ID, active clients, last-used time, news type, and filters.<\/p>\n<p>Delete queries you no longer need. NewsData.io then stops sending news for that ID. It also protects your credits.<\/p>\n<h2><b>Understand Credit Use<\/b><\/h2>\n<ul>\n<li>One article sent to one device uses one credit.<\/li>\n<li>Sending one article to three devices uses three credits.<\/li>\n<li>Broad queries, such as \u201cnews\u201d, can use credits quickly.<\/li>\n<li>Specific filters keep your stream relevant and affordable.<\/li>\n<\/ul>\n[\/vc_column_text][vc_column_text]\n<h2><b>Polling vs. NewsData.io WebSocket Streaming<\/b><\/h2>\n<table>\n<tbody>\n<tr>\n<td><b>Feature<\/b><\/td>\n<td><b>Standard polling<\/b><\/td>\n<td><b>NewsData.io WebSocket streaming<\/b><\/td>\n<\/tr>\n<tr>\n<td>How it works<\/td>\n<td>You ask again and again<\/td>\n<td>Connect once; news is pushed to you<\/td>\n<\/tr>\n<tr>\n<td>Update speed<\/td>\n<td>Delayed until the next check<\/td>\n<td>Delivered as matching articles arrive<\/td>\n<\/tr>\n<tr>\n<td>Connections<\/td>\n<td>Many repeated requests<\/td>\n<td>One open connection<\/td>\n<\/tr>\n<tr>\n<td>Page refresh<\/td>\n<td>Often needed<\/td>\n<td>Not needed<\/td>\n<\/tr>\n<tr>\n<td>Credit use<\/td>\n<td>Spent per request<\/td>\n<td>Spent per article delivered<\/td>\n<\/tr>\n<tr>\n<td>Filters<\/td>\n<td>Sent with every request<\/td>\n<td>Registered once, reused<\/td>\n<\/tr>\n<tr>\n<td>Best for<\/td>\n<td>Reports, research, history<\/td>\n<td>Live dashboards, alerts, AI agents<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><b>Who Uses a Real-Time News API?<\/b><\/h2>\n<p>As a real-time News API, NewsData.io suits many teams:<b><\/b><\/p>\n<ul>\n<li><b>Brand Monitoring:<\/b> Spot mentions as they happen.<\/li>\n<li><b>Finance and Crypto:<\/b> Track market-moving headlines.<\/li>\n<li><b>Newsroom:<\/b> Power live dashboards and alerts.<\/li>\n<li><b>AI agents:<\/b> Feed fresh news into automated workflows.<\/li>\n<li><b>Crisis Monitoring:<\/b> Follow emergencies as they unfold.<\/li>\n<\/ul>\n<p>Developers can use the official SDKs on GitHub. They support streaming, including automatic reconnection after short drops.[\/vc_column_text][vc_column_text]\n<h2><b>Conclusion<\/b><\/h2>\n<p>Connecting to NewsData.io\u2019s WebSocket-based streaming news API takes five simple steps: get a key, register a query, save the ID, connect, and watch fresh news arrive. With NewsData.io\u2019s streaming news API, you get regular updates without constant checking.<\/p>\n<p><b>Ready to start?<\/b><a href=\"https:\/\/newsdata.io\/register\"> Get your NewsData.io API key<\/a> and stream your first query today.[\/vc_column_text][vc_column_text]\n<h2><b>FAQs<\/b><\/h2>\n<h3><b>Q. What is the NewsData.io WebSocket API?<\/b><\/h3>\n<p>It is the live channel of the NewsData.io Streaming News API. It keeps one connection open and pushes matching articles to you.<\/p>\n<h3><b>Q. Is real-time streaming available on the free plan?<\/b><\/h3>\n<p>Yes. NewsData.io offers real-time streaming on all plans, including the free one.<\/p>\n<h3><b>Q. Do I need coding skills to connect?<\/b><\/h3>\n<p>No. Postman lets you register, connect, view, and delete queries without code.<\/p>\n<h3><b>Q. How many filters do I need?<\/b><\/h3>\n<p>At least one. NewsData.io won&#8217;t register a query without a filter.<\/p>\n<h3><b>Q. When are credits used?<\/b><\/h3>\n<p>When articles are delivered to your device, not when you connect.[\/vc_column_text][\/vc_column][\/vc_row]\n","protected":false},"excerpt":{"rendered":"<p>This guide explains how NewsData.io WebSocket works and how to connect to it in five minutes. Without the need for any coding.<\/p>\n","protected":false},"author":11,"featured_media":9122,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[6],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Connect to NewsData.io&#039;s WebSocket-based API in 5 Minutes<\/title>\n<meta name=\"description\" content=\"Connect to the NewsData.io WebSocket API in 5 minutes. Follow this simple guide to set up live news streams with the NewsData.io streaming API.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/newsdata.io\/blog\/connect-newsdata-io-websocket-api\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Connect to NewsData.io&#039;s WebSocket-based API in 5 Minutes\" \/>\n<meta property=\"og:description\" content=\"Connect to the NewsData.io WebSocket API in 5 minutes. Follow this simple guide to set up live news streams with the NewsData.io streaming API.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/newsdata.io\/blog\/connect-newsdata-io-websocket-api\/\" \/>\n<meta property=\"og:site_name\" content=\"Newsdata.io - Stay Updated with the Latest News API Trends\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-28T12:13:59+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/newsdata.io\/blog\/wp-content\/uploads\/2026\/09\/ChatGPT-Image-Sep-28-2026-05_04_08-PM-500kb.jpeg\" \/>\n\t<meta property=\"og:image:width\" content=\"1500\" \/>\n\t<meta property=\"og:image:height\" content=\"841\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Raghav Sharma\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Raghav Sharma\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/newsdata.io\/blog\/connect-newsdata-io-websocket-api\/\",\"url\":\"https:\/\/newsdata.io\/blog\/connect-newsdata-io-websocket-api\/\",\"name\":\"How to Connect to NewsData.io's WebSocket-based API in 5 Minutes\",\"isPartOf\":{\"@id\":\"https:\/\/newsdata.io\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/newsdata.io\/blog\/connect-newsdata-io-websocket-api\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/newsdata.io\/blog\/connect-newsdata-io-websocket-api\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/newsdata.io\/blog\/wp-content\/uploads\/2026\/09\/ChatGPT-Image-Sep-28-2026-05_04_08-PM-500kb.jpeg?fit=1500%2C841&ssl=1\",\"datePublished\":\"2026-09-28T12:13:59+00:00\",\"dateModified\":\"2026-09-28T12:13:59+00:00\",\"author\":{\"@id\":\"https:\/\/newsdata.io\/blog\/#\/schema\/person\/2c7fdfa00a8bc73559748ec23250f501\"},\"description\":\"Connect to the NewsData.io WebSocket API in 5 minutes. Follow this simple guide to set up live news streams with the NewsData.io streaming API.\",\"breadcrumb\":{\"@id\":\"https:\/\/newsdata.io\/blog\/connect-newsdata-io-websocket-api\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/newsdata.io\/blog\/connect-newsdata-io-websocket-api\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/newsdata.io\/blog\/connect-newsdata-io-websocket-api\/#primaryimage\",\"url\":\"https:\/\/i0.wp.com\/newsdata.io\/blog\/wp-content\/uploads\/2026\/09\/ChatGPT-Image-Sep-28-2026-05_04_08-PM-500kb.jpeg?fit=1500%2C841&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/newsdata.io\/blog\/wp-content\/uploads\/2026\/09\/ChatGPT-Image-Sep-28-2026-05_04_08-PM-500kb.jpeg?fit=1500%2C841&ssl=1\",\"width\":1500,\"height\":841,\"caption\":\"websocket real-time streaming news API\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/newsdata.io\/blog\/connect-newsdata-io-websocket-api\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog\",\"item\":\"https:\/\/newsdata.io\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Connect to NewsData.io&#8217;s WebSocket-based API in 5 Minutes\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/newsdata.io\/blog\/#website\",\"url\":\"https:\/\/newsdata.io\/blog\/\",\"name\":\"Newsdata.io - Stay Updated with the Latest News API Trends\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/newsdata.io\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/newsdata.io\/blog\/#\/schema\/person\/2c7fdfa00a8bc73559748ec23250f501\",\"name\":\"Raghav Sharma\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/newsdata.io\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c64fa1d6e5c1d3bb3076c1db38e95026?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/c64fa1d6e5c1d3bb3076c1db38e95026?s=96&d=mm&r=g\",\"caption\":\"Raghav Sharma\"},\"description\":\"Raghav Sharma is a content writer and media researcher at Newsdata.io, specializing in news industry analysis, media literacy, and the evolving landscape of digital journalism. With a background in English Literature and Journalism, along with a focus on fact-based reporting standards, Raghav covers topics including news API technology, editorial bias evaluation, and responsible information consumption. Raghav's work has covered media trends across categories, including healthcare news, international journalism, and API-driven publishing. You can connect with him on LinkedIn or explore more of his writing on the Newsdata.io blog.\",\"sameAs\":[\"https:\/\/www.linkedin.com\/in\/raghav-sharma-4981b4232\/\"],\"url\":\"https:\/\/newsdata.io\/blog\/author\/raghav\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Connect to NewsData.io's WebSocket-based API in 5 Minutes","description":"Connect to the NewsData.io WebSocket API in 5 minutes. Follow this simple guide to set up live news streams with the NewsData.io streaming API.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/newsdata.io\/blog\/connect-newsdata-io-websocket-api\/","og_locale":"en_US","og_type":"article","og_title":"How to Connect to NewsData.io's WebSocket-based API in 5 Minutes","og_description":"Connect to the NewsData.io WebSocket API in 5 minutes. Follow this simple guide to set up live news streams with the NewsData.io streaming API.","og_url":"https:\/\/newsdata.io\/blog\/connect-newsdata-io-websocket-api\/","og_site_name":"Newsdata.io - Stay Updated with the Latest News API Trends","article_published_time":"2026-09-28T12:13:59+00:00","og_image":[{"width":1500,"height":841,"url":"https:\/\/newsdata.io\/blog\/wp-content\/uploads\/2026\/09\/ChatGPT-Image-Sep-28-2026-05_04_08-PM-500kb.jpeg","type":"image\/jpeg"}],"author":"Raghav Sharma","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Raghav Sharma","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/newsdata.io\/blog\/connect-newsdata-io-websocket-api\/","url":"https:\/\/newsdata.io\/blog\/connect-newsdata-io-websocket-api\/","name":"How to Connect to NewsData.io's WebSocket-based API in 5 Minutes","isPartOf":{"@id":"https:\/\/newsdata.io\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/newsdata.io\/blog\/connect-newsdata-io-websocket-api\/#primaryimage"},"image":{"@id":"https:\/\/newsdata.io\/blog\/connect-newsdata-io-websocket-api\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/newsdata.io\/blog\/wp-content\/uploads\/2026\/09\/ChatGPT-Image-Sep-28-2026-05_04_08-PM-500kb.jpeg?fit=1500%2C841&ssl=1","datePublished":"2026-09-28T12:13:59+00:00","dateModified":"2026-09-28T12:13:59+00:00","author":{"@id":"https:\/\/newsdata.io\/blog\/#\/schema\/person\/2c7fdfa00a8bc73559748ec23250f501"},"description":"Connect to the NewsData.io WebSocket API in 5 minutes. Follow this simple guide to set up live news streams with the NewsData.io streaming API.","breadcrumb":{"@id":"https:\/\/newsdata.io\/blog\/connect-newsdata-io-websocket-api\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/newsdata.io\/blog\/connect-newsdata-io-websocket-api\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/newsdata.io\/blog\/connect-newsdata-io-websocket-api\/#primaryimage","url":"https:\/\/i0.wp.com\/newsdata.io\/blog\/wp-content\/uploads\/2026\/09\/ChatGPT-Image-Sep-28-2026-05_04_08-PM-500kb.jpeg?fit=1500%2C841&ssl=1","contentUrl":"https:\/\/i0.wp.com\/newsdata.io\/blog\/wp-content\/uploads\/2026\/09\/ChatGPT-Image-Sep-28-2026-05_04_08-PM-500kb.jpeg?fit=1500%2C841&ssl=1","width":1500,"height":841,"caption":"websocket real-time streaming news API"},{"@type":"BreadcrumbList","@id":"https:\/\/newsdata.io\/blog\/connect-newsdata-io-websocket-api\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog","item":"https:\/\/newsdata.io\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Connect to NewsData.io&#8217;s WebSocket-based API in 5 Minutes"}]},{"@type":"WebSite","@id":"https:\/\/newsdata.io\/blog\/#website","url":"https:\/\/newsdata.io\/blog\/","name":"Newsdata.io - Stay Updated with the Latest News API Trends","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/newsdata.io\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/newsdata.io\/blog\/#\/schema\/person\/2c7fdfa00a8bc73559748ec23250f501","name":"Raghav Sharma","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/newsdata.io\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/c64fa1d6e5c1d3bb3076c1db38e95026?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c64fa1d6e5c1d3bb3076c1db38e95026?s=96&d=mm&r=g","caption":"Raghav Sharma"},"description":"Raghav Sharma is a content writer and media researcher at Newsdata.io, specializing in news industry analysis, media literacy, and the evolving landscape of digital journalism. With a background in English Literature and Journalism, along with a focus on fact-based reporting standards, Raghav covers topics including news API technology, editorial bias evaluation, and responsible information consumption. Raghav's work has covered media trends across categories, including healthcare news, international journalism, and API-driven publishing. You can connect with him on LinkedIn or explore more of his writing on the Newsdata.io blog.","sameAs":["https:\/\/www.linkedin.com\/in\/raghav-sharma-4981b4232\/"],"url":"https:\/\/newsdata.io\/blog\/author\/raghav\/"}]}},"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/i0.wp.com\/newsdata.io\/blog\/wp-content\/uploads\/2026\/09\/ChatGPT-Image-Sep-28-2026-05_04_08-PM-500kb.jpeg?fit=1500%2C841&ssl=1","category":["API"],"featured_image_url":"https:\/\/i0.wp.com\/newsdata.io\/blog\/wp-content\/uploads\/2026\/09\/ChatGPT-Image-Sep-28-2026-05_04_08-PM-500kb.jpeg?fit=1500%2C841&ssl=1","_links":{"self":[{"href":"https:\/\/newsdata.io\/blog\/wp-json\/wp\/v2\/posts\/9111"}],"collection":[{"href":"https:\/\/newsdata.io\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/newsdata.io\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/newsdata.io\/blog\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/newsdata.io\/blog\/wp-json\/wp\/v2\/comments?post=9111"}],"version-history":[{"count":1,"href":"https:\/\/newsdata.io\/blog\/wp-json\/wp\/v2\/posts\/9111\/revisions"}],"predecessor-version":[{"id":9123,"href":"https:\/\/newsdata.io\/blog\/wp-json\/wp\/v2\/posts\/9111\/revisions\/9123"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/newsdata.io\/blog\/wp-json\/wp\/v2\/media\/9122"}],"wp:attachment":[{"href":"https:\/\/newsdata.io\/blog\/wp-json\/wp\/v2\/media?parent=9111"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/newsdata.io\/blog\/wp-json\/wp\/v2\/categories?post=9111"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/newsdata.io\/blog\/wp-json\/wp\/v2\/tags?post=9111"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}