{
  "schemaVersion": 1,
  "slug": "perplexity-time-machine",
  "locale": "zh",
  "pageClass": "concept",
  "entityType": "SoftwareApplication",
  "field": "technology",
  "title": "Perplexity 时间机器",
  "subtitle": "Perplexity 搜索 API 和上下文 API 中按指定时间点搜索网页和检索历史快照的功能",
  "aliases": [
    "时间机器（Perplexity API）",
    "snapshot_as_of"
  ],
  "lead": {
    "definition": "Perplexity 时间机器（Perplexity Time Machine）是 Perplexity 搜索 API 和上下文 API 提供的按时间点检索功能。它使用 `snapshot_as_of` 指定截止时间，仅从该时间点或之前保存的副本中搜索和获取网页。",
    "answerSummary": "开发者可向 `POST /search` 和 `POST /v1/context` 传入 RFC 3339 格式的 `snapshot_as_of` 时间戳，执行不泄漏未来信息的历史网页搜索，并读取相应的网页快照。时间戳最多可回溯 365 天，且不得晚于请求时间。用量等级 1 至 5 的用户在每个 API 上各有 50 次时间机器请求配额。",
    "keyFacts": [
      {
        "label": "核心参数",
        "value": "`snapshot_as_of`（带时区的 RFC 3339 时间戳）",
        "ref": "s1",
        "asOf": "2026-11-30"
      },
      {
        "label": "支持的时间范围",
        "value": "最多可回溯至请求前 365 天；未来时间戳会被拒绝（HTTP 400）",
        "ref": "s1",
        "asOf": "2026-11-30"
      },
      {
        "label": "支持的端点",
        "value": "搜索 API（`POST /search`）、上下文 API（`POST /v1/context`），以及智能体 API 中 `web_search` 和 `fetch_url` 的筛选参数",
        "ref": "s1",
        "asOf": "2026-11-30"
      },
      {
        "label": "用量限制（等级 1 至 5）",
        "value": "搜索 API 和上下文 API 各有 50 次时间机器请求配额（超出时返回 HTTP 429）",
        "ref": "s1",
        "asOf": "2026-11-30"
      }
    ]
  },
  "infobox": [
    {
      "label": "提供方",
      "value": "Perplexity AI",
      "ref": "s1"
    },
    {
      "label": "参数名称",
      "value": "`snapshot_as_of`",
      "ref": "s1"
    },
    {
      "label": "时间戳格式",
      "value": "带时区的 RFC 3339 格式（Python `datetime`、TypeScript `Date`）",
      "ref": "s1"
    },
    {
      "label": "最低 SDK 版本",
      "value": "`perplexityai` >= 0.50.0（Python）；`@perplexity-ai/perplexity_ai` >= 0.45.0（TypeScript）",
      "ref": "s1"
    },
    {
      "label": "最长回溯时间",
      "value": "请求日期前 365 天",
      "ref": "s1"
    },
    {
      "label": "API 基础定价",
      "value": "搜索 API 每 1,000 次请求 5.00 美元（快速搜索为 1.00 美元）；上下文 API 按状态为 `ok` 或 `not_modified` 的 URL 计费",
      "ref": "s3"
    }
  ],
  "sections": [
    {
      "id": "how-snapshot-as-of-works",
      "heading": "Perplexity 时间机器的 `snapshot_as_of` 工作原理",
      "bodyMd": "**Perplexity 时间机器**为 `POST /search` 和 `POST /v1/context` 提供 `snapshot_as_of` 截止时间参数，使智能体评估、预测回测等应用只能查询在指定历史时间点已经可以获知的信息 [^s1][^s6][^s7]。Perplexity 每次为网页建立索引时，都会保存一份副本并记录保存时间。传入 `snapshot_as_of` 后，Perplexity 根据**副本保存时间**（网页上标注的日期不参与比较），返回在截止时间或之前保存的最新副本 [^s1]。\n\n`snapshot_as_of` 接受带时区的 **RFC 3339** 时间戳（例如 `2026-11-01T00:00:00Z`）。如果时间戳指向未来或早于请求时间 **365 天**，则返回 HTTP 400（`invalid_request`）。使用此参数时，搜索响应会省略 `last_updated` 字段 [^s1]。官方 SDK 中，Python 需要 `perplexityai` **0.50.0 或更高版本**，使用带时区的 `datetime`，TypeScript 需要 `@perplexity-ai/perplexity_ai` **0.45.0 或更高版本**，使用 `Date`。智能体 API 的 `web_search` 和 `fetch_url` 工具也提供同名筛选参数 [^s1]。"
    },
    {
      "id": "search-api-and-context-api-workflow",
      "heading": "Perplexity 时间机器的两步流程：搜索 API 与上下文 API",
      "bodyMd": "Perplexity 通过两个端点分别实现按时间点搜索和获取网页完整内容 [^s1][^s4][^s5]：\n- **搜索 API（`POST /search`）**：返回排序后的搜索结果，其中 `title`、`snippet` 和 `date` 均来自在 `snapshot_as_of` 指定时间或之前保存的快照 [^s1][^s6]。此参数可与 `search_domain_filter` 和 `search_language_filter` 搭配使用，但不能与 `search_recency_filter`、常规日期筛选条件或人物搜索（`search_type: \"people\"`）同时使用 [^s1]。没有符合条件快照的网页会被省略，因此返回的结果可能少于 `max_results`，也可能为零 [^s1]。\n- **上下文 API（`POST /v1/context`）**：接受 1 至 50 个 URL 和相同的 `snapshot_as_of` 截止时间，按 `formats` 指定的格式返回网页完整内容，同时为每个 URL 返回状态对象。默认格式为 `markdown`，也可选择 `html`、`links` 和与查询相关的 `highlights` [^s1][^s2][^s7]。如果搜索 API 返回的某个 URL 在该截止时间没有可获取的副本，上下文 API 会为该 URL 返回 `status.type: \"no_content\"`，其余 URL 仍按批处理流程处理，因此调用方可用 `status.type === \"ok\"` 筛选结果 [^s1][^s7]。"
    },
    {
      "id": "limits-and-billing-model",
      "heading": "Perplexity 时间机器的配额与 API 计费",
      "bodyMd": "Perplexity 为时间机器设有专用请求配额，与搜索 API 和上下文 API 的常规速率限制分别计算 [^s1]。用量等级 **1 至 5** 的账户可通过搜索 API 发出**总计 50 次时间机器请求**，也可通过上下文 API 发出**总计 50 次时间机器请求**。即使一次请求包含多个查询或多个 URL，也只消耗 1 个配额单位。超出上限后将返回 HTTP `429`，除非已与 Perplexity 销售团队另行约定更高上限 [^s1]。\n\n根据 Perplexity 公布的 API 定价，标准**搜索 API** 每 1,000 次成功请求收费 **5.00 美元**（每次 0.005 美元，可在单个数组中包含最多五项查询；快速搜索每 1,000 次请求收费 1.00 美元）。**上下文 API** 按返回状态为 `ok` 或 `not_modified` 的 URL 计费。可选 `criteria` 评分所用的词元按 Decisions API 的输入费率计费 [^s3]。"
    },
    {
      "id": "scope-and-unconfirmed-details",
      "heading": "Perplexity 时间机器的覆盖范围与尚未确认的细节",
      "bodyMd": "时间机器依赖 Perplexity 为建立网页索引而抓取网页时保存的副本，因此能否获取快照取决于 Perplexity 是否在所选 `snapshot_as_of` 时间点或之前归档了该 URL [^s1]。截至 **2026 年 11 月 30 日**，Perplexity 的开发者文档尚未公布各域名的历史快照保存密度，也未公布独立第三方对未来信息泄漏防护效果的基准测试复现结果 [^s1][^s2]。"
    }
  ],
  "faqs": [
    {
      "q": "Perplexity 时间机器最远可以搜索多久以前的网页？",
      "a": "Perplexity 时间机器接受 RFC 3339 格式的时间戳，最多可回溯至请求日期前 365 天。未来的时间戳和超出 365 天回溯范围的时间戳均会被拒绝，并返回 HTTP 400。",
      "refs": [
        "s1"
      ]
    },
    {
      "q": "在搜索 API 和上下文 API 中使用时间机器有什么区别？",
      "a": "搜索 API（`POST /search`）返回截至 `snapshot_as_of` 指定时间的排序结果和摘要；上下文 API（`POST /v1/context`）使用相同的截止时间，获取这些 URL 保存的网页内容，可返回 Markdown、HTML、链接或相关摘录。",
      "refs": [
        "s1",
        "s2",
        "s7"
      ]
    },
    {
      "q": "哪些筛选条件不能与 `snapshot_as_of` 一起使用？",
      "a": "在搜索 API 中，`snapshot_as_of` 可与 `search_domain_filter` 和 `search_language_filter` 同时使用，但不能与 `search_recency_filter`、日期筛选条件或人物搜索（`search_type: \"people\"`）同时使用。",
      "refs": [
        "s1"
      ]
    },
    {
      "q": "如果网页在指定时间或之前没有保存的快照，会怎样？",
      "a": "搜索 API 会省略无法按截止时间显示的网页，因此返回的条目可能少于 `max_results`。上下文 API 会为没有已保存副本的单个 URL 返回 `status.type: \"no_content\"`。",
      "refs": [
        "s1",
        "s7"
      ]
    }
  ],
  "claims": [
    {
      "text": "Perplexity 时间机器在 `POST /search` 和 `POST /v1/context` 中使用 RFC 3339 格式的 `snapshot_as_of` 指定截止时间，仅从在该时间戳或之前保存的副本中检索网页。",
      "refs": [
        "s1",
        "s6",
        "s7"
      ]
    },
    {
      "text": "`snapshot_as_of` 参数拒绝未来的时间戳，最多支持回溯至请求日期前 365 天。",
      "refs": [
        "s1"
      ]
    },
    {
      "text": "Perplexity 用量等级 1 至 5 的用户在搜索 API 和上下文 API 上各有 50 次时间机器请求配额，超出后返回 HTTP 429。",
      "refs": [
        "s1"
      ]
    },
    {
      "text": "官方 SDK 对 `snapshot_as_of` 的支持要求 Python 使用 `perplexityai` 0.50.0 或更高版本，或 TypeScript 使用 `@perplexity-ai/perplexity_ai` 0.45.0 或更高版本。",
      "refs": [
        "s1"
      ]
    }
  ],
  "timeline": [
    {
      "date": "2026-11",
      "text": "Perplexity 发布了时间机器文档，介绍如何在搜索 API、上下文 API 和智能体 API 工具中使用 `snapshot_as_of`。",
      "refs": [
        "s1"
      ]
    }
  ],
  "sources": [
    {
      "key": "s1",
      "url": "https://docs.perplexity.ai/docs/search/time-machine",
      "tier": 3,
      "title": "Time Machine - Perplexity",
      "publisher": "Perplexity AI",
      "accessedAt": "2026-11-30"
    },
    {
      "key": "s2",
      "url": "https://docs.perplexity.ai/docs/context/formats-and-freshness",
      "tier": 3,
      "title": "Formats and freshness - Perplexity",
      "publisher": "Perplexity AI",
      "accessedAt": "2026-11-30"
    },
    {
      "key": "s3",
      "url": "https://docs.perplexity.ai/docs/getting-started/pricing",
      "tier": 3,
      "title": "Pricing - Perplexity",
      "publisher": "Perplexity AI",
      "accessedAt": "2026-11-30"
    },
    {
      "key": "s4",
      "url": "https://docs.perplexity.ai/docs/search/quickstart",
      "tier": 3,
      "title": "Perplexity Search API - Perplexity",
      "publisher": "Perplexity AI",
      "accessedAt": "2026-11-30"
    },
    {
      "key": "s5",
      "url": "https://docs.perplexity.ai/docs/context/quickstart",
      "tier": 3,
      "title": "Context API quickstart - Perplexity",
      "publisher": "Perplexity AI",
      "accessedAt": "2026-11-30"
    },
    {
      "key": "s6",
      "url": "https://docs.perplexity.ai/api-reference/search-post",
      "tier": 3,
      "title": "Search the web - Perplexity",
      "publisher": "Perplexity AI",
      "accessedAt": "2026-11-30"
    },
    {
      "key": "s7",
      "url": "https://docs.perplexity.ai/api-reference/context-post",
      "tier": 3,
      "title": "Fetch URL context - Perplexity",
      "publisher": "Perplexity AI",
      "accessedAt": "2026-11-30"
    }
  ],
  "links": [
    {
      "predicate": "relatedTo",
      "toSlug": "perplexity",
      "label": "Perplexity"
    }
  ],
  "sameAs": [
    "https://docs.perplexity.ai/docs/search/time-machine"
  ],
  "disclaimer": null,
  "status": {
    "review": "awaiting_review",
    "provenance": "prefill",
    "autoWritten": true
  },
  "dateCreated": "2026-11-30",
  "dateModified": "2026-11-30",
  "_meta": {
    "canonicalUrl": "https://mimirwiki.com/zh/wiki/perplexity-time-machine",
    "revision": {
      "sha256": "2acd158989953c4f573f40115cd43c0f2d229282594f7739a4a0d4166cfb6e95",
      "short": "2acd1589",
      "hashedFields": "all fields except status and _meta, RFC 8785 canonical form"
    },
    "formats": {
      "md": "https://mimirwiki.com/zh/wiki/perplexity-time-machine.md",
      "txt": "https://mimirwiki.com/zh/wiki/perplexity-time-machine.txt",
      "json": "https://mimirwiki.com/zh/wiki/perplexity-time-machine.json",
      "jsonld": "https://mimirwiki.com/zh/wiki/perplexity-time-machine.jsonld"
    },
    "translations": {
      "en": "https://mimirwiki.com/wiki/perplexity-time-machine",
      "ko": "https://mimirwiki.com/ko/wiki/perplexity-time-machine",
      "ja": "https://mimirwiki.com/ja/wiki/perplexity-time-machine",
      "zh": "https://mimirwiki.com/zh/wiki/perplexity-time-machine",
      "es": "https://mimirwiki.com/es/wiki/perplexity-time-machine",
      "de": "https://mimirwiki.com/de/wiki/perplexity-time-machine",
      "fr": "https://mimirwiki.com/fr/wiki/perplexity-time-machine",
      "pt": "https://mimirwiki.com/pt/wiki/perplexity-time-machine",
      "ru": "https://mimirwiki.com/ru/wiki/perplexity-time-machine",
      "it": "https://mimirwiki.com/it/wiki/perplexity-time-machine",
      "hi": "https://mimirwiki.com/hi/wiki/perplexity-time-machine",
      "ar": "https://mimirwiki.com/ar/wiki/perplexity-time-machine"
    }
  }
}
