Understand starting points, bounds, wait behavior, and sessions.
Reading SDK
Use single-batch reads, read sessions, and check-tail calls.
Use this endpoint for a single-batch read or a streaming read session.Streaming sessions may be S2S-based (used by SDK readSession APIs) or SSE responses.
A request can specify at most one starting selector. If no selector is provided, the start is equivalent to tail_offset=0.
Query parameter
Unit
Starts at
seq_num
Sequence number
The first record whose sequence number is greater than or equal to seq_num.
timestamp
Milliseconds since Unix epoch
The first record whose timestamp is greater than or equal to timestamp.
tail_offset
Record count
The position tail.seq_num - tail_offset, saturated at the start of the stream.
tail_offset=0 starts at the tail. The tail is the next sequence number that will be assigned, so there is no existing record at that position.If a requested seq_num or timestamp is beyond the current tail, clamp=true moves the start to the current tail. This is most useful with wait > 0, where the read can then wait for future records. Without clamp, starts beyond the tail return 416 Range Not Satisfiable.
wait is how many seconds the read may wait at the tail for new records after all immediately available records have been returned.
Request mode
Default wait
Tail behavior
Single-batch read
0
Return immediately unless wait > 0.
Session with count, bytes, or until
0
Stop when a bound is reached or when the session catches up to the current tail, unless wait > 0.
Session without count, bytes, or until
Infinite
Follow the stream indefinitely, waiting at the tail for new records.
A single-batch read with wait > 0 may long poll for up to 60 seconds. If the wait elapses before records arrive, the response is an empty batch.For sessions, wait applies throughout the session while still respecting any count, bytes, or until bound.
If the basin has create_stream_on_readconfigured, a stream that does not exist is created on first read with the basin’s default stream config.The s2-stream-config header can override that default for the new stream. Its value is a JSON-encoded StreamConfig, the same object accepted by create. Unset fields inherit the basin’s default stream config.The header is only applied when the read creates the stream. It is ignored if the stream already exists, so it is safe to send on every request. To change the config of an existing stream, use reconfigure.
A header value that is not a valid StreamConfig is rejected with a 400bad_header error. The same header is accepted on append for basins with create_stream_on_append.
A read returns 416 Range Not Satisfiable when it cannot return records under the request’s effective wait and clamp behavior. The 416 response body is a TailResponse containing the current tail.
Request behavior
416 when
Effective wait > 0
The start is beyond the tail and clamp is omitted or false: seq_num > tail.seq_num or timestamp > tail.timestamp.
Effective wait = 0
No record is available immediately: the stream is empty, tail_offset = 0, seq_num >= tail.seq_num, or timestamp > tail.timestamp.
Starting exactly at the tail is valid; with wait > 0, the read waits for future records, and with wait = 0, it returns 416 because no record exists at the tail yet.
clamp=true only changes starts that are beyond the tail. It moves the start to the current tail, not to the last existing record.
Defines the interpretation of record data (header name, header value, and body) with the JSON content type.
Use raw (default) for efficient transmission and storage of Unicode data — storage will be in UTF-8.
Use base64 for safe transmission with efficient storage of binary data.
Duration in seconds to wait for new records.
The default duration is 0 if there is a bound on count, bytes, or until, and otherwise infinite.
Non-streaming reads are always bounded on count and bytes, so you can achieve long poll semantics by specifying a non-zero duration up to 60 seconds.
In the context of an SSE or S2S streaming read, the duration will bound how much time can elapse between records throughout the lifetime of the session.
Records that are durably sequenced on the stream, retrieved based on the requested criteria.
This can only be empty in response to a unary read (i.e. not SSE), if the request cannot be satisfied without violating an explicit bound (count, bytes, or until).
Sequence number that will be assigned to the next record on the stream, and timestamp of the last record.
This will only be present when reading recent records.
Show child attributes
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"S2","description":"API for unlimited, durable, real-time streams.","colors":{"primary":"#252525","light":"#E8E8E8","dark":"#252525"},"logo":{"light":"https://mintcdn.com/streamstore/2KVWF55FbBFAHG9D/logo/s2-black.png?fit=max\u0026auto=format\u0026n=2KVWF55FbBFAHG9D\u0026q=85\u0026s=a21a60dc6c4cc961bb234a8eba956217","dark":"https://mintcdn.com/streamstore/2KVWF55FbBFAHG9D/logo/s2-white.png?fit=max\u0026auto=format\u0026n=2KVWF55FbBFAHG9D\u0026q=85\u0026s=7cd77fc75c133fddce332121b1d71f64","href":"https://s2.dev/"},"favicon":"https://mintcdn.com/streamstore/2KVWF55FbBFAHG9D/logo/s2-black.png?fit=max\u0026auto=format\u0026n=2KVWF55FbBFAHG9D\u0026q=85\u0026s=a21a60dc6c4cc961bb234a8eba956217","api":{"openapi":"specs-denorm/v1/openapi.json","examples":{"defaults":"required","languages":["curl"]}},"appearance":{"default":"system","strict":false},"background":{"color":{"light":"#FFFFFF","dark":"#252525"}},"navbar":{"links":[{"href":"https://github.com/s2-streamstore/s2","label":"s2-streamstore/s2","type":"github"},{"href":"https://discord.gg/vTCs7kMkAf","label":"s2.dev","type":"discord"}]},"footer":{"socials":{"bluesky":"https://bsky.app/profile/s2.dev","x":"https://x.com/s2_streamstore","linkedin":"https://www.linkedin.com/company/streamstore","github":"https://github.com/s2-streamstore","discord":"https://discord.gg/vTCs7kMkAf"}},"seo":{"metatags":{"canonical":"https://s2.dev/docs"}},"integrations":{"posthog":{"apiKey":"phc_o0QA5I7imsTAAtxVm57BogVdpN0U7e70SmwD5lzaiAJ","apiHost":"https://php.s2.dev"}},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Blog","icon":"newspaper","href":"https://s2.dev/blog"},{"anchor":"Talk to us","icon":"comments","href":"https://s2.dev/contact"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"streamstore","hasAudioNarration":false,"actualSubdomain":"streamstore","customDomains":["s2.dev"],"gitSource":{"type":"github","owner":"s2-streamstore","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6adbbb7a6d07b13661cd85a0","collectionId":"146c9708-f08f-4ebd-9e49-a0d476507bca","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6adbbb7a6d07b13661cd85a0"},"feedback":{"thumbs":false},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6adbbb7a6d07b13661cd85a0","clientVersion":"0.0.3990","searchFilterCounts":[{"language":"default","tag":"API","count":27},{"language":"default","tag":"CLI","count":15},{"language":"default","tag":"Data Plane","count":15},{"language":"default","tag":"SDKs","count":14},{"language":"default","tag":"Concepts","count":13},{"language":"default","tag":"Integrations","count":13},{"language":"default","tag":"Platform","count":10},{"language":"default","tag":"Updates","count":10},{"language":"default","tag":"Control Plane","count":9},{"language":"default","tag":"Start","count":8}]},"assistantConfig":{},"basePath":"/docs","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":false},"customCss":[{"filePath":"custom.css","href":"/docs/_mintlify/custom/streamstore/c2f785041ee9d423/custom.css"},{"filePath":"asciinema-player.css","content":"@keyframes ap-loader-rotation{0%{transform:rotate(0deg)}to{transform:rotate(360deg)}}.ap-default-term-ff{--term-font-family:\"Cascadia Code\", \"Source Code Pro\", Menlo, Consolas, \"DejaVu Sans Mono\", monospace, \"Symbols Nerd Font\"}div.ap-wrapper{outline:0;height:100%;display:flex;justify-content:center}div.ap-wrapper .title-bar{display:none;top:-78px;transition:top .15s linear;position:absolute;left:0;right:0;box-sizing:content-box;font-size:20px;line-height:1em;padding:15px;font-family:sans-serif;color:#fff;background-color:rgba(0,0,0,.8)}div.ap-wrapper .title-bar img{vertical-align:middle;height:48px;margin-right:16px}div.ap-wrapper .title-bar a{color:#fff;text-decoration:underline}div.ap-wrapper .title-bar a:hover{text-decoration:none}div.ap-wrapper:fullscreen{background-color:#000;width:100%;align-items:center}div.ap-wrapper:fullscreen .title-bar{display:initial}div.ap-wrapper:fullscreen.hud .title-bar{top:0}div.ap-wrapper div.ap-player{text-align:left;display:inline-block;padding:0;position:relative;box-sizing:content-box;overflow:hidden;max-width:100%;border-radius:4px;font-size:15px;background-color:var(--term-color-background)}.ap-player{--term-color-foreground:#ffffff;--term-color-background:#000000;--term-color-0:var(--term-color-foreground);--term-color-1:var(--term-color-foreground);--term-color-2:var(--term-color-foreground);--term-color-3:var(--term-color-foreground);--term-color-4:var(--term-color-foreground);--term-color-5:var(--term-color-foreground);--term-color-6:var(--term-color-foreground);--term-color-7:var(--term-color-foreground);--term-color-8:var(--term-color-0);--term-color-9:var(--term-color-1);--term-color-10:var(--term-color-2);--term-color-11:var(--term-color-3);--term-color-12:var(--term-color-4);--term-color-13:var(--term-color-5);--term-color-14:var(--term-color-6);--term-color-15:var(--term-color-7)}div.ap-term{position:relative;font-family:var(--term-font-family);border-width:.75em;border-radius:0;border-style:solid;border-color:var(--term-color-background);box-sizing:content-box}div.ap-term canvas,div.ap-term svg.ap-term-symbols{position:absolute;inset:0;display:block;width:100%;height:100%}div.ap-term svg.ap-term-symbols{overflow:hidden;pointer-events:none}.ap-line span,div.ap-term svg.ap-term-symbols use{color:var(--term-color-foreground)}div.ap-term svg.ap-term-symbols:not(.ap-blink) .ap-blink{opacity:0}div.ap-term pre.ap-term-text{position:absolute;inset:0;box-sizing:content-box;overflow:hidden;padding:0;margin:0;display:block;white-space:pre;word-wrap:normal;word-break:normal;cursor:text;color:var(--term-color-foreground);outline:0;line-height:var(--term-line-height);font-family:inherit;font-size:inherit;font-variant-ligatures:none;border:0;border-radius:0;background-color:transparent!important}pre.ap-term-text .ap-line{display:block;width:100%;height:var(--term-line-height);position:absolute;top:calc(100%*var(--row)/var(--term-rows));letter-spacing:normal;overflow:hidden}pre.ap-term-text .ap-line span{position:absolute;left:calc(100%*var(--offset)/var(--term-cols));padding:0;display:inline-block;height:100%}pre.ap-term-text:not(.ap-blink) .ap-line .ap-blink{color:transparent;border-color:transparent}pre.ap-term-text .ap-bold{font-weight:700}pre.ap-term-text .ap-faint{opacity:.5}pre.ap-term-text .ap-underline{text-decoration:underline}pre.ap-term-text .ap-italic{font-style:italic}pre.ap-term-text .ap-strike{text-decoration:line-through}div.ap-player div.ap-control-bar{width:100%;height:32px;display:flex;justify-content:space-between;align-items:stretch;color:var(--term-color-foreground);box-sizing:content-box;line-height:1;position:absolute;bottom:0;left:0;opacity:0;transition:opacity .15s linear;user-select:none;border-top:2px solid color-mix(in oklab,var(--term-color-background) 80%,var(--term-color-foreground));z-index:30}div.ap-player div.ap-control-bar *{box-sizing:inherit}div.ap-control-bar svg.ap-icon path{fill:var(--term-color-foreground)}div.ap-control-bar span.ap-button{display:flex;flex:0 0 auto;cursor:pointer}div.ap-control-bar span.ap-playback-button{width:12px;height:12px;padding:10px;margin:0 0 0 2px}div.ap-control-bar span.ap-playback-button svg{height:12px;width:12px}div.ap-control-bar span.ap-timer{display:flex;flex:0 0 auto;min-width:50px;margin:0 10px;height:100%;text-align:center;font-size:13px;line-height:100%;cursor:default}div.ap-control-bar span.ap-timer span{font-family:var(--term-font-family);font-size:inherit;font-weight:600;margin:auto}div.ap-control-bar span.ap-timer .ap-time-remaining,div.ap-control-bar span.ap-timer:hover .ap-time-elapsed{display:none}div.ap-control-bar span.ap-timer:hover .ap-time-remaining{display:flex}div.ap-control-bar .ap-progressbar{display:block;flex:1 1 auto;height:100%;padding:0 10px}div.ap-control-bar .ap-progressbar .ap-bar{display:block;position:relative;cursor:default;height:100%;font-size:0}div.ap-control-bar .ap-progressbar .ap-bar .ap-gutter{display:block;position:absolute;top:15px;left:0;right:0;height:3px}div.ap-control-bar .ap-progressbar .ap-bar .ap-gutter-empty{background-color:color-mix(in oklab,var(--term-color-foreground) 20%,var(--term-color-background))}div.ap-control-bar .ap-progressbar .ap-bar .ap-gutter-full{width:100%;transform-origin:left center;background-color:var(--term-color-foreground);border-radius:3px}div.ap-control-bar.ap-seekable .ap-progressbar .ap-bar{cursor:pointer}div.ap-control-bar .ap-fullscreen-button{width:14px;height:14px;padding:9px;margin:0 2px 0 4px}div.ap-control-bar .ap-fullscreen-button svg{width:14px;height:14px}div.ap-control-bar .ap-fullscreen-button svg.ap-icon-fullscreen-on{display:inline}div.ap-control-bar .ap-fullscreen-button svg.ap-icon-fullscreen-off{display:none}div.ap-control-bar .ap-fullscreen-button .ap-tooltip,div.ap-control-bar .ap-kbd-button .ap-tooltip{right:5px;left:initial;transform:none}div.ap-control-bar .ap-kbd-button{height:14px;padding:9px;margin:0 0 0 4px}div.ap-control-bar .ap-kbd-button svg{width:26px;height:14px}div.ap-control-bar .ap-speaker-button{width:19px;padding:6px 9px;margin:0 0 0 4px;position:relative}div.ap-control-bar .ap-speaker-button svg{width:19px}div.ap-control-bar .ap-speaker-button .ap-tooltip{left:-50%;transform:none}div.ap-wrapper.ap-hud .ap-control-bar{opacity:1}div.ap-wrapper:fullscreen .ap-fullscreen-button svg.ap-icon-fullscreen-on{display:none}div.ap-wrapper:fullscreen .ap-fullscreen-button svg.ap-icon-fullscreen-off{display:inline}span.ap-progressbar span.ap-marker-container{display:block;top:0;bottom:0;width:21px;position:absolute;margin-left:-10px}span.ap-marker-container span.ap-marker{display:block;top:13px;bottom:12px;left:7px;right:7px;background-color:color-mix(in oklab,var(--term-color-foreground) 33%,var(--term-color-background));position:absolute;transition:top .1s,bottom .1s,left .1s,right .1s,background-color .1s;border-radius:50%}span.ap-marker-container span.ap-marker.ap-marker-past{background-color:var(--term-color-foreground)}span.ap-marker-container span.ap-marker:hover,span.ap-marker-container:hover span.ap-marker{background-color:var(--term-color-foreground);top:11px;bottom:10px;left:5px;right:5px}.ap-tooltip-container span.ap-tooltip{visibility:hidden;font-family:var(--term-font-family);font-weight:700;text-align:center;padding:0 .5em;border-radius:4px;position:absolute;z-index:1;white-space:nowrap;font-size:13px;line-height:2em;bottom:100%;left:50%;transform:translateX(-50%)}.ap-tooltip-container:hover span.ap-tooltip{visibility:visible}.ap-player .ap-overlay{z-index:10;background-repeat:no-repeat;background-position:center;position:absolute;top:0;left:0;right:0;bottom:0;display:flex;justify-content:center;align-items:center}.ap-player .ap-overlay-start{cursor:pointer}.ap-player .ap-overlay-start .ap-play-button{font-size:0;position:absolute;left:0;top:0;right:0;bottom:0;text-align:center;color:#fff;height:80px;max-height:66%;margin:auto}.ap-player .ap-overlay-start .ap-play-button div{height:100%}.ap-player .ap-overlay-start .ap-play-button div span{height:100%;display:block}.ap-player .ap-overlay-start .ap-play-button div span svg{height:100%;display:inline-block}.ap-player .ap-overlay-start .ap-play-button svg{filter:drop-shadow(0 0 5px rgba(0,0,0,.4))}.ap-player .ap-overlay-loading .ap-loader{width:48px;height:48px;border-radius:50%;display:inline-block;position:relative;border:10px solid;border-color:rgba(255,255,255,.3) rgba(255,255,255,.5) rgba(255,255,255,.7) #fff;border-color:color-mix(in srgb,var(--term-color-foreground) 30%,var(--term-color-background)) color-mix(in srgb,var(--term-color-foreground) 50%,var(--term-color-background)) color-mix(in srgb,var(--term-color-foreground) 70%,var(--term-color-background)) color-mix(in srgb,var(--term-color-foreground) 100%,var(--term-color-background));box-sizing:border-box;animation:ap-loader-rotation 1s linear infinite}.ap-player .ap-overlay-help>div div,.ap-player .ap-overlay-info{background-color:var(--term-color-background)}.ap-player .ap-overlay-help>div div kbd,.ap-player .ap-overlay-info span,.ap-tooltip-container span.ap-tooltip{color:var(--term-color-background);background-color:var(--term-color-foreground)}.ap-player .ap-overlay-info span{font-family:var(--term-font-family);font-size:2em;font-weight:700;padding:.5em .75em;text-transform:uppercase}.ap-player .ap-overlay-help{background-color:rgba(0,0,0,.8);container-type:inline-size}.ap-player .ap-overlay-help>div{font-family:var(--term-font-family);max-width:85%;max-height:85%;font-size:18px;color:var(--term-color-foreground);box-sizing:border-box;margin-bottom:32px}.ap-player .ap-overlay-help>div div{padding:calc(min(4cqw,40px));font-size:calc(min(1.9cqw,18px));border:1px solid color-mix(in oklab,var(--term-color-background) 90%,var(--term-color-foreground));border-radius:6px}.ap-player .ap-overlay-help>div div p{font-weight:700;margin:0 0 2em}.ap-player .ap-overlay-help>div div ul{list-style:none;padding:0}.ap-player .ap-overlay-help>div div ul li{margin:0 0 .75em}.ap-player .ap-overlay-help>div div kbd{padding:.2em .5em;border-radius:.2em;font-family:inherit;font-size:.85em;border:0;margin:0}.ap-player .ap-overlay-error span{font-size:8em}.ap-player .slide-enter-active{transition:opacity .2s}.ap-player .slide-enter-active.ap-was-playing{transition:top .2s ease-out,opacity .2s}.ap-player .slide-exit-active{transition:top .2s ease-in,opacity .2s}.ap-player .slide-enter{top:-50%;opacity:0}.ap-player .slide-enter-to{top:0}.ap-player .slide-enter,.ap-player .slide-enter-to,.ap-player .slide-exit,.ap-player .slide-exit-to{bottom:auto;height:100%}.ap-player .slide-exit{top:0}.ap-player .slide-exit-to{top:-50%;opacity:0}.asciinema-player-theme-asciinema{--term-color-foreground:#cccccc;--term-color-background:#121314;--term-color-0:#000000;--term-color-1:#dd3c69;--term-color-2:#4ebf22;--term-color-3:#ddaf3c;--term-color-4:#26b0d7;--term-color-5:#b954e1;--term-color-6:#54e1b9;--term-color-7:#d9d9d9;--term-color-8:#4d4d4d;--term-color-9:#dd3c69;--term-color-10:#4ebf22;--term-color-11:#ddaf3c;--term-color-12:#26b0d7;--term-color-13:#b954e1;--term-color-14:#54e1b9;--term-color-15:#ffffff}.asciinema-player-theme-dracula{--term-color-foreground:#f8f8f2;--term-color-background:#282a36;--term-color-0:#21222c;--term-color-1:#ff5555;--term-color-2:#50fa7b;--term-color-3:#f1fa8c;--term-color-4:#bd93f9;--term-color-5:#ff79c6;--term-color-6:#8be9fd;--term-color-7:#f8f8f2;--term-color-8:#6272a4;--term-color-9:#ff6e6e;--term-color-10:#69ff94;--term-color-11:#ffffa5;--term-color-12:#d6acff;--term-color-13:#ff92df;--term-color-14:#a4ffff;--term-color-15:#ffffff}.asciinema-player-theme-monokai{--term-color-foreground:#f8f8f2;--term-color-background:#272822;--term-color-0:#272822;--term-color-1:#f92672;--term-color-2:#a6e22e;--term-color-3:#f4bf75;--term-color-4:#66d9ef;--term-color-5:#ae81ff;--term-color-6:#a1efe4;--term-color-7:#f8f8f2;--term-color-8:#75715e;--term-color-15:#f9f8f5}.asciinema-player-theme-nord{--term-color-foreground:#eceff4;--term-color-background:#2e3440;--term-color-0:#3b4252;--term-color-1:#bf616a;--term-color-2:#a3be8c;--term-color-3:#ebcb8b;--term-color-4:#81a1c1;--term-color-5:#b48ead;--term-color-6:#88c0d0;--term-color-7:#eceff4}.asciinema-player-theme-seti{--term-color-foreground:#cacecd;--term-color-background:#111213;--term-color-0:#323232;--term-color-1:#c22832;--term-color-2:#8ec43d;--term-color-3:#e0c64f;--term-color-4:#43a5d5;--term-color-5:#8b57b5;--term-color-6:#8ec43d;--term-color-7:#eeeeee;--term-color-15:#ffffff}.asciinema-player-theme-solarized-dark,.asciinema-player-theme-solarized-light{--term-color-0:#073642;--term-color-1:#dc322f;--term-color-2:#859900;--term-color-3:#b58900;--term-color-4:#268bd2;--term-color-5:#d33682;--term-color-6:#2aa198;--term-color-7:#eee8d5;--term-color-8:#002b36;--term-color-9:#cb4b16;--term-color-10:#586e75;--term-color-12:#839496;--term-color-13:#6c71c4;--term-color-14:#93a1a1;--term-color-15:#fdf6e3}.asciinema-player-theme-solarized-dark{--term-color-foreground:#839496;--term-color-background:#002b36;--term-color-11:#657b83}.asciinema-player-theme-solarized-light{--term-color-foreground:#657b83;--term-color-background:#fdf6e3;--term-color-11:#657c83}.asciinema-player-theme-solarized-light .ap-overlay-start .ap-play-button svg .ap-play-btn-fill{fill:var(--term-color-1)}.asciinema-player-theme-solarized-light .ap-overlay-start .ap-play-button svg .ap-play-btn-stroke{stroke:var(--term-color-1)}.asciinema-player-theme-tango{--term-color-foreground:#cccccc;--term-color-background:#121314;--term-color-0:#000000;--term-color-1:#cc0000;--term-color-2:#4e9a06;--term-color-3:#c4a000;--term-color-4:#3465a4;--term-color-5:#75507b;--term-color-6:#06989a;--term-color-7:#d3d7cf;--term-color-8:#555753;--term-color-9:#ef2929;--term-color-10:#8ae234;--term-color-11:#fce94f;--term-color-12:#729fcf;--term-color-13:#ad7fa8;--term-color-14:#34e2e2;--term-color-15:#eeeeec}.asciinema-player-theme-gruvbox-dark{--term-color-foreground:#fbf1c7;--term-color-background:#282828;--term-color-0:#282828;--term-color-1:#cc241d;--term-color-2:#98971a;--term-color-3:#d79921;--term-color-4:#458588;--term-color-5:#b16286;--term-color-6:#689d6a;--term-color-7:#a89984;--term-color-8:#7c6f65;--term-color-9:#fb4934;--term-color-10:#b8bb26;--term-color-11:#fabd2f;--term-color-12:#83a598;--term-color-13:#d3869b;--term-color-14:#8ec07c;--term-color-15:#fbf1c7}"}],"page":{"pagePath":"api/records/read","slug":"/api/records/read","pageMetadata":{"openapi":"get /streams/{stream}/records","sidebarTitle":"read","description":"Read records from an S2 stream by sequence number, timestamp, or tail offset.","title":"Read records.","href":"/api/records/read"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Read records from an S2 stream by sequence number, timestamp, or tail offset.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{Card,CardGroup,CodeBlock,CodeGroup,Heading,Note,Table}=_components;if(!Card)_missingMdxReference(`Card`,true);if(!CardGroup)_missingMdxReference(`CardGroup`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsxs(CardGroup,{cols:2,children:[_jsx(Card,{title:`Read concepts`,icon:`list-timeline`,href:`/concepts/reads`,children:_jsx(_components.p,{children:`Understand starting points, bounds, wait behavior, and sessions.`})}),_jsx(Card,{title:`Reading SDK`,icon:`code`,href:`/sdk/reading`,children:_jsx(_components.p,{children:`Use single-batch reads, read sessions, and check-tail calls.`})})]}),`\n`,_jsx(_components.p,{children:`Use this endpoint for a single-batch read or a streaming read session.`}),`\n`,_jsxs(_components.p,{children:[`Streaming sessions may be `,_jsx(_components.a,{href:`/api/protocol#sessions`,children:`S2S`}),`-based (used by SDK `,_jsx(_components.a,{href:`/sdk/reading#read-session`,children:_jsx(_components.code,{children:`readSession`})}),` APIs) or `,_jsx(_components.a,{href:`#sse`,children:`SSE responses`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`parameters`,children:`Parameters`}),`\n`,_jsxs(_components.p,{children:[`Query parameters choose `,_jsx(_components.a,{href:`#starting-point`,children:`where the read starts`}),`, `,_jsx(_components.a,{href:`#bounds`,children:`what bounds apply`}),`, and `,_jsx(_components.a,{href:`#waiting-at-the-tail`,children:`whether the read waits at the tail`}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`starting-point`,children:`Starting point`}),`\n`,_jsxs(_components.p,{children:[`A request can specify at most one starting selector. If no selector is provided, the start is equivalent to `,_jsx(_components.code,{children:`tail_offset=0`}),`.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Query parameter`}),_jsx(_components.th,{children:`Unit`}),_jsx(_components.th,{children:`Starts at`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`seq_num`})}),_jsx(_components.td,{children:`Sequence number`}),_jsxs(_components.td,{children:[`The first record whose sequence number is greater than or equal to `,_jsx(_components.code,{children:`seq_num`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`timestamp`})}),_jsx(_components.td,{children:`Milliseconds since Unix epoch`}),_jsxs(_components.td,{children:[`The first record whose timestamp is greater than or equal to `,_jsx(_components.code,{children:`timestamp`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`tail_offset`})}),_jsx(_components.td,{children:`Record count`}),_jsxs(_components.td,{children:[`The position `,_jsx(_components.code,{children:`tail.seq_num - tail_offset`}),`, saturated at the start of the stream.`]})]})]})]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`tail_offset=0`}),` starts at the tail. The tail is the next sequence number that will be assigned, so there is no existing record at that position.`]}),`\n`,_jsxs(_components.p,{children:[`If a requested `,_jsx(_components.code,{children:`seq_num`}),` or `,_jsx(_components.code,{children:`timestamp`}),` is beyond the current tail, `,_jsx(_components.code,{children:`clamp=true`}),` moves the start to the current tail. This is most useful with `,_jsx(_components.code,{children:`wait > 0`}),`, where the read can then wait for future records. Without `,_jsx(_components.code,{children:`clamp`}),`, starts beyond the tail return `,_jsx(_components.code,{children:`416 Range Not Satisfiable`}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`bounds`,children:`Bounds`}),`\n`,_jsx(_components.p,{children:`Bounds limit how far a read may continue after its starting point.`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Query parameter`}),_jsx(_components.th,{children:`Unit`}),_jsx(_components.th,{children:`Behavior`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`count`})}),_jsx(_components.td,{children:`Records`}),_jsx(_components.td,{children:`Stop after this many records. For single-batch reads, the effective maximum is 1000 records.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`bytes`})}),_jsx(_components.td,{children:`Bytes`}),_jsx(_components.td,{children:`Limit the total metered bytes returned. For single-batch reads, the effective maximum is 1 MiB.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`until`})}),_jsx(_components.td,{children:`Timestamp`}),_jsxs(_components.td,{children:[`Stop before records whose timestamp is greater than or equal to `,_jsx(_components.code,{children:`until`}),`.`]})]})]})]}),`\n`,_jsx(_components.p,{children:`When multiple bounds are present, the read stops at the first bound reached.`}),`\n`,_jsx(Heading,{level:`3`,id:`waiting-at-the-tail`,children:`Waiting at the tail`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`wait`}),` is how many seconds the read may wait at the tail for new records after all immediately available records have been returned.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Request mode`}),_jsxs(_components.th,{children:[`Default `,_jsx(_components.code,{children:`wait`})]}),_jsx(_components.th,{children:`Tail behavior`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Single-batch read`}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`0`})}),_jsxs(_components.td,{children:[`Return immediately unless `,_jsx(_components.code,{children:`wait > 0`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[`Session with `,_jsx(_components.code,{children:`count`}),`, `,_jsx(_components.code,{children:`bytes`}),`, or `,_jsx(_components.code,{children:`until`})]}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`0`})}),_jsxs(_components.td,{children:[`Stop when a bound is reached or when the session catches up to the current tail, unless `,_jsx(_components.code,{children:`wait > 0`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[`Session without `,_jsx(_components.code,{children:`count`}),`, `,_jsx(_components.code,{children:`bytes`}),`, or `,_jsx(_components.code,{children:`until`})]}),_jsx(_components.td,{children:`Infinite`}),_jsx(_components.td,{children:`Follow the stream indefinitely, waiting at the tail for new records.`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`A single-batch read with `,_jsx(_components.code,{children:`wait > 0`}),` may long poll for up to 60 seconds. If the wait elapses before records arrive, the response is an empty batch.`]}),`\n`,_jsxs(_components.p,{children:[`For sessions, `,_jsx(_components.code,{children:`wait`}),` applies throughout the session while still respecting any `,_jsx(_components.code,{children:`count`}),`, `,_jsx(_components.code,{children:`bytes`}),`, or `,_jsx(_components.code,{children:`until`}),` bound.`]}),`\n`,_jsx(Heading,{level:`2`,id:`stream-config-on-auto-creation`,children:`Stream config on auto-creation`}),`\n`,_jsxs(_components.p,{children:[`If the basin has `,_jsx(_components.code,{children:`create_stream_on_read`}),` `,_jsx(_components.a,{href:`/concepts/configs#basin-config`,children:`configured`}),`, a stream that does not exist is created on first read with the basin’s default stream config.`]}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`s2-stream-config`}),` header can override that default for the new stream. Its value is a JSON-encoded `,_jsx(_components.a,{href:`/concepts/configs#stream-config`,children:_jsx(_components.code,{children:`StreamConfig`})}),`, the same object accepted by `,_jsx(_components.a,{href:`/api/streams/create`,children:`create`}),`. Unset fields inherit the basin’s default stream config.`]}),`\n`,_jsxs(_components.p,{children:[`The header is only applied when the read creates the stream. It is ignored if the stream already exists, so it is safe to send on every request. To change the config of an existing stream, use `,_jsx(_components.a,{href:`/api/streams/reconfigure`,children:`reconfigure`}),`.`]}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`Request`,numberOfLines:`4`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --request`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` GET`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --url`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'https://{basin}.b.s2.dev/v1/streams/{stream}/records?tail_offset=0\u0026wait=60'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:' \"Authorization: Bearer ${'}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`S2_ACCESS_TOKEN`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`}\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 's2-stream-config: {\"retention_policy\":{\"age\":3600},\"delete_on_empty\":{\"min_age_secs\":300}}'`})]}),`\n`]})})})}),`\n`,_jsxs(_components.p,{children:[`A header value that is not a valid `,_jsx(_components.code,{children:`StreamConfig`}),` is rejected with a `,_jsx(_components.code,{children:`400`}),` `,_jsx(_components.a,{href:`/api/error-codes`,children:_jsx(_components.code,{children:`bad_header`})}),` error. The same header is accepted on `,_jsx(_components.a,{href:`/api/records/append#stream-config-on-auto-creation`,children:`append`}),` for basins with `,_jsx(_components.code,{children:`create_stream_on_append`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`when-reads-return-416`,children:`When reads return 416`}),`\n`,_jsxs(_components.p,{children:[`A read returns `,_jsx(_components.code,{children:`416 Range Not Satisfiable`}),` when it cannot return records under the request’s effective `,_jsx(_components.code,{children:`wait`}),` and `,_jsx(_components.code,{children:`clamp`}),` behavior. The `,_jsxs(_components.a,{href:`/api/error-codes#read-range-not-satisfiable-416`,children:[_jsx(_components.code,{children:`416`}),` response body`]}),` is a `,_jsx(_components.code,{children:`TailResponse`}),` containing the current tail.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Request behavior`}),_jsxs(_components.th,{children:[_jsx(_components.code,{children:`416`}),` when`]})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[`Effective `,_jsx(_components.code,{children:`wait > 0`})]}),_jsxs(_components.td,{children:[`The start is beyond the tail and `,_jsx(_components.code,{children:`clamp`}),` is omitted or `,_jsx(_components.code,{children:`false`}),`: `,_jsx(_components.code,{children:`seq_num > tail.seq_num`}),` or `,_jsx(_components.code,{children:`timestamp > tail.timestamp`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[`Effective `,_jsx(_components.code,{children:`wait = 0`})]}),_jsxs(_components.td,{children:[`No record is available immediately: the stream is empty, `,_jsx(_components.code,{children:`tail_offset = 0`}),`, `,_jsx(_components.code,{children:`seq_num >= tail.seq_num`}),`, or `,_jsx(_components.code,{children:`timestamp > tail.timestamp`}),`.`]})]})]})]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Starting exactly at the tail is valid`}),`; with `,_jsx(_components.code,{children:`wait > 0`}),`, the read waits for future records, and with `,_jsx(_components.code,{children:`wait = 0`}),`, it returns `,_jsx(_components.code,{children:`416`}),` because no record exists at the tail yet.`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`clamp=true`}),` only changes starts that are beyond the tail. It moves the start to the current tail, not to the last existing record.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`sse`,children:`SSE`}),`\n`,_jsxs(_components.p,{children:[`Server push with `,_jsx(_components.a,{href:`https://html.spec.whatwg.org/multipage/server-sent-events.html`,children:`Server-Sent Events`}),` (SSE) is supported. Clients can request an SSE response by setting the `,_jsx(_components.code,{children:`Accept: text/event-stream`}),` header.`]}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`Request`,numberOfLines:`4`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --request`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` GET`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --url`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'https://hello-world.b.s2.dev/v1/streams/test/records?seq_num=0'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:' \"Authorization: Bearer ${'}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`S2_ACCESS_TOKEN`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`}\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Accept: text/event-stream'`})]}),`\n`]})})})}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Batch`,numberOfLines:`3`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`event:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` batch`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`id:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 4,5,74`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`data:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` {\"records\":[{\"seq_num\":4,\"timestamp\":1750101582144,\"body\":\"hello\"}],\"tail\":{\"seq_num\":5,\"timestamp\":1750101582144}}`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Ping`,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`event:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ping`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`data:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` {\"timestamp\":1750101582144}`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Error`,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`event:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` error`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`data:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Something`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` went`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` wrong`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Done`,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`data:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [DONE]`})]}),`\n`]})})})]}),`\n`,_jsxs(_components.p,{children:[`Any `,_jsx(_components.code,{children:`error`}),` message will terminate the stream.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"openapi":"get /streams/{stream}/records","sidebarTitle":"read","description":"Read records from an S2 stream by sequence number, timestamp, or tail offset.","title":"Read records.","href":"/api/records/read"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Parameters","slug":"parameters","depth":2,"children":[{"title":"Starting point","slug":"starting-point","depth":3,"children":[]},{"title":"Bounds","slug":"bounds","depth":3,"children":[]},{"title":"Waiting at the tail","slug":"waiting-at-the-tail","depth":3,"children":[]}]},{"title":"Stream config on auto-creation","slug":"stream-config-on-auto-creation","depth":2,"children":[]},{"title":"When reads return 416","slug":"when-reads-return-416","depth":2,"children":[]},{"title":"SSE","slug":"sse","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/docs/_mintlify/custom/streamstore/00ba98d0ea337170/asciinema-init.js","/docs/_mintlify/custom/streamstore/9345475b878fd043/asciinema-player.min.js","/docs/_mintlify/custom/streamstore/cf00df61fe9b4388/copy-page-markdown.js"],"openApiReferenceData":{"operation":{"tags":["records"],"summary":"Read records.","operationId":"read","parameters":["a0c702ea-7a1e-4dd5-86c9-20d70d8249ca","41b67685-5565-4176-bafe-7d8c96eab0af","a3375ea9-6992-4e1d-9e84-22c63c07bb36","7e2d2cea-098e-4f61-a932-92dbe00350ca","b8c6c159-e793-4935-98b2-55058bc8ca54","7eabdf32-3f93-490b-a2ec-c3296fc44511","90b8a8f9-0659-458a-8b73-f28adb32eb47","94da1024-72ab-437a-a9fe-4a9f17425b03","7e4fdb19-3436-4c4e-88d4-a9d24a54087c","a3072fc1-8334-4c80-8a40-41912b30c9d3","b30649a7-c403-43c6-929b-4282c2055eca","665612bf-ed85-40a3-b4d3-784899a8ee90"],"responses":{"200":"47922016-f1e4-40f3-a465-b6e530dc0ee3","400":"db2fcb9f-f74e-4e79-a48e-2d59b0d1731e","403":"2b82d616-cd1b-457c-939d-4fb48ad14541","404":"5f4502d3-5135-4821-8cc8-eb8b5d35eae2","408":"10a85b56-758f-46d9-97e7-a9ab4b737b28","409":"1a333410-19bd-474d-ae5e-500fc76b4fce","416":"2eab1709-510f-4f8c-be3c-30fa7eb6cbca"},"method":"get","type":"path","servers":["3f981a3d-bdf4-402c-8a86-f8ddfe78bd48"],"security":["e702926f-6fd7-494a-af77-5be9a0e0a9dc"],"path":"/streams/{stream}/records","baseUrlOptions":["https://{basin}.b.s2.dev/v1"],"title":"Read records.","description":"Read records from an S2 stream by sequence number, timestamp, or tail offset.","codeSamples":[],"requestExampleLanguages":["bash"],"requiredOnlyExamples":true,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"a0c702ea-7a1e-4dd5-86c9-20d70d8249ca":{"name":"stream","in":"path","description":"Stream name.","required":true,"schema":{"type":"string","maxLength":512,"minLength":1,"isRequired":true,"description":"Stream name.","uniqueKey":"","typeLabel":"string"}},"41b67685-5565-4176-bafe-7d8c96eab0af":{"name":"s2-format","in":"header","description":"Defines the interpretation of record data (header name, header value, and body) with the JSON content type.\nUse `raw` (default) for efficient transmission and storage of Unicode data — storage will be in UTF-8.\nUse `base64` for safe transmission with efficient storage of binary data.","required":false,"schema":{"type":"string","enum":["raw","base64"],"isRequired":false,"description":"Defines the interpretation of record data (header name, header value, and body) with the JSON content type.\nUse `raw` (default) for efficient transmission and storage of Unicode data — storage will be in UTF-8.\nUse `base64` for safe transmission with efficient storage of binary data.","uniqueKey":"","typeLabel":"enum\u003cstring>"}},"a3375ea9-6992-4e1d-9e84-22c63c07bb36":{"name":"s2-encryption-key","in":"header","description":"Encryption key material for append and read operations.\nProvide base64-encoded key when stream encryption is enabled.","required":false,"schema":{"type":"string","isRequired":false,"description":"Encryption key material for append and read operations.\nProvide base64-encoded key when stream encryption is enabled.","uniqueKey":"","typeLabel":"string"}},"7e2d2cea-098e-4f61-a932-92dbe00350ca":{"name":"s2-stream-config","in":"header","description":"JSON-encoded `StreamConfig` to apply if the stream is created on append or read.\nUnset fields inherit the basin's default stream configuration.\nIgnored if the stream already exists.\nCompact JSON is preferred.","required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"delete_on_empty":{"oneOf":[{"type":"null","uniqueKey":"delete_on_empty.oneOf.0","typeLabel":"null"},{"type":"object","description":"Delete-on-empty configuration.","properties":{"min_age_secs":{"type":"integer","format":"int64","description":"Minimum age in seconds before an empty stream can be deleted.\nSet to 0 (default) to disable delete-on-empty (don't delete automatically).","minimum":0,"uniqueKey":"delete_on_empty.oneOf.1.min_age_secs","typeLabel":"integer\u003cint64>"}},"uniqueKey":"delete_on_empty.oneOf.1","typeLabel":"object"}],"uniqueKey":"delete_on_empty","typeLabel":"null | object"},"retention_policy":{"oneOf":[{"type":"null","uniqueKey":"retention_policy.oneOf.0","typeLabel":"null"},{"type":"object","description":"Retention policy for the stream.\nIf unspecified, the default is to retain records for 7 days.","required":["age"],"properties":{"age":{"type":"integer","format":"int64","description":"Age in seconds for automatic trimming of records older than this threshold.\nThis must be set to a value greater than 0 seconds.","minimum":0,"isRequired":true,"uniqueKey":"retention_policy.oneOf.1.age","typeLabel":"integer\u003cint64>"}},"uniqueKey":"retention_policy.oneOf.1","typeLabel":"object"},{"type":"object","description":"Retention policy for the stream.\nIf unspecified, the default is to retain records for 7 days.","required":["infinite"],"properties":{"infinite":{"type":"object","description":"Retain records unless explicitly trimmed.","isRequired":true,"uniqueKey":"retention_policy.oneOf.2.infinite","typeLabel":"object"}},"uniqueKey":"retention_policy.oneOf.2","typeLabel":"object"}],"uniqueKey":"retention_policy","typeLabel":"null · object · object"},"storage_class":{"oneOf":[{"type":"string","description":"[Storage class](https://s2.dev/docs/storage-classes) for recent writes.","uniqueKey":"storage_class.oneOf.0","typeLabel":"string"},{"type":"null","description":"[Storage class](https://s2.dev/docs/storage-classes) for recent writes.","uniqueKey":"storage_class.oneOf.1","typeLabel":"null"}],"uniqueKey":"storage_class","typeLabel":"string | null"},"timestamping":{"oneOf":[{"type":"null","uniqueKey":"timestamping.oneOf.0","typeLabel":"null"},{"type":"object","description":"Timestamping behavior.","properties":{"mode":{"oneOf":[{"type":"null","uniqueKey":"timestamping.oneOf.1.mode.oneOf.0","typeLabel":"null"},{"type":"string","description":"Timestamping mode for appends that influences how timestamps are handled.","enum":["client-prefer","client-require","arrival"],"uniqueKey":"timestamping.oneOf.1.mode.oneOf.1","typeLabel":"enum\u003cstring>"}],"uniqueKey":"timestamping.oneOf.1.mode","typeLabel":"null | enum\u003cstring>"},"uncapped":{"oneOf":[{"type":"boolean","description":"Allow client-specified timestamps to exceed the arrival time.\nIf this is `false` or not set, client timestamps will be capped at the arrival time.","uniqueKey":"timestamping.oneOf.1.uncapped.oneOf.0","typeLabel":"boolean"},{"type":"null","description":"Allow client-specified timestamps to exceed the arrival time.\nIf this is `false` or not set, client timestamps will be capped at the arrival time.","uniqueKey":"timestamping.oneOf.1.uncapped.oneOf.1","typeLabel":"null"}],"uniqueKey":"timestamping.oneOf.1.uncapped","typeLabel":"boolean | null"}},"uniqueKey":"timestamping.oneOf.1","typeLabel":"object"}],"uniqueKey":"timestamping","typeLabel":"null | object"}},"isRequired":false,"description":"JSON-encoded `StreamConfig` to apply if the stream is created on append or read.\nUnset fields inherit the basin's default stream configuration.\nIgnored if the stream already exists.\nCompact JSON is preferred.","uniqueKey":"","typeLabel":"object"},"example":{"delete_on_empty":{"min_age_secs":300},"retention_policy":{"age":3600}}}}},"b8c6c159-e793-4935-98b2-55058bc8ca54":{"name":"seq_num","in":"query","description":"Start from a sequence number.","required":false,"schema":{"type":"integer","format":"int64","minimum":0,"isRequired":false,"description":"Start from a sequence number.","uniqueKey":"","typeLabel":"integer\u003cint64>"}},"7eabdf32-3f93-490b-a2ec-c3296fc44511":{"name":"timestamp","in":"query","description":"Start from a timestamp.","required":false,"schema":{"type":"integer","format":"int64","minimum":0,"isRequired":false,"description":"Start from a timestamp.","uniqueKey":"","typeLabel":"integer\u003cint64>"}},"90b8a8f9-0659-458a-8b73-f28adb32eb47":{"name":"tail_offset","in":"query","description":"Start from number of records before the next sequence number.","required":false,"schema":{"type":"integer","format":"int64","minimum":0,"isRequired":false,"description":"Start from number of records before the next sequence number.","uniqueKey":"","typeLabel":"integer\u003cint64>"}},"94da1024-72ab-437a-a9fe-4a9f17425b03":{"name":"clamp","in":"query","description":"Start reading from the tail if the requested position is beyond it.\nOtherwise, a `416 Range Not Satisfiable` response is returned.","required":false,"schema":{"type":"boolean","isRequired":false,"description":"Start reading from the tail if the requested position is beyond it.\nOtherwise, a `416 Range Not Satisfiable` response is returned.","uniqueKey":"","typeLabel":"boolean"}},"7e4fdb19-3436-4c4e-88d4-a9d24a54087c":{"name":"count","in":"query","description":"Record count limit.\nNon-streaming reads are capped by the default limit of 1000 records.","required":false,"schema":{"type":"integer","format":"int64","minimum":0,"isRequired":false,"description":"Record count limit.\nNon-streaming reads are capped by the default limit of 1000 records.","uniqueKey":"","typeLabel":"integer\u003cint64>"}},"a3072fc1-8334-4c80-8a40-41912b30c9d3":{"name":"bytes","in":"query","description":"Metered bytes limit.\nNon-streaming reads are capped by the default limit of 1 MiB.","required":false,"schema":{"type":"integer","minimum":0,"isRequired":false,"description":"Metered bytes limit.\nNon-streaming reads are capped by the default limit of 1 MiB.","uniqueKey":"","typeLabel":"integer"}},"b30649a7-c403-43c6-929b-4282c2055eca":{"name":"until","in":"query","description":"Exclusive timestamp to read until.","required":false,"schema":{"type":"integer","format":"int64","minimum":0,"isRequired":false,"description":"Exclusive timestamp to read until.","uniqueKey":"","typeLabel":"integer\u003cint64>"}},"665612bf-ed85-40a3-b4d3-784899a8ee90":{"name":"wait","in":"query","description":"Duration in seconds to wait for new records.\nThe default duration is 0 if there is a bound on `count`, `bytes`, or `until`, and otherwise infinite.\nNon-streaming reads are always bounded on `count` and `bytes`, so you can achieve long poll semantics by specifying a non-zero duration up to 60 seconds.\nIn the context of an SSE or S2S streaming read, the duration will bound how much time can elapse between records throughout the lifetime of the session.","required":false,"schema":{"type":"integer","format":"int32","minimum":0,"isRequired":false,"description":"Duration in seconds to wait for new records.\nThe default duration is 0 if there is a bound on `count`, `bytes`, or `until`, and otherwise infinite.\nNon-streaming reads are always bounded on `count` and `bytes`, so you can achieve long poll semantics by specifying a non-zero duration up to 60 seconds.\nIn the context of an SSE or S2S streaming read, the duration will bound how much time can elapse between records throughout the lifetime of the session.","uniqueKey":"","typeLabel":"integer\u003cint32>"}}},"responses":{"47922016-f1e4-40f3-a465-b6e530dc0ee3":{"description":"","content":{"application/json":{"schema":{"type":"object","required":["records"],"properties":{"records":{"type":"array","items":{"type":"object","description":"Record that is durably sequenced on a stream.","required":["seq_num","timestamp"],"properties":{"seq_num":{"type":"integer","format":"int64","minimum":0,"description":"Sequence number assigned by the service.","isRequired":true,"uniqueKey":"records.items.[INDEX].seq_num","typeLabel":"integer\u003cint64>"},"timestamp":{"type":"integer","format":"int64","minimum":0,"description":"Timestamp for this record.","isRequired":true,"uniqueKey":"records.items.[INDEX].timestamp","typeLabel":"integer\u003cint64>"},"body":{"type":"string","description":"Body of the record.","uniqueKey":"records.items.[INDEX].body","typeLabel":"string"},"headers":{"type":"array","items":{"type":"array","items":{"type":"string","uniqueKey":"records.items.[INDEX].headers.items.[INDEX].items.[INDEX]","typeLabel":"string"},"maxItems":2,"minItems":2,"uniqueKey":"records.items.[INDEX].headers.items.[INDEX]","typeLabel":"string[]"},"description":"Series of name-value pairs for this record.","uniqueKey":"records.items.[INDEX].headers","typeLabel":"string[][]"}},"uniqueKey":"records.items.[INDEX]","typeLabel":"object"},"description":"Records that are durably sequenced on the stream, retrieved based on the requested criteria.\nThis can only be empty in response to a unary read (i.e. not SSE), if the request cannot be satisfied without violating an explicit bound (`count`, `bytes`, or `until`).","isRequired":true,"uniqueKey":"records","typeLabel":"object[]"},"tail":{"oneOf":[{"type":"null","uniqueKey":"tail.oneOf.0","typeLabel":"null"},{"type":"object","description":"Sequence number that will be assigned to the next record on the stream, and timestamp of the last record.\nThis will only be present when reading recent records.","required":["seq_num","timestamp"],"properties":{"seq_num":{"type":"integer","format":"int64","minimum":0,"description":"Sequence number assigned by the service.","isRequired":true,"uniqueKey":"tail.oneOf.1.seq_num","typeLabel":"integer\u003cint64>"},"timestamp":{"type":"integer","format":"int64","minimum":0,"description":"Timestamp, which may be client-specified or assigned by the service.\nIf it is assigned by the service, it will represent milliseconds since Unix epoch.","isRequired":true,"uniqueKey":"tail.oneOf.1.timestamp","typeLabel":"integer\u003cint64>"}},"uniqueKey":"tail.oneOf.1","typeLabel":"object"}],"uniqueKey":"tail","typeLabel":"null | object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"records":[{"seq_num":1,"timestamp":1,"body":"\u003cstring>","headers":[["\u003cstring>"]]}],"tail":{"seq_num":1,"timestamp":1}}}},"exampleType":"generated"},"text/event-stream":{"schema":{"oneOf":[{"type":"object","title":"batch","required":["event","data","id"],"properties":{"data":{"type":"object","required":["records"],"properties":{"records":{"type":"array","items":{"type":"object","description":"Record that is durably sequenced on a stream.","required":["seq_num","timestamp"],"properties":{"seq_num":{"type":"integer","format":"int64","minimum":0,"description":"Sequence number assigned by the service.","isRequired":true,"uniqueKey":"oneOf.0.data.records.items.[INDEX].seq_num","typeLabel":"integer\u003cint64>"},"timestamp":{"type":"integer","format":"int64","minimum":0,"description":"Timestamp for this record.","isRequired":true,"uniqueKey":"oneOf.0.data.records.items.[INDEX].timestamp","typeLabel":"integer\u003cint64>"},"body":{"type":"string","description":"Body of the record.","uniqueKey":"oneOf.0.data.records.items.[INDEX].body","typeLabel":"string"},"headers":{"type":"array","items":{"type":"array","items":{"type":"string","uniqueKey":"oneOf.0.data.records.items.[INDEX].headers.items.[INDEX].items.[INDEX]","typeLabel":"string"},"maxItems":2,"minItems":2,"uniqueKey":"oneOf.0.data.records.items.[INDEX].headers.items.[INDEX]","typeLabel":"string[]"},"description":"Series of name-value pairs for this record.","uniqueKey":"oneOf.0.data.records.items.[INDEX].headers","typeLabel":"string[][]"}},"uniqueKey":"oneOf.0.data.records.items.[INDEX]","typeLabel":"object"},"description":"Records that are durably sequenced on the stream, retrieved based on the requested criteria.\nThis can only be empty in response to a unary read (i.e. not SSE), if the request cannot be satisfied without violating an explicit bound (`count`, `bytes`, or `until`).","isRequired":true,"uniqueKey":"oneOf.0.data.records","typeLabel":"object[]"},"tail":{"oneOf":[{"type":"null","uniqueKey":"oneOf.0.data.tail.oneOf.0","typeLabel":"null"},{"type":"object","description":"Sequence number that will be assigned to the next record on the stream, and timestamp of the last record.\nThis will only be present when reading recent records.","required":["seq_num","timestamp"],"properties":{"seq_num":{"type":"integer","format":"int64","minimum":0,"description":"Sequence number assigned by the service.","isRequired":true,"uniqueKey":"oneOf.0.data.tail.oneOf.1.seq_num","typeLabel":"integer\u003cint64>"},"timestamp":{"type":"integer","format":"int64","minimum":0,"description":"Timestamp, which may be client-specified or assigned by the service.\nIf it is assigned by the service, it will represent milliseconds since Unix epoch.","isRequired":true,"uniqueKey":"oneOf.0.data.tail.oneOf.1.timestamp","typeLabel":"integer\u003cint64>"}},"uniqueKey":"oneOf.0.data.tail.oneOf.1","typeLabel":"object"}],"uniqueKey":"oneOf.0.data.tail","typeLabel":"null | object"}},"isRequired":true,"uniqueKey":"oneOf.0.data","typeLabel":"object"},"event":{"type":"string","enum":["batch"],"isRequired":true,"uniqueKey":"oneOf.0.event","typeLabel":"enum\u003cstring>"},"id":{"type":"string","pattern":"^[0-9]+,[0-9]+,[0-9]+$","isRequired":true,"uniqueKey":"oneOf.0.id","typeLabel":"string"}},"uniqueKey":"oneOf.0","typeLabel":"batch · object"},{"type":"object","title":"error","required":["event","data"],"properties":{"data":{"type":"string","isRequired":true,"uniqueKey":"oneOf.1.data","typeLabel":"string"},"event":{"type":"string","enum":["error"],"isRequired":true,"uniqueKey":"oneOf.1.event","typeLabel":"enum\u003cstring>"}},"uniqueKey":"oneOf.1","typeLabel":"error · object"},{"type":"object","title":"ping","required":["event","data"],"properties":{"data":{"type":"object","required":["timestamp","tail"],"properties":{"tail":{"type":"object","description":"Sequence number that will be assigned to the next record on the stream, and timestamp of the last record.","required":["seq_num","timestamp"],"properties":{"seq_num":{"type":"integer","format":"int64","minimum":0,"description":"Sequence number assigned by the service.","isRequired":true,"uniqueKey":"oneOf.2.data.tail.seq_num","typeLabel":"integer\u003cint64>"},"timestamp":{"type":"integer","format":"int64","minimum":0,"description":"Timestamp, which may be client-specified or assigned by the service.\nIf it is assigned by the service, it will represent milliseconds since Unix epoch.","isRequired":true,"uniqueKey":"oneOf.2.data.tail.timestamp","typeLabel":"integer\u003cint64>"}},"isRequired":true,"uniqueKey":"oneOf.2.data.tail","typeLabel":"object"},"timestamp":{"type":"integer","format":"int64","description":"Time the ping was emitted, as Unix epoch milliseconds.","minimum":0,"isRequired":true,"uniqueKey":"oneOf.2.data.timestamp","typeLabel":"integer\u003cint64>"}},"isRequired":true,"uniqueKey":"oneOf.2.data","typeLabel":"object"},"event":{"type":"string","enum":["ping"],"isRequired":true,"uniqueKey":"oneOf.2.event","typeLabel":"enum\u003cstring>"}},"uniqueKey":"oneOf.2","typeLabel":"ping · object"}],"uniqueKey":"","typeLabel":"batch · object | error · object | ping · object"},"examples":{"Example":{"title":"Example","value":{"data":{"records":[{"seq_num":1,"timestamp":1,"body":"\u003cstring>","headers":[["\u003cstring>"]]}],"tail":{"seq_num":1,"timestamp":1}},"event":"batch","id":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"db2fcb9f-f74e-4e79-a48e-2d59b0d1731e":{"description":"","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","isRequired":true,"uniqueKey":"code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"message","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"code":"\u003cstring>","message":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"2b82d616-cd1b-457c-939d-4fb48ad14541":{"description":"","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","isRequired":true,"uniqueKey":"code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"message","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"code":"\u003cstring>","message":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"5f4502d3-5135-4821-8cc8-eb8b5d35eae2":{"description":"","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","isRequired":true,"uniqueKey":"code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"message","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"code":"\u003cstring>","message":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"10a85b56-758f-46d9-97e7-a9ab4b737b28":{"description":"","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","isRequired":true,"uniqueKey":"code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"message","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"code":"\u003cstring>","message":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"1a333410-19bd-474d-ae5e-500fc76b4fce":{"description":"","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","isRequired":true,"uniqueKey":"code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"message","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"code":"\u003cstring>","message":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"2eab1709-510f-4f8c-be3c-30fa7eb6cbca":{"description":"","content":{"application/json":{"schema":{"type":"object","required":["tail"],"properties":{"tail":{"type":"object","description":"Sequence number that will be assigned to the next record on the stream, and timestamp of the last record.","required":["seq_num","timestamp"],"properties":{"seq_num":{"type":"integer","format":"int64","minimum":0,"description":"Sequence number assigned by the service.","isRequired":true,"uniqueKey":"tail.seq_num","typeLabel":"integer\u003cint64>"},"timestamp":{"type":"integer","format":"int64","minimum":0,"description":"Timestamp, which may be client-specified or assigned by the service.\nIf it is assigned by the service, it will represent milliseconds since Unix epoch.","isRequired":true,"uniqueKey":"tail.timestamp","typeLabel":"integer\u003cint64>"}},"isRequired":true,"uniqueKey":"tail","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"tail":{"seq_num":1,"timestamp":1}}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"e702926f-6fd7-494a-af77-5be9a0e0a9dc":{"access_token":{"type":"http","scheme":"bearer","description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your access token.","scopes":[],"schemeName":"access_token"}}},"servers":{"3f981a3d-bdf4-402c-8a86-f8ddfe78bd48":{"url":"https://{basin}.b.s2.dev/v1","description":"Endpoint for the basin","variables":{"basin":{"default":"","description":"Basin name"}}}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your access token.","scopes":[],"schemeName":"access_token"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your access token.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"access_token","name":"Authorization"}],"title":"access_token"}]},"originalFileLocation":"specs-denorm/v1/openapi.json"},"subdomain":"streamstore","siteName":"S2","title":"Read records. - S2","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-28T01:02:30.620Z","originalFileLocation":"api/records/read.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Read records from an S2 stream by sequence number, timestamp, or tail offset.\">\u003cmeta data-mint-head name=\"application-name\" content=\"S2\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/streamstore/A9aRpo3I3-CnbGBz/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/streamstore/A9aRpo3I3-CnbGBz/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/streamstore/A9aRpo3I3-CnbGBz/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/streamstore/A9aRpo3I3-CnbGBz/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/streamstore/A9aRpo3I3-CnbGBz/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/streamstore/A9aRpo3I3-CnbGBz/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/streamstore/A9aRpo3I3-CnbGBz/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/streamstore/A9aRpo3I3-CnbGBz/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/streamstore/A9aRpo3I3-CnbGBz/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Read records. - S2\">\u003cmeta data-mint-head property=\"og:description\" content=\"Read records from an S2 stream by sequence number, timestamp, or tail offset.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"S2\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://s2.dev/docs/api/records/read\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://streamstore.mintlify.app/_mintlify/api/og/v2?division=records\u0026amp;title=Read+records.\u0026amp;description=Read+records+from+an+S2+stream+by+sequence+number%2C+timestamp%2C+or+tail+offset.\u0026amp;theme=0bf2fcc0d6937ccab2e1eca2\u0026amp;signature=115f806c4b5b68d6b1750cec255f22e99b8ea78e9a297ca49a152e9b3bdf644a\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Read records. - S2\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Read records from an S2 stream by sequence number, timestamp, or tail offset.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://streamstore.mintlify.app/_mintlify/api/og/v2?division=records\u0026amp;title=Read+records.\u0026amp;description=Read+records+from+an+S2+stream+by+sequence+number%2C+timestamp%2C+or+tail+offset.\u0026amp;theme=0bf2fcc0d6937ccab2e1eca2\u0026amp;signature=115f806c4b5b68d6b1750cec255f22e99b8ea78e9a297ca49a152e9b3bdf644a\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/streamstore/A9aRpo3I3-CnbGBz/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"S2\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#252525\">\u003clink data-mint-head rel=\"canonical\" href=\"https://s2.dev/docs/api/records/read\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/api/records/read.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://s2.dev/#organization\",\"name\":\"S2\",\"url\":\"https://s2.dev\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/streamstore/2KVWF55FbBFAHG9D/logo/s2-black.png?fit=max\u0026auto=format\u0026n=2KVWF55FbBFAHG9D\u0026q=85\u0026s=a21a60dc6c4cc961bb234a8eba956217\"}},{\"@type\":\"WebSite\",\"@id\":\"https://s2.dev/docs#website\",\"name\":\"S2\",\"url\":\"https://s2.dev/docs\",\"publisher\":{\"@id\":\"https://s2.dev/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://s2.dev/docs/api/records/read#webpage\",\"url\":\"https://s2.dev/docs/api/records/read\",\"name\":\"Read records.\",\"description\":\"Read records from an S2 stream by sequence number, timestamp, or tail offset.\",\"dateModified\":\"2026-09-28T01:02:30.620Z\",\"isPartOf\":{\"@id\":\"https://s2.dev/docs#website\"},\"breadcrumb\":{\"@id\":\"https://s2.dev/docs/api/records/read#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://s2.dev/docs/api/records/read#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"records\",\"item\":\"https://s2.dev/docs/api/records/append\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Read records.\",\"item\":\"https://s2.dev/docs/api/records/read\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://s2.dev/docs/api/records/read#apireference\",\"headline\":\"Read records.\",\"name\":\"Read records.\",\"description\":\"Read records from an S2 stream by sequence number, timestamp, or tail offset.\",\"url\":\"https://s2.dev/docs/api/records/read\",\"mainEntityOfPage\":{\"@id\":\"https://s2.dev/docs/api/records/read#webpage\"},\"dateModified\":\"2026-09-28T01:02:30.620Z\",\"publisher\":{\"@id\":\"https://s2.dev/#organization\"},\"isPartOf\":{\"@id\":\"https://s2.dev/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"S2\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"S2","nav":{"global":{"anchors":[{"anchor":"Blog","icon":"newspaper","href":"https://s2.dev/blog"},{"anchor":"Talk to us","icon":"comments","href":"https://s2.dev/contact"}]},"tabs":[{"tab":"Start","pages":[{"title":"Start","href":"/intro"}]},{"tab":"Concepts","pages":[{"title":"Concepts","href":"/concepts/records"}]},{"tab":"Platform","pages":[{"title":"Platform","href":"/platform/cells"}]},{"tab":"SDKs","pages":[{"title":"SDKs","href":"/sdk/languages"}]},{"tab":"CLI","pages":[{"title":"CLI","href":"/cli/overview"}]},{"tab":"API","pages":[{"title":"Protocol","icon":"link","href":"/api/protocol"},{"title":"Endpoints","icon":"globe-pointer","href":"/api/endpoints"},{"title":"Error Codes","icon":"circle-exclamation","href":"/api/error-codes"},{"group":"records","pages":[{"openapi":"post /streams/{stream}/records","sidebarTitle":"append","description":"Append a batch of records atomically to an S2 stream, with optional append conditions.","title":"Append records.","href":"/api/records/append"},{"openapi":"get /streams/{stream}/records","sidebarTitle":"read","title":"Read records.","href":"/api/records/read"},{"openapi":"get /streams/{stream}/records/tail","sidebarTitle":"check tail","description":"Check the current tail of an S2 stream.","title":"Check the tail.","href":"/api/records/check-tail"}]},{"group":"access tokens","pages":[{"openapi":"get /access-tokens","sidebarTitle":"list","title":"List access tokens.","href":"/api/access-tokens/list"},{"openapi":"post /access-tokens","sidebarTitle":"issue","title":"Issue a new access token.","href":"/api/access-tokens/issue"},{"openapi":"delete /access-tokens/{id}","sidebarTitle":"revoke","title":"Revoke an access token.","href":"/api/access-tokens/revoke"}]},{"group":"streams","pages":[{"openapi":"get /streams","sidebarTitle":"list","title":"List streams.","href":"/api/streams/list"},{"openapi":"post /streams","sidebarTitle":"create","title":"Create a stream.","href":"/api/streams/create"},{"openapi":"put /streams/{stream}","sidebarTitle":"ensure","title":"Ensure a stream.","href":"/api/streams/ensure"},{"openapi":"get /streams/{stream}","sidebarTitle":"get config","title":"Get stream configuration.","href":"/api/streams/get-config"},{"openapi":"patch /streams/{stream}","sidebarTitle":"reconfigure","title":"Reconfigure a stream.","href":"/api/streams/reconfigure"},{"openapi":"delete /streams/{stream}","sidebarTitle":"delete","title":"Delete a stream.","href":"/api/streams/delete"}]},{"group":"basins","pages":[{"openapi":"get /basins","sidebarTitle":"list","title":"List basins.","href":"/api/basins/list"},{"openapi":"post /basins","sidebarTitle":"create","title":"Create a basin.","href":"/api/basins/create"},{"openapi":"put /basins/{basin}","sidebarTitle":"ensure","title":"Ensure a basin.","href":"/api/basins/ensure"},{"openapi":"get /basins/{basin}","sidebarTitle":"get config","title":"Get basin configuration.","href":"/api/basins/get-config"},{"openapi":"patch /basins/{basin}","sidebarTitle":"reconfigure","title":"Reconfigure a basin.","href":"/api/basins/reconfigure"},{"openapi":"delete /basins/{basin}","sidebarTitle":"delete","title":"Delete a basin.","href":"/api/basins/delete"}]},{"group":"metrics","pages":[{"openapi":"get /metrics","sidebarTitle":"account-level","title":"Account-level metrics.","href":"/api/metrics/account"},{"openapi":"get /metrics/{basin}","sidebarTitle":"basin-level","title":"Basin-level metrics.","href":"/api/metrics/basin"},{"openapi":"get /metrics/{basin}/{stream}","sidebarTitle":"stream-level","title":"Stream-level metrics.","href":"/api/metrics/stream"}]},{"group":"locations","pages":[{"openapi":"get /locations","sidebarTitle":"list","title":"List locations.","href":"/api/locations/list"},{"openapi":"get /locations/default","sidebarTitle":"get default","title":"Get the default location.","href":"/api/locations/get-default"},{"openapi":"put /locations/default","sidebarTitle":"set default","title":"Set the default location.","href":"/api/locations/set-default"}]}]},{"tab":"Integrations","pages":[{"title":"Integrations","href":"/integrations/overview"}]},{"tab":"Updates","pages":[{"title":"Updates","href":"/updates"}]}]},"title":"Read records. - S2","buildId":"dpl_3rfzHPCtRhDFBbetXZ3oLkN5tjmA","deploymentId":"dpl_3rfzHPCtRhDFBbetXZ3oLkN5tjmA","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-DBvOZtde.js","utils-BMzGkvGb.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-BYhgN8Gl.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-qDMltnin.js","snippetPresets-CABPPIq4.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-Bx9dgvF5.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-EwWVpM4w.js","shallow-vGbuQTai.js","getApiPlaygroundDisplay-DP2addym.js","CodeSnippet-BG6rB_-H.js","CodeSnippets-CFVdLBFC.js","Page-B-qdInYQ.js","getPastedJson-JGlMoKBJ.js","icon-BK_uyWxF.js","MethodPill-Du3sAVkF.js","DuplicateIcon-CMq42UID.js","createIcon-RdBrtBmo.js","DynamicMarkdown-B3juXLG8.js","SectionHeading-B--QsSCa.js","axios-vUo_bRtp.js","Markdown-B_bWWeh0.js","clsx-eUAxaTXI.js","lib--scc4DXi.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-DMuJXOAm.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-DeDUMY0v.js"]}