Real-time delivery
Receive new articles as they become available, without sending repeated search requests. SSE, WebSocket and webhooks support the same filters as /v1/news/everything, including language, category, source, sentiment, entities and dates.
Which one do I need?
| You want | Use | Guide |
|---|---|---|
| The simplest live feed, one-way over HTTP | GET https://api.apitube.io/v1/news/stream | SSE stream |
| A socket you can also send messages on | wss://api.apitube.io/v1/news/ws | WebSocket stream |
| Articles posted to your own URL, no connection to hold | Webhooks | Webhooks |
Pull the stream (SSE)
With Server-Sent Events, the API sends articles over an open HTTP connection. Use curl -N, a browser's EventSource, or a streaming HTTP library. Most SSE clients reconnect automatically:
curl -N -H "X-API-Key: YOUR_API_KEY" \
"https://api.apitube.io/v1/news/stream?language.code=en"SSE works well for live dashboards and applications that can keep a connection open.
Pull the stream (WebSocket)
The WebSocket stream lets your application receive articles and send messages over the same connection. Use it if your application already uses WebSocket or needs connection acknowledgements and ping messages.
Let APITube push (Webhooks)
With a webhook, you register a URL and choose your filters. The API sends each new matching article to that URL as an HTTP POST. Use the HMAC-SHA256 signature in X-Webhook-Signature to verify the request. The API retries failed deliveries, waiting longer between attempts.
Use webhooks for serverless functions, Zapier/Make/n8n workflows, and Slack or Telegram alerts when you cannot keep a connection open.
Choosing in one line
Choose SSE to receive articles over an open connection. Choose WebSocket to also send messages and update filters. Choose webhooks to receive articles at your own URL.
Next steps
- Collect articles in a basic format: Raw articles
- Automate without code: n8n, Zapier, Make
- Narrow what you receive: Parameters