Skip to main content

Overview

Time Machine sets a cutoff for a search. Add snapshot_as_of to a POST /search request, and each result comes from the copy of the page that Perplexity saved at or before that time. Use it when a task depends on what was knowable at an earlier moment, such as evaluating an agent on questions with known answers or backtesting a forecast. Each time Perplexity reads a page for its web index, it saves a copy with the time it was saved. A search with snapshot_as_of uses those copies:
  • Search looks only at pages published by the cutoff.
  • The cutoff is compared with the time a copy was saved, not with a date shown on the page.
  • Each result uses the page’s latest copy saved at or before the cutoff. Its title, snippet, and date come from that copy.
The response has the same format as any other search.

Search as of a past time

This request searches python.org as the web was 30 days ago. First, install a library and set PERPLEXITY_API_KEY.
The cURL example uses a fixed time, so replace it with one from the last 365 days.

Read pages at the same time

A search result has a snippet, not the full page. To read the pages a search found, send their URLs to the Context API with the same snapshot_as_of. Both steps then use the same cutoff.

Errors

A request that breaks one of the rules above returns HTTP 400 with "type": "invalid_request":

Next Steps

Context API: Pages at a Past Time

Read full pages as they were stored at or before a time.

Domain Filter

Include or exclude specific domains, paths, and top-level domains.

How Search Works

Result fields, several queries per request, and request limits.

API Reference

Every request parameter, the response schema, and error responses.