---
title: "TweetStream 开发者文档"
canonical_url: "https://tweetstream.io/zh-cn/docs"
last_updated: 2026-09-24
---

# TweetStream 开发者文档

先完成连接，再按需查阅 WebSocket 协议、事件、REST API 和完整消费者示例。

Canonical URL: https://tweetstream.io/zh-cn/docs

## 开始接收事件

- [完整 WebSocket 示例](https://tweetstream.io/zh-cn/docs/examples#run): 下载一个文件，用你的 API 密钥运行，查看事件陆续到达。
- [生产环境消费者](https://tweetstream.io/zh-cn/docs/production-consumer): 加入事件分发、重连和检查点。
- [事件参考](https://tweetstream.io/zh-cn/docs/payloads-detections-ocr): 查找每种事件操作的载荷。
- [REST 参考](https://tweetstream.io/zh-cn/docs/history-api): 回放已存事件并管理账号设置。

## 选择基础 URL

美国境内连接 `wss://ws-iad.tweetstream.io/ws`，其他地区连接 `wss://ws-global.tweetstream.io/ws`。REST 请求使用 `https://api.tweetstream.io`。

- [连接详情](https://tweetstream.io/zh-cn/docs/connection-auth-heartbeat#base-urls): 所有端点、认证方式和心跳规则。

## 使用机器可读契约

- [OpenAPI 3.1](https://tweetstream.io/zh-cn/docs/openapi.json): 根据公开端点契约生成 REST 客户端。
- [AsyncAPI 3.0](https://tweetstream.io/zh-cn/docs/asyncapi.json): 查看所有 WebSocket 通道、操作和载荷结构定义。
- [LLM 上下文](https://tweetstream.io/zh-cn/docs/llms-full.txt): 以 Markdown 格式加载完整公开文档。
