Skip to content

Real-time delivery

Polling /v1/news/everything on a timer wastes requests and still arrives late. These three options deliver matching articles the moment APITube indexes them. All of them take the same filters as /v1/news/everything — language, category, source, sentiment, entities, dates — so a real-time feed is just a saved search that stays open.

Which one do I need?

You wantUseGuide
The simplest live feed, one-way over HTTPGET https://api.apitube.io/v1/news/streamSSE stream
A socket you can also send messages onwss://api.apitube.io/v1/news/wsWebSocket stream
Articles posted to your own URL, no connection to holdWebhooksWebhooks

Pull the stream (SSE)

Server-Sent Events need nothing beyond an HTTP client that can hold a connection open — curl -N, EventSource in a browser, or any streaming HTTP library. One connection, one direction, automatic reconnection built into most clients:

bash
curl -N -H "X-API-Key: YOUR_API_KEY" \
  "https://api.apitube.io/v1/news/stream?language.code=en"

This is the default choice for a live dashboard or a consumer process you control.

Pull the stream (WebSocket)

The WebSocket stream delivers the same articles over a full-duplex connection with a typed message protocol, so the client can talk back rather than only listen. Pick it when your stack already speaks WebSocket, or when you want to adjust the subscription without reopening the connection.

Let APITube push (Webhooks)

A webhook is a saved query with a destination: you register a URL and a filter set once, and every newly indexed matching article arrives as an HTTP POST. Payloads are signed with HMAC-SHA256 in the X-Webhook-Signature header and failed deliveries are retried with exponential backoff.

Use webhooks when there is no long-running process to hold a connection — serverless functions, Zapier/Make/n8n automations, Slack or Telegram alerts.

Choosing in one line

Holding a connection is fine → SSE. Holding a connection and talking back → WebSocket. Nothing to hold a connection with → webhooks.

Next steps