History API

History API documentation for replaying TweetStream events on supported plans, including auth, request shape, response shape, and replay use cases.

直接回答

The History API lets Pro and Scale users replay stored TweetStream events after reconnects, incidents, or downstream outages.

Authentication

Call GET https://api.tweetstream.io/api/history with Authorization: Bearer <API_KEY>. History is available to Pro and Scale users whose subscriptions are active or trialing.

Request shape

Use query parameters to bound the replay window and event type. Keep clients idempotent because history can return events you already received live over WebSocket.

ParameterRequiredNotes
handle, handles, handle[], handles[]NoOne handle, repeated handles, or comma-separated handles
startDateNoISO datetime lower bound, for example 2026-03-01T00:00:00.000Z
endDateNoISO datetime upper bound
limitNoDefaults to 100; maximum 1000
typeNotweet, profile, or follow; defaults to tweet events

Response shape

Responses return stored social events plus metadata about the query. Tweet rows include author, text, timestamps, references, and any available token or OCR enrichment.

FieldTypeNotes
dataarrayStored events, newest first
metadata.typestringPresent when a specific event family was requested
metadata.countnumberReturned event count
metadata.handlesarrayNormalized handle filters, when supplied

Replay use cases

Use history for missed-connection recovery, incident review, strategy backtests, and Discord or bot reconciliation after downstream downtime.

  • Replay after a reconnect window
  • Audit what a bot received during an incident
  • Review alerts that matched a handle or keyword

常见问题

立即开启实时 Twitter WebSocket 提醒

内置 WebSocket 交付、OCR 与代币检测的 Twitter API 替代方案。

起价 $199/月 · Minimum/Pro 含 3 天试用 · OCR + 代币检测

相关页面