Streaming API

The SSE event stream contract, generated from the AsyncAPI spec.

This reference is generated directly from our AsyncAPI specification (asyncapi.json), emitted from the Go source of truth (the same StreamEvent schema as the API reference), so it always matches the published contract. Subscribe over Server-Sent Events with an API key in the X-API-Key header (or as a Bearer token); the response content-type is text/event-stream.

How the stream frames events

Each SSE frame carries id: <uuidv7> (also the resume cursor), event: set to the public source tier (push, feed, or html), and data: holding the StreamEvent JSON. Two control frames are not payload messages and so do not appear in the message list below: an id:-only priming frame sent on backfill/resume to advance your cursor, and a : keepalive comment line that keeps the connection warm.

Resuming without gaps

Reconnect and pass the last id you saw as the Last-Event-ID request header (or ?since=<uuidv7>); the stream replays everything after it. A cursor older than your retained window returns 410 Gone, so treat a 410 as "start fresh from the live tip" rather than an error to retry.

Latency is per-tier

Latency is honest and per-source-tier: push sources arrive in seconds, RSS/JSON feeds in minutes, and feed-less HTML-diff sources in minutes to tens of minutes. The event: label tells you which tier an event came from; it is a latency framing, never a reason to branch consumer logic.

Hypeline Stream API (events)

Subscribe to Hypeline's unified, deduplicated live event stream over Server-Sent Events. Latency is honest and per-source-tier: push sources arrive in seconds, RSS/JSON feeds in minutes, and feed-less HTML-diff sources in minutes to tens of minutes. Resume gap-free with the Last-Event-ID cursor; a cursor older than the retained window returns 410 Gone. This document is written from the subscriber's (consumer's) viewpoint.

Servers

  • api.hypeline.io (https) Authenticated SSE endpoint. AsyncAPI has no SSE protocol, so SSE is modeled as https plus prose and http bindings. Authenticate with X-API-Key or a Bearer token; the response content-type is text/event-stream. (The host is a documented placeholder, cosmetic to codegen.)

Channels

SSE/v1/stream

Live normalized event stream (SSE)

Each SSE frame is `id: <uuidv7>` (also the Last-Event-ID resume cursor), `event: <public tier: push|feed|html>`, and `data: <StreamEvent JSON>`. Two control frames are NOT payload messages and are documented in prose only: an `id:`-only priming/cursor frame on backfill/resume, and a `: keepalive` comment line. Filter with ?source, ?source_type, ?tag and ?keyword; backfill with ?since=<uuidv7> or the Last-Event-ID request header.

Messages: feed, html, push

Operations

receivestream

Subscribe to the live normalized event stream (SSE).

Query parameters

FieldTypeDescription
keywordstringRepeatable keyword filter.
sincestringBackfill floor: replay events after this UUIDv7 id.
sourcestringRestrict to a source id (a trailing .* is a prefix match).
source_type"push" | "feed" | "html"
tagstringRepeatable tag filter.

Messages

feed Feed-tier event

A normalized event whose SSE `event:` label is `feed`.

Headers

FieldTypeDescription
Last-Event-IDstring <uuid>Request header: resume cursor of the last event the client saw.
idstring <uuid>SSE id: field; the UUIDv7 event id and the Last-Event-ID resume cursor.

Payload: application/json StreamEvent

html HTML-tier event

A normalized event whose SSE `event:` label is `html`.

Headers

FieldTypeDescription
Last-Event-IDstring <uuid>Request header: resume cursor of the last event the client saw.
idstring <uuid>SSE id: field; the UUIDv7 event id and the Last-Event-ID resume cursor.

Payload: application/json StreamEvent

push Push-tier event

A normalized event whose SSE `event:` label is `push`.

Headers

FieldTypeDescription
Last-Event-IDstring <uuid>Request header: resume cursor of the last event the client saw.
idstring <uuid>SSE id: field; the UUIDv7 event id and the Last-Event-ID resume cursor.

Payload: application/json StreamEvent

Schemas

StreamEvent

FieldTypeDescription
$schemastring <uri>A URL to the JSON Schema for this object.
authorrequiredstringItem author, when known.
contentrequiredstringExtracted main content (boilerplate removed).
content_hashrequiredstring | nullHash of the extracted content for the trivial-unchanged case; null until populated.
diffContentDiffItemized old->new change on html-tier whole-content events: added/removed/changed segments; null (omitted) on other tiers and cold starts.
emitted_atrequiredstring <date-time>When the Engine emitted this normalized event onto the stream.
fetched_atrequiredstring <date-time>When the Engine fetched the item.
idrequiredstringUUIDv7 event id; also the SSE Last-Event-ID resume cursor
key_idrequiredstringkid of the signing key; resolve the matching public JWK at /.well-known/jwks.json. Empty until signed.
published_atrequiredstring | nullSource-reported publish time; may be absent.
schema_versionrequiredinteger <int64>Contract version of this event (currently 1).
signaturerequiredstringContent-layer Ed25519 signature over this event (RFC 8785 JCS canonical form, signature field excluded), base64url-unpadded of the 64 raw bytes. Empty until the event is signed.
signed_atrequiredstring | nullWhen the signature was produced (RFC 3339 UTC); covered by the signature. null until signed.
simhashrequiredstring | null64-bit near-duplicate fingerprint of the extracted content, as a decimal string (exceeds JS Number precision as an integer); null until populated.
source_idrequiredstringThe source's stable UUID — the same 'id' POST /v1/sources returns. Correlate an event to a source directly by this id; ?source= filters on it too.
source_typerequiredstringSource tier label: push|feed|html|… Latency framing is per-tier; never a behavioural switch for consumers.
source_urlrequiredstringThe source's ingest key: the feed/page URL that produced this event (the push-tier adapter constant for born-live stream sources).
tagsrequiredarray | nullServer-side filter tags attached to this event.
titlerequiredstringItem title / headline.
urlrequiredstringCanonical URL of the item, when known.

ContentDiff

FieldTypeDescription
addedrequiredarray | null
changedrequiredarray | null
removedrequiredarray | null
truncatedrequiredboolean

Create-sourceRequest

FieldTypeDescription
$schemastring <uri>A URL to the JSON Schema for this object.
browser_stepsobjectOptional ordered interactive pre-capture steps (jsonb): [{op,selector,value}]. Validated at set time (structure + same-origin goto + selector denylist); login/secret steps rejected (deferred). Echo-only here; durable storage is the html_sources.browser_steps column read by the ingest loader.
categorizebooleanEnable the generic content-categorization capability for this source (default false).
clusterbooleanEnable the generic cross-source clustering capability for this source (default false).
preprocessobjectOptional per-source canonicalization knobs (jsonb); omit for all-defaults.
schedulestringOptional poll interval as a Go duration (e.g. "5m"); empty = tier default.
selectorstringOptional content-selector override (css:/xpath:/jq:/jqraw:/json: or a bare CSS selector); validated at set time, empty = structural auto-detect.
tagsarray | nullOptional general label tags (e.g. ["competitors"]); bare values are normalized to label:<slug>. Reserved prefixes cohort:/region:/topic:/outlet: are rejected.
type"push" | "feed" | "html"Optional operator override of the detected connector tier.
urlrequiredstring <uri>The source URL to add (any language/region; a feed, a streaming source, or a feed-less web page).

Detect-sourceRequest

FieldTypeDescription
$schemastring <uri>A URL to the JSON Schema for this object.
urlrequiredstring <uri>The URL to classify.

DetectDTO

FieldTypeDescription
$schemastring <uri>A URL to the JSON Schema for this object.
confidencerequiredstringDetection confidence: high|medium|low|unknown.
discovered_feed_urlstringA hidden feed URL discovered on an HTML page, if any.
evidencerequiredstringHuman-readable evidence for the classification.
supportedrequiredbooleanFalse = recognized tier with no connector yet.
typerequiredstringClassified connector tier: push|feed|html.

DiffSegment

FieldTypeDescription
afterstring
beforestring

ErrorDetail

FieldTypeDescription
locationstringWhere the error occurred, e.g. 'body.items[3].tags' or 'path.thing-id'
messagestringError message text
valueobjectThe value at the given location

ErrorModel

FieldTypeDescription
$schemastring <uri>A URL to the JSON Schema for this object.
detailstringA human-readable explanation specific to this occurrence of the problem.
errorsarray | nullOptional list of individual error details
instancestring <uri>A URI reference that identifies the specific occurrence of the problem.
statusinteger <int64>HTTP status code
titlestringA short, human-readable summary of the problem type. This value should not change between occurrences of the error.
typestring <uri>A URI reference to human-readable documentation for the error.

HealthDTO

FieldTypeDescription
$schemastring <uri>A URL to the JSON Schema for this object.
flagrequiredstringMaintenance flag: ok|degraded|rotten.
last_checked_atrequiredstring <date-time>Last time the source was polled, if any.
last_success_atrequiredstring <date-time>Last successful fetch, if any.
rankrequirednumber <double>Importance-weighted maintenance rank; higher = more urgent.
reasonstringHuman explanation of the dominating penalty.
scorerequirednumber <double>Health score in [0,1]; 1 = healthy.

HistoryPage

FieldTypeDescription
$schemastring <uri>A URL to the JSON Schema for this object.
eventsrequiredarray | nullThe events on this page, ascending by id (the UUIDv7 keyset cursor).
next_cursorrequiredstring | nullPass back as ?cursor= to fetch the next page; null when this is the last page.
retention_clampedrequiredbooleanTrue when the requested 'from' predated the key's retention window and was clamped up to window_from.
window_fromrequiredstringRFC3339 effective lower bound actually queried after the retention clamp (the tier floor when no wider 'from' was allowed).

PickerBox

FieldTypeDescription
hrequirednumber <double>Element height in CSS px.
selectorrequiredstringGenerated CSS selector for this element (compiles with cascadia).
tagrequiredstringLowercased HTML tag name.
textrequiredstringTrimmed element text, capped.
wrequirednumber <double>Element width in CSS px.
xrequirednumber <double>Page-absolute CSS px (scrollX included).
yrequirednumber <double>Page-absolute CSS px (scrollY included).

PickerDTO

FieldTypeDescription
$schemastring <uri>A URL to the JSON Schema for this object.
boxesrequiredarray | nullClickable element boxes with generated selectors.
dprrequirednumber <double>Device pixel ratio the screenshot was taken at.
formatrequiredstringScreenshot image format (jpeg).
screenshotrequiredstringBare base64 (no data: prefix) of the JPEG screenshot.
viewport_hrequiredinteger <int64>Captured page height in CSS px (height-capped).
viewport_wrequiredinteger <int64>Capture viewport width in CSS px.

RenderDocBody

FieldTypeDescription
$schemastring <uri>A URL to the JSON Schema for this object.
blockarray | nullOptional resource block list (e.g. font, media). Empty on a visual capture so images load.
formatstringImage encoding for a png output: png|jpeg|webp.
full_pagebooleanCapture the full scrollable page rather than the viewport.
outputarray | nullSubset of ["html","png","pdf"]; default ["png"]. One output streams raw bytes, multiple outputs return a base64 JSON envelope.
timeout_msinteger <int64>Per-request time budget in milliseconds (clamped to the server maximum).
urlrequiredstringThe absolute http(s) URL to render. Validated against the SSRF classifier before navigation.
viewportRenderDocViewportOptional viewport override (clamped to server maxima).
waitRenderDocWaitOptional content-settle wait before capture.

RenderDocViewport

FieldTypeDescription
heightinteger <int64>Viewport height in CSS pixels (clamped to the server maximum).
mobilebooleanEmulate a mobile device.
scalenumber <double>Device scale factor (clamped to the server maximum).
widthinteger <int64>Viewport width in CSS pixels (clamped to the server maximum).

RenderDocWait

FieldTypeDescription
msinteger <int64>Extra settle delay in milliseconds after load.
selectorstringWait for this CSS selector to appear before capture.

RenderMultiResponse

FieldTypeDescription
$schemastring <uri>A URL to the JSON Schema for this object.
final_urlrequiredstring
htmlstring
pdf_base64string
png_base64string

SourceDTO

FieldTypeDescription
$schemastring <uri>A URL to the JSON Schema for this object.
browser_stepsobjectOrdered interactive pre-capture steps (jsonb): [{op,selector,value}]. Ops: click|click_if_exists|type|select|scroll|wait_for_element|wait_for_text|press_enter|goto. goto is same-origin-only. Login/secret steps are not yet supported (deferred). Durable storage is the html_sources.browser_steps column read by the ingest loader.
categorizebooleanWhether the generic content-categorization capability is enabled for this source (default false). When on and the build-time master toggle is set, emitted events get topic:<slug> tags.
clusterbooleanWhether the generic cross-source clustering capability is enabled for this source (default false). When on and the build-time master toggle is set, events group into cross-source stories.
created_atrequiredstring <date-time>When the source was first added.
detected_typestringWhat add-time detection classified the URL as, before any operator override.
detection_confidencerequiredstringDetection confidence: high|medium|low|unknown.
detection_evidencestringHuman-readable evidence for the detected type (so a wrong guess is diagnosable).
discovered_feed_urlstringA hidden <link rel=alternate> feed discovered on an HTML page, if any.
enabledrequiredbooleanWhether the source is actively polled.
follow_one_hoprequiredbooleanWhether a listing item is followed one hop to its article (INGEST-06).
health_flagrequiredstringMaintenance flag: ok|degraded|rotten.
health_rankrequirednumber <double>Importance-weighted maintenance rank; higher = more urgent.
health_reasonstringHuman explanation of the dominating health penalty.
health_scorerequirednumber <double>Health score in [0,1]; 1 = healthy.
idrequiredstringStable source identifier (UUIDv7).
labelsarray | nullGeneral user label tags on this source (e.g. ["competitors"]); each maps to a label:<x> tag stamped onto emitted events.
moderequiredstringExtraction mode: auto|whole|listing.
preprocessobjectPer-source canonicalization knobs (jsonb): json_sort, line_sort, dedupe_lines, strip_obfuscation, whitespace, pdf_text. Omit for all-defaults. Durable storage is the html_sources.preprocess column read by the ingest loader.
schedulestringPoll interval as a Go duration string (e.g. "5m"); empty = tier default.
selectorstringOptional CSS selector override for feed-less HTML extraction.
supportedrequiredbooleanFalse = the tier is recognized but has no connector yet (e.g. a non-Bluesky push source).
typerequiredstringEffective connector tier: push|feed|html. Config-time selector, never a consumer branch.
updated_atrequiredstring <date-time>When the source config was last changed.
urlrequiredstringThe user-supplied source URL (one row per URL, the highway model).

Update-sourceRequest

FieldTypeDescription
$schemastring <uri>A URL to the JSON Schema for this object.
browser_stepsobjectReplace the source's ordered interactive pre-capture steps (jsonb); validated at set time (structure + same-origin goto + selector denylist), login/secret steps rejected (deferred). Echo-only here; nil = leave unchanged. Durable storage is the html_sources.browser_steps column.
categorizebooleanEnable/disable the generic content-categorization capability for this source.
clusterbooleanEnable/disable the generic cross-source clustering capability for this source.
enabledbooleanEnable/disable polling.
follow_one_hopbooleanFollow a listing item one hop to its article.
mode"auto" | "whole" | "listing"Extraction mode.
preprocessobjectReplace the source's per-source canonicalization knobs (jsonb); omit to leave unchanged.
schedulestringPoll interval as a Go duration string.
selectorstringCSS selector override.
type"push" | "feed" | "html"Connector tier override.