How to Receive Instant Breaking-News Alerts
Receive new breaking articles through an SSE stream
Written by Erick Horn
June 27, 2026
Updated October 16, 2026
How to receive instant breaking-news alerts
Open an SSE connection to /v1/news/stream with is_breaking=1 to receive new breaking articles. SSE, or Server-Sent Events, keeps one connection open and sends articles as they become available.
curl -N -H "X-API-Key: YOUR_API_KEY" \
"https://api.apitube.io/v1/news/stream?is_breaking=1"
The -N flag makes cURL print each event as it arrives. Send your key through X-API-Key or the api_key query parameter.
What does an instant breaking-news alert look like?
Each article arrives as an article event. Its id: is the article ID, and data: contains the article JSON:
event: article
id: 123456
data: {"id":123456,"title":"...","is_breaking":true,"source":{"domain":"reuters.com"},...}
New matches are checked about every 30 seconds, with up to 50 articles sent per cycle. A comment starting with : is a heartbeat, sent about every 30 seconds to keep the connection open. Heartbeats are free.
A connection lasts up to six hours. Error ER0362 means it is time to reconnect. A fresh connection sends new articles, without a backlog. Availability also depends on your plan’s data delay.
How do I scope alerts to a topic, language or place?
Combine is_breaking=1 with other search filters. All must match. This example limits alerts to English articles from one source and selects three fields:
curl -N -H "X-API-Key: YOUR_API_KEY" \
"https://api.apitube.io/v1/news/stream?is_breaking=1&language.code=en&source.domain=reuters.com&fl=id,title,published_at"
To watch a place, add a geographic radius. This example uses 100 km around central London:
curl -N -H "X-API-Key: YOUR_API_KEY" \
"https://api.apitube.io/v1/news/stream?is_breaking=1&location.lat=51.5074&location.lng=-0.1278&location.radius=100"
is_breaking accepts 0 or 1. A non-numeric value returns 400 ER0185; another number returns 400 ER0186. See how to monitor breaking news and real-time events.
How do I reconnect without missing an alert?
Save the last event ID you received. After a disconnect, send it in the Last-Event-Id header:
curl -N -H "X-API-Key: YOUR_API_KEY" \
-H "Last-Event-Id: 123456" \
"https://api.apitube.io/v1/news/stream?is_breaking=1"
The stream resumes after that ID, then continues with new matches. In a browser, EventSource sends the last event ID automatically when it reconnects. See the SSE streaming guide for details.
What does a breaking-news stream cost?
Each delivered article uses one streaming credit. Keeping the connection open and receiving heartbeats cost nothing. No matches means no delivery charge.
SSE uses a separate streaming quota. Once it is empty, delivery can use pay-as-you-go balance if enabled and within your spending limit.
With no available quota or balance, the connection returns 402 ER0176. If funds run out during the stream, an error event with ER0301 closes it. Reconnect after adding funds or your quota renews.
Common Questions
- How many breaking-news streams can I run at once?
- Does is_breaking=1 mean the story is only minutes old?
- Can I test breaking alerts without spending credits?
- Should I use a stream or a webhook for alerts?
How many breaking-news streams can I run at once?
Free allows 1 SSE connection, Starter and Basic allow 2 each, Professional allows 10, and Corporate allows 50. Going over the limit returns 429 ER0360. Close a connection to free its slot.
Does is_breaking=1 mean the story is only minutes old?
No. It selects articles marked as breaking; it does not set a date window. A stream sends newly available matches, while a regular search can return older breaking articles.
Can I test breaking alerts without spending credits?
Yes. A test key returns preview content without using your quota. Use it to check event parsing and reconnection, then switch to a live key for normal delivery.
Should I use a stream or a webhook for alerts?
Use SSE for a client that stays connected, such as a live dashboard. Use a webhook to receive HTTP requests at your server. Both charge per delivered article. See SSE vs WebSocket vs webhooks.