Perplexity 时间机器
Perplexity 搜索 API 和上下文 API 中按指定时间点搜索网页和检索历史快照的功能
开发者可向 `POST /search` 和 `POST /v1/context` 传入 RFC 3339 格式的 `snapshot_as_of` 时间戳,执行不泄漏未来信息的历史网页搜索,并读取相应的网页快照。时间戳最多可回溯 365 天,且不得晚于请求时间。用量等级 1 至 5 的用户在每个 API 上各有 50 次时间机器请求配额。
- 核心参数
- `snapshot_as_of`(带时区的 RFC 3339 时间戳)1截至 2026-11-30
- 支持的时间范围
- 最多可回溯至请求前 365 天;未来时间戳会被拒绝(HTTP 400)1截至 2026-11-30
- 支持的端点
- 搜索 API(`POST /search`)、上下文 API(`POST /v1/context`),以及智能体 API 中 `web_search` 和 `fetch_url` 的筛选参数1截至 2026-11-30
- 用量限制(等级 1 至 5)
- 搜索 API 和上下文 API 各有 50 次时间机器请求配额(超出时返回 HTTP 429)1截至 2026-11-30
Perplexity 时间机器(Perplexity Time Machine)是 Perplexity 搜索 API 和上下文 API 提供的按时间点检索功能。它使用 `snapshot_as_of` 指定截止时间,仅从该时间点或之前保存的副本中搜索和获取网页。
别名 时间机器(Perplexity API), snapshot_as_of
Perplexity 时间机器的 `snapshot_as_of` 工作原理
Perplexity 时间机器为 POST /search 和 POST /v1/context 提供 snapshot_as_of 截止时间参数,使智能体评估、预测回测等应用只能查询在指定历史时间点已经可以获知的信息 167。Perplexity 每次为网页建立索引时,都会保存一份副本并记录保存时间。传入 snapshot_as_of 后,Perplexity 根据副本保存时间(网页上标注的日期不参与比较),返回在截止时间或之前保存的最新副本 1。
- 1Time Machine - PerplexityPerplexity AI
- 6Search the web - PerplexityPerplexity AI
- 7Fetch URL context - PerplexityPerplexity AI
snapshot_as_of 接受带时区的 RFC 3339 时间戳(例如 2026-11-01T00:00:00Z)。如果时间戳指向未来或早于请求时间 365 天,则返回 HTTP 400(invalid_request)。使用此参数时,搜索响应会省略 last_updated 字段 1。官方 SDK 中,Python 需要 perplexityai 0.50.0 或更高版本,使用带时区的 datetime,TypeScript 需要 @perplexity-ai/perplexity_ai 0.45.0 或更高版本,使用 Date。智能体 API 的 web_search 和 fetch_url 工具也提供同名筛选参数 1。
Perplexity 时间机器的两步流程:搜索 API 与上下文 API
Perplexity 通过两个端点分别实现按时间点搜索和获取网页完整内容 145: - 搜索 API(POST /search):返回排序后的搜索结果,其中 title、snippet 和 date 均来自在 snapshot_as_of 指定时间或之前保存的快照 16。此参数可与 search_domain_filter 和 search_language_filter 搭配使用,但不能与 search_recency_filter、常规日期筛选条件或人物搜索(search_type: "people")同时使用 1。没有符合条件快照的网页会被省略,因此返回的结果可能少于 max_results,也可能为零 1。 - 上下文 API(POST /v1/context):接受 1 至 50 个 URL 和相同的 snapshot_as_of 截止时间,按 formats 指定的格式返回网页完整内容,同时为每个 URL 返回状态对象。默认格式为 markdown,也可选择 html、links 和与查询相关的 highlights 127。如果搜索 API 返回的某个 URL 在该截止时间没有可获取的副本,上下文 API 会为该 URL 返回 status.type: "no_content",其余 URL 仍按批处理流程处理,因此调用方可用 status.type === "ok" 筛选结果 17。
- 1Time Machine - PerplexityPerplexity AI
- 4Perplexity Search API - PerplexityPerplexity AI
- 5Context API quickstart - PerplexityPerplexity AI
- 6Search the web - PerplexityPerplexity AI
- 2Formats and freshness - PerplexityPerplexity AI
- 7Fetch URL context - PerplexityPerplexity AI
Perplexity 时间机器的配额与 API 计费
Perplexity 为时间机器设有专用请求配额,与搜索 API 和上下文 API 的常规速率限制分别计算 1。用量等级 1 至 5 的账户可通过搜索 API 发出总计 50 次时间机器请求,也可通过上下文 API 发出总计 50 次时间机器请求。即使一次请求包含多个查询或多个 URL,也只消耗 1 个配额单位。超出上限后将返回 HTTP 429,除非已与 Perplexity 销售团队另行约定更高上限 1。
Perplexity 时间机器的覆盖范围与尚未确认的细节
常见问题
- Perplexity 时间机器最远可以搜索多久以前的网页?
- Perplexity 时间机器接受 RFC 3339 格式的时间戳,最多可回溯至请求日期前 365 天。未来的时间戳和超出 365 天回溯范围的时间戳均会被拒绝,并返回 HTTP 400。1
- 在搜索 API 和上下文 API 中使用时间机器有什么区别?
- 搜索 API(`POST /search`)返回截至 `snapshot_as_of` 指定时间的排序结果和摘要;上下文 API(`POST /v1/context`)使用相同的截止时间,获取这些 URL 保存的网页内容,可返回 Markdown、HTML、链接或相关摘录。127
- 哪些筛选条件不能与 `snapshot_as_of` 一起使用?
- 在搜索 API 中,`snapshot_as_of` 可与 `search_domain_filter` 和 `search_language_filter` 同时使用,但不能与 `search_recency_filter`、日期筛选条件或人物搜索(`search_type: "people"`)同时使用。1
可引用的句子
Perplexity 时间机器在 `POST /search` 和 `POST /v1/context` 中使用 RFC 3339 格式的 `snapshot_as_of` 指定截止时间,仅从在该时间戳或之前保存的副本中检索网页。
167`snapshot_as_of` 参数拒绝未来的时间戳,最多支持回溯至请求日期前 365 天。
1Perplexity 用量等级 1 至 5 的用户在搜索 API 和上下文 API 上各有 50 次时间机器请求配额,超出后返回 HTTP 429。
1官方 SDK 对 `snapshot_as_of` 的支持要求 Python 使用 `perplexityai` 0.50.0 或更高版本,或 TypeScript 使用 `@perplexity-ai/perplexity_ai` 0.45.0 或更高版本。
1
时间线
- Perplexity 发布了时间机器文档,介绍如何在搜索 API、上下文 API 和智能体 API 工具中使用 `snapshot_as_of`。1
来源
官方网站
- 1Time Machine - Perplexity · Perplexity AI · 访问于 2026-11-30https://docs.perplexity.ai/docs/search/time-machine
- 2Formats and freshness - Perplexity · Perplexity AI · 访问于 2026-11-30https://docs.perplexity.ai/docs/context/formats-and-freshness
- 3Pricing - Perplexity · Perplexity AI · 访问于 2026-11-30https://docs.perplexity.ai/docs/getting-started/pricing
- 4Perplexity Search API - Perplexity · Perplexity AI · 访问于 2026-11-30https://docs.perplexity.ai/docs/search/quickstart
- 5Context API quickstart - Perplexity · Perplexity AI · 访问于 2026-11-30https://docs.perplexity.ai/docs/context/quickstart
- 6Search the web - Perplexity · Perplexity AI · 访问于 2026-11-30https://docs.perplexity.ai/api-reference/search-post
- 7Fetch URL context - Perplexity · Perplexity AI · 访问于 2026-11-30https://docs.perplexity.ai/api-reference/context-post
审阅与撰写记录
尚无专家签署此版本
签名将一位资质已核实者的实名,在特定日期,与版本 2acd1589 绑定。正文一旦改动,签名即留在旧版本上。
本页的撰写方式
依据上列公开一手来源自动撰写。尚未经人工审阅,也没有任何人为其刊载付费。
版本
2acd158989953c4f573f40115cd43c0f2d229282594f7739a4a0d4166cfb6e95
规范文档的 SHA-256 哈希。改动一个字符即产生新版本。
Mimirwiki. "Perplexity 时间机器." 版本 2acd1589, 2026-11-30. https://mimirwiki.com/zh/wiki/perplexity-time-machine
# Markdown curl https://mimirwiki.com/zh/wiki/perplexity-time-machine.md # JSON-LD, by content negotiation curl -H "Accept: application/ld+json" \ https://mimirwiki.com/zh/wiki/perplexity-time-machine
相同内容,相同 URL。添加扩展名或发送 Accept 请求头即可。