Get Started

Overview

The Epochal API gives your agent the web as it is now, or as it was at any point in the past. The Time Portal APIs search, fetch and run code at a past instant. The Live APIs search and fetch the current web.

Get an API key and make your first request below, or follow the full Time Portal Quickstart or Live Quickstart.

Get started

Create an API key in the console, then prompt your AI coding agent to integrate the Live and Time Portal APIs.

The APIs

See it in action

Step through a Time Portal agent run set to October 6, 2024, or try live queries in the Playground and interactive visualizer.

Time Portal demoAccept-Datetime: 2024-10-06

Boot a Linux microVM whose clock, OS image, packages, and network are gated to Oct 6, 2024.

  • Created sandbox sbx_y45rfmhnkqk89hj7prmg1s
  • Clock and network gated to 2024-10-06T23:59:59Z
  • Image: ubuntu-24.04 (2024-10-01 build)
  • date -u
  • Sun Oct 6 23:59:59 UTC 2024

Quickstart

  1. Set your API key

    Create a key in the API console and export it as EPOCHAL_API_KEY:

    Shell

    bash

    export EPOCHAL_API_KEY="ek_…"
  2. Search the web as of a past timestamp

    Send a POST request to POST/v1/time-portal/search with your cutoff in Accept-Datetime:

    curl https://api.epochal.com/v1/time-portal/search \
      -H "x-api-key: $EPOCHAL_API_KEY" \
      -H "Accept-Datetime: 2026-03-01T00:00:00Z" \
      -H "Content-Type: application/json" \
      -d '{"query": "european battery gigafactory delays", "num_results": 2}'

    JSON

    json

    {
      "as_of": "2026-03-01T00:00:00Z",
      "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15",
      "results": [
        {
          "title": "Battery plant start pushed back to late 2027",
          "url": "https://news.example.com/energy/battery-plant-delay",
          "snippet": "The cell maker said commissioning would slip by three quarters…",
          "published_at": "2026-02-11T06:12:00Z",
          "domain": "example.com",
          "language": "en",
          "entity": null
        }
      ],
      "entities": []
    }
  3. Fetch an archived page at the same instant

    Pass a result's url to POST/v1/time-portal/fetch using the same Accept-Datetime. Make sure to replace the example with a url from your own Search response.

    curl https://api.epochal.com/v1/time-portal/fetch \
      -H "x-api-key: $EPOCHAL_API_KEY" \
      -H "Accept-Datetime: 2026-03-01T00:00:00Z" \
      -H "Content-Type: application/json" \
      -d '{"url": "https://news.example.com/energy/battery-plant-delay", "max_characters": 2000}'

    A page with no archived copy will return 200 with status set to error and the reason in page_error. Check status before reading content.

  4. Run an agent in a time-gated sandbox

    Use the CLI to run Claude Code, Codex, or Grok Build inside a sandbox gated to any past date, or call POST/v1/time-portal/sandbox directly:

    Shell

    bash

    epochal time-portal run --harness claude --model claude-sonnet-5-5 --as-of 2024-10-06 \
      "Will AI research win a Nobel Prize this year?"
  5. Search the live web

    Leave out Accept-Datetime and call POST/v1/search to search the web as it is now. POST/v1/fetch reads any result in full. See the Live Quickstart.

    cURL

    bash

    curl https://api.epochal.com/v1/search \
      -H "x-api-key: $EPOCHAL_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"query": "european battery gigafactory delays", "num_results": 2}'

For agents

This documentation site also serves machine-readable files built directly from the guides and OpenAPI spec:

  • <path>.md — plain markdown twin of any docs or reference page
  • /llms.txt — index of all pages with summaries
  • /llms-full.txt — full documentation corpus in one file
  • /SKILL.md — an Agent Skill file summarizing authentication, endpoints, and docs links

See For Agents for skill installation and MCP server setup.

Next steps

Time Portal Quickstart

Get started with the search, fetch, and sandbox Time Portal APIs.

Live Quickstart

Get started with the Live Search and Fetch APIs.

How the Instant Works

Every Time Portal request evaluates against a point-in-time cutoff specified in Accept-Datetime.

Time Portal Search API

Time Portal search gives ranked results from the time-gated web.

Time Portal Fetch API

Time Portal fetch gives an archived copy of a page from the time-gated web.

Time Portal Sandbox API

A sandbox is a Linux virtual machine whose clock and network are set to an instant.

Live Search API

Search ranks the live web for a query and returns results with snippets.

Live Fetch API

Fetch reads one web page and returns its main content as markdown, with its metadata.