# Overview The Epochal API allows you to deploy your agent in a rich point-in-time environment across the web. Get an API key and make your first request below, or follow the full [Quickstart](/docs/time-portal/quickstart). - [Get API Key](https://console.epochal.com/keys) - Agent prompt: `Read https://docs.epochal.com/SKILL.md and https://docs.epochal.com/docs/time-portal/quickstart.md, then help me integrate the Epochal Time Portal API (Search, Fetch, and Sandbox) using EPOCHAL_API_KEY and the Accept-Datetime header.` ## The APIs - **Time Portal Search API** — Search and explore the web as of any time. See `/docs/time-portal/search`. - **Time Portal Fetch API** — Retrieve an archived web page as it existed at an earlier instant. See `/docs/time-portal/fetch`. - **Time Portal Sandbox API** — Run code in a sandbox that lives in an earlier point in time. See `/docs/time-portal/sandbox`. ## 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. - [Open Playground](https://console.epochal.com/playground?api=timePortalSearch) - [Try the interactive visualizer](https://visualizer.epochal.com) ## Quickstart 1. **Set your API key** Create a key in the [API console](https://console.epochal.com/keys) and export it as `EPOCHAL_API_KEY`: ```bash Shell export EPOCHAL_API_KEY="ek_…" ``` 2. **Search the web as of a past timestamp** Send a `POST` request to [`POST /v1/time-portal/search`](/reference/timePortalSearch) with your cutoff in `Accept-Datetime`: ```bash cURL 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}' ``` ```py Python import os import requests response = requests.post( "https://api.epochal.com/v1/time-portal/search", headers={ "x-api-key": os.environ["EPOCHAL_API_KEY"], "Accept-Datetime": "2026-03-01T00:00:00Z", }, json={"query": "european battery gigafactory delays", "num_results": 2}, ) response.raise_for_status() results = response.json()["results"] for result in results: print(result["url"], result["title"]) ``` ```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 } ] } ``` 3. **Fetch an archived page at the same instant** Pass a result's `url` to [`POST /v1/time-portal/fetch`](/reference/timePortalFetch) using the same `Accept-Datetime`. Make sure to replace the example with a `url` from your own Search response. ```bash cURL 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}' ``` ```py Python # Continues from the Search step: `results` holds its results. response = requests.post( "https://api.epochal.com/v1/time-portal/fetch", headers={ "x-api-key": os.environ["EPOCHAL_API_KEY"], "Accept-Datetime": "2026-03-01T00:00:00Z", }, json={"url": results[0]["url"], "max_characters": 2000}, ) response.raise_for_status() page = response.json() if page["status"] == "success": print(page["content"]) else: print("Could not read the page:", page["page_error"]["message"]) ``` > 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](/docs/clients/cli) to run Claude Code, Codex, or Grok Build inside a sandbox gated to any past date, or call [`POST /v1/time-portal/sandbox`](/reference/sandboxCreate) directly: ```bash Shell 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?" ``` ## For agents This documentation site also serves machine-readable files built directly from the guides and OpenAPI spec: - `.md` — plain markdown twin of any docs or reference page - [`/llms.txt`](/llms.txt) — index of all pages with summaries - [`/llms-full.txt`](/llms-full.txt) — full documentation corpus in one file - [`/SKILL.md`](/SKILL.md) — an Agent Skill file summarizing authentication, endpoints, and docs links See [For Agents](/docs/resources/for-agents) for skill installation and MCP server setup. ## Next steps - [Quickstart](/docs/time-portal/quickstart): Get started with the search, fetch, and sandbox Time Portal APIs. - [How the Instant Works](/docs/time-portal/how-the-instant-works): Every Time Portal request evaluates against a point-in-time cutoff specified in Accept-Datetime. - [Search](/docs/time-portal/search): Time Portal search gives ranked results from the time-gated web. - [Fetch](/docs/time-portal/fetch): Time Portal fetch gives an archived copy of a page from the time-gated web. - [Sandbox](/docs/time-portal/sandbox): A sandbox is a Linux virtual machine whose clock and network are set to an instant. --- # Authentication All requests are authenticated via the x-api-key header. Create API keys in the [API console](https://console.epochal.com/keys). All requests are authenticated via the `x-api-key` header. ## Create a key To create a key, use the **API keys** page in the console: 1. Open the console and sign in. 2. Go to API keys and select Create key. 3. Set an expiration date. 4. Copy and store the secret somewhere safe. The full secret is shown once; afterward, the console displays only its prefix. Owners and admins can also create organization-owned keys that are not tied to an individual member. ## Send the key Include the key in the `x-api-key` request header: ```bash cURL curl … -H "x-api-key: $EPOCHAL_API_KEY" ``` Missing, unknown, revoked, or expired keys return `401` with `error.type` set to `invalid_api_key`: ```json JSON { "error": { "type": "invalid_api_key", "message": "No key matches that token. Check the x-api-key header.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ## Keep keys safe - **Use one key per service:** Isolate services so you can revoke one key without disrupting others. Use the console's last-used timestamp to track which keys are active. - **Keep keys server-side:** Never embed an API key in browser JavaScript or mobile clients. Route requests through your own backend. - **Store secrets securely:** Load keys from a secret manager or environment variable and keep them out of source control. - **Never share raw secrets:** Do not paste API keys into chats, AI prompts, support tickets, or logs. Epochal can look up any request by its `request_id` without your key. - **Expire temporary keys:** Set an expiration date on keys created for experiments and batch jobs. ## Respond to a leaked key 1. **Rotate the key in the console.** The new secret works immediately, and the previous secret remains active for the grace period shown in the console. 2. **Deploy the new secret and revoke the old key.** Update your service configuration, then revoke the old key to end the grace period early. 3. **Audit recent usage.** Review the console's Usage page for unexpected requests. If you see unauthorized activity, see [Getting Help](/docs/resources/getting-help). ## Organizations and roles Each API key belongs to a single organization. Members create and manage their own personal keys, which are automatically revoked if the member leaves the organization. Owners and admins manage all keys in the organization, including organization-owned keys. ## Next steps - [Quickstart](/docs/time-portal/quickstart): Get started with the search, fetch, and sandbox Time Portal APIs. - [Errors](/docs/resources/errors): Standard JSON error envelope, HTTP status codes, sandbox failure types, and retry rules. --- # Pricing Every organization gets 100 search and fetch requests and one hour of sandbox time; for more, contact us. Epochal Time Portal is currently free to try. Every organization gets 100 search and fetch requests and one hour of sandbox time. For more, [contact us](https://epochal.com/contact). ## What the free trial includes | API | Included | | --- | --- | | Time Portal search and fetch | 100 requests, up to 10 results per request | | Time Portal sandbox | One hour of a 1 vCPU, 2 GiB sandbox | Only successful (`2xx`) responses use up a request. See also [Lifecycle and Limits](/docs/time-portal/sandbox/lifecycle-limits-and-pricing) for the sandbox timeouts and how to save sandbox time. ## How sandboxes use the free hour The free hour is two allowances, 1 vCPU-hour and 2 GiB-hours of memory. A `live` sandbox draws on both, at its own `vcpus` and `memory_gib`, for every second it is live. Sandboxes running at once draw from that shared pool together. The free hour is used up when either allowance runs out. | Sandbox | Free time | | --- | --- | | 1 vCPU, 2 GiB (the default) | 1 hour | | 1 vCPU, 1 GiB | 1 hour | | 1 vCPU, 4 GiB | 30 minutes | | 2 vCPU, 4 GiB | 30 minutes | | 4 vCPU, 8 GiB | 15 minutes | | Two 1 vCPU, 2 GiB sandboxes at once | 30 minutes each | A sandbox smaller than the default, such as 1 vCPU and 1 GiB, still lasts one hour, since the vCPU allowance runs out first. ## When it runs out Requests return `402` with `free_quota_exhausted`; see [Errors](/docs/resources/errors). When the free hour runs out, every live sandbox ends with `error` `free_quota_exhausted`, and a new create returns `402`. [Contact us](https://epochal.com/contact) for more requests, more sandbox time, or an enterprise plan. ## Next steps - [Lifecycle and Limits](/docs/time-portal/sandbox/lifecycle-limits-and-pricing): A sandbox boots, runs while it is live, and ends at a timeout, a terminate, or a failure. - [Errors](/docs/resources/errors): Standard JSON error envelope, HTTP status codes, sandbox failure types, and retry rules. --- # Rate Limits Organization and per-IP rate limits, retry behavior, and pacing guidance. Rate limits apply per organization across all API keys, alongside per-IP edge ceilings that protect `epochal.com` services from floods and runaway clients. To request a higher rate limit, [contact us](https://epochal.com/contact). ## Rate limits | Limit | Scope | Ceiling | Status / `error.type` | Wait / block duration | | --- | --- | --- | --- | --- | | Organization API rate limit | Per organization (shared across all keys) | Set by plan ([contact us](https://epochal.com/contact) to increase) | `429` `rate_limit_exceeded` | Duration in `Retry-After` header | | Sandbox concurrency | Per organization (concurrent sandboxes, vCPUs, memory) | Set by plan ([contact us](https://epochal.com/contact) to increase) | `429` `rate_limit_exceeded` | Wait for `Retry-After` or terminate active sandboxes | | Edge request ceiling | Per IP address across `api.epochal.com` and all `epochal.com` sites | 2,500 requests / second (25,000 per 10 seconds) | `429` `rate_limit_exceeded` | 10 seconds | | Edge refused-request ceiling | Per IP address (`401` on `api.epochal.com`; `403` or `404` on any `epochal.com` site) | 60 refused requests / minute | `429` `rate_limit_exceeded` | 60 seconds | Adding more API keys does not increase your organization's rate limit. Rate-limited (`429`) responses do not count against your free quota. The per-IP edge ceilings allow **2,500 requests per second** across `epochal.com` and **60 refused requests per minute**. An IP that exceeds either ceiling receives `429` for 10 seconds after too many requests or 60 seconds after too many refused requests. ## Retry behavior When a request is rate limited, the API returns `429 Too Many Requests` with a `Retry-After` header giving the number of seconds to wait: ```http HTTP HTTP/1.1 429 Too Many Requests retry-after: 12 content-type: application/json {"error": {"type": "rate_limit_exceeded", "message": "Over the organization's rate limit. Retry after a pause.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15"}} ``` Follow these rules when handling retries: - **Honor `Retry-After`:** When `Retry-After` is present on a `429` or `503`, wait at least that many seconds before retrying. - **Use exponential backoff with jitter:** Add random jitter to retry delays so concurrent workers do not retry in lockstep. - **Cap retry attempts:** Stop after a bounded number of retries and surface the error. - **Do not retry other `4xx` errors:** `400`, `401`, `402`, `403`, `404`, `409`, and `422` indicate a client or account issue. Fix the request or key first — retrying `401` responses can trigger the per-IP refused-request ceiling. ## Usage guide - **Pace concurrency with a worker pool:** Bound in-flight requests to your organization's rate limit instead of sending unbounded bursts. - **Fetch selectively:** Run a search first, then call Fetch only on the URLs you need to read. - **Long-poll sandboxes with `wait=55s`:** Pass `wait=55s` on sandbox status (`GET .../sandbox/{id}`) and command output (`GET .../execs/{exec_id}/output`) endpoints. `55s` is the maximum server-side hold duration (chosen to stay safely below standard 60-second HTTP and proxy timeouts), so the server returns immediately when state changes or output arrives without burning requests in a tight polling loop. - **Terminate finished sandboxes:** Call `DELETE /v1/time-portal/sandbox/{id}` as soon as a job finishes to free concurrency headroom and stop usage metering. ## Next steps - [Errors](/docs/resources/errors): Standard JSON error envelope, HTTP status codes, sandbox failure types, and retry rules. - [Lifecycle and Limits](/docs/time-portal/sandbox/lifecycle-limits-and-pricing): A sandbox boots, runs while it is live, and ends at a timeout, a terminate, or a failure. - [Getting Help](/docs/resources/getting-help): Support channels, status page, and what to include when reporting an API issue. --- # Quickstart Get started with the search, fetch, and sandbox Time Portal APIs. ## Try it in the playground The fastest way to start using the Time Portal is through the playground in the console. No API keys needed. When you're ready to call the API from your own code, follow the steps below. [Open Playground](https://console.epochal.com/playground?api=timePortalSearch) ## Get an API key Create a key in the console and set it in your environment. [Get API Key](https://console.epochal.com/keys) ```bash Shell export EPOCHAL_API_KEY="ek_…" ``` ## Pick the instant Every Time Portal request sends the instant in the `Accept-Datetime` header. The instant must be in the past and on or after `1970-01-01T00:00:00Z`. This tutorial uses `2026-03-01T00:00:00Z` for every request, and every response echoes it back in `as_of`. For accepted header formats, see [How the Instant Works](/docs/time-portal/how-the-instant-works). ## Search Send a `query` to [`POST /v1/time-portal/search`](/reference/timePortalSearch) to search across time. ```bash cURL 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 }' ``` ```py Python import os import requests response = requests.post( "https://api.epochal.com/v1/time-portal/search", headers={ "x-api-key": os.environ["EPOCHAL_API_KEY"], "Accept-Datetime": "2026-03-01T00:00:00Z", }, json={ "query": "european battery gigafactory delays", "num_results": 2, }, ) response.raise_for_status() print(response.json()) ``` The response looks like this: ```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 }, { "title": "Gigafactory timelines slip across Europe", "url": "https://analysis.example.org/energy/gigafactory-timelines", "snippet": "Three of the five plants announced for 2026 now target 2027 or later…", "published_at": "2026-01-28T09:00:00Z", "domain": "example.org", "language": "en", "entity": null } ] } ``` ## Fetch Fetch a `url` at the same instant as your search with [`POST /v1/time-portal/fetch`](/reference/timePortalFetch). ```bash cURL 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 }' ``` ```py Python import os import requests response = requests.post( "https://api.epochal.com/v1/time-portal/fetch", headers={ "x-api-key": os.environ["EPOCHAL_API_KEY"], "Accept-Datetime": "2026-03-01T00:00:00Z", }, json={ "url": "https://news.example.com/energy/battery-plant-delay", "max_characters": 2000, }, ) response.raise_for_status() print(response.json()["content"]) ``` The response looks like this: ```json JSON { "as_of": "2026-03-01T00:00:00Z", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15", "status": "success", "id": "6b81feebde1a4821a125fb307894e7ad", "url": "https://news.example.com/energy/battery-plant-delay", "final_url": "https://news.example.com/energy/battery-plant-delay/", "title": "Battery plant start pushed back to late 2027", "description": "The cell maker said commissioning would slip.", "author": "Jane Doe", "published_at": "2026-02-11T06:12:00Z", "language": "en", "content": "# Battery plant start pushed back to late 2027\n\nThe cell maker said…", "truncated": true, "entity": null } ``` `content` is the page as markdown. ## Sandbox A sandbox is a Linux virtual machine whose clock starts at the instant. With `"network": "time-portal"`, the sandbox interacts with the web time-portal'd to the past. The following script runs one command on a new sandbox and prints its output. ```py Python import base64 import os import sys import requests API = "https://api.epochal.com/v1/time-portal/sandbox" HEADERS = {"x-api-key": os.environ["EPOCHAL_API_KEY"]} def call(method, path="", **kwargs): response = requests.request(method, API + path, timeout=90, **kwargs) response.raise_for_status() return response.json() if response.content else None sandbox = call( "POST", headers={**HEADERS, "Accept-Datetime": "2026-03-01T00:00:00Z"}, json={"network": "time-portal"}, ) try: while sandbox["state"] == "creating": sandbox = call("GET", f"/{sandbox['id']}", headers=HEADERS, params={"wait": "55s"}) if sandbox["state"] != "live": raise RuntimeError(f"sandbox {sandbox['state']}: {sandbox['error']}") exec_id = call( "POST", f"/{sandbox['id']}/execs", headers=HEADERS, json={"argv": ["python3", "-c", "import datetime; print(datetime.date.today())"]}, )["id"] output = {"stdout": bytearray(), "stderr": bytearray()} while True: page = call( "GET", f"/{sandbox['id']}/execs/{exec_id}/output", headers=HEADERS, params={ "stdout_offset": len(output["stdout"]), "stderr_offset": len(output["stderr"]), "wait": "55s", }, ) for frame in page["frames"]: output[frame["stream"]] += base64.b64decode(frame["data_b64"]) if page["exit"]: break print(output["stdout"].decode(errors="replace"), end="") print(output["stderr"].decode(errors="replace"), end="", file=sys.stderr) print(page["exit"]) finally: call("DELETE", f"/{sandbox['id']}", headers=HEADERS) ``` It prints `2026-03-01` and `{'reason': 'exited', 'code': 0}`: the sandbox's clock starts at the specified instant. - Creating a sandbox returns `202` immediately with `state: "creating"`. The first loop long-polls `GET /v1/time-portal/sandbox/{id}?wait=55s` until the sandbox becomes `live`. - Starting a command returns its `id` immediately. The second loop reads output from each byte offset until `exit` is present, buffering raw bytes before decoding so multi-byte UTF-8 sequences are not split across frames. - The `finally` block terminates the sandbox. Once a sandbox stops, its filesystem and command output are discarded. ## CLI The `epochal` CLI runs an agent inside a Time Portal sandbox gated to a past timestamp. ```bash Shell epochal time-portal run --model claude-sonnet-5-5 --as-of 2024-10-06 \ "Will AI research win a Nobel Prize this year?" ``` To install it and run your first agent, see the [CLI](/docs/clients/cli) page. The [Clients](/docs/clients) section also has an MCP server and SDKs for Rust and Python. ## Next steps - [CLI](/docs/clients/cli): Run an agent inside the Time Portal with one command. - [Search](/docs/time-portal/search): Time Portal search gives ranked results from the time-gated web. - [Fetch](/docs/time-portal/fetch): Time Portal fetch gives an archived copy of a page from the time-gated web. - [Sandbox](/docs/time-portal/sandbox): A sandbox is a Linux virtual machine whose clock and network are set to an instant. - [How the Instant Works](/docs/time-portal/how-the-instant-works): Every Time Portal request evaluates against a point-in-time cutoff specified in Accept-Datetime. - [Errors](/docs/resources/errors): Standard JSON error envelope, HTTP status codes, sandbox failure types, and retry rules. --- # How the Instant Works Every Time Portal request evaluates against a point-in-time cutoff specified in Accept-Datetime. Every Time Portal request runs against a single point in time — the **as-of timestamp** (referred to as the **instant**). Time Portal excludes pages, page updates, package releases, and network responses recorded after the instant, so an agent or evaluation sees the web and runtime environment as they existed at that moment. ## What the instant controls | Surface | Effect of `Accept-Datetime` (`as_of`) | | --- | --- | | **Search** | Ranks pages from the timestamped web archive as they existed at or before `as_of`. Pages published or updated after `as_of` are excluded, and snippets reflect versions from on or before `as_of`. | | **Fetch** | Returns the archived version of a URL as it existed at or before `as_of`. If no archived capture exists on or before `as_of`, Fetch reports an unavailable page rather than falling back to the live web. | | **Sandbox** | Sets the Linux microVM clock to `as_of`, boots the newest quarterly Ubuntu image built on or before `as_of` (earliest: `2023-04-01`), points `apt`/`pip`/`uv`/`npm` to package mirrors frozen at `as_of`, and routes outbound HTTP/HTTPS through Time Portal at `as_of` when `network` is `"time-portal"`. | ## Request header specification Pass the instant in the `Accept-Datetime` HTTP header. Every response echoes the resolved timestamp in `as_of` as an RFC 3339 UTC string. | Property | Requirement | | --- | --- | | Header name | `Accept-Datetime` | | Required | Yes, on every Search, Fetch, and Sandbox create request (subsequent calls on a sandbox inherit its `as_of`) | | Upper bound | Strictly in the past (before current UTC time) | | Lower bound | `1970-01-01T00:00:00Z` for Search and Fetch; `2023-04-01T00:00:00Z` for Sandbox (oldest OS image build) | | Response echo | Returned in the `as_of` response field as RFC 3339 UTC (`YYYY-MM-DDTHH:MM:SSZ`) | ### Accepted formats | Format | Example | Resolved `as_of` (UTC) | | --- | --- | --- | | RFC 3339 (with timezone offset or `Z`) | `2026-03-01T00:00:00Z` | Exact instant (`2026-03-01T00:00:00Z`) | | ISO 8601 without offset | `2026-03-01T00:00:00` | Treated as UTC (`2026-03-01T00:00:00Z`) | | Date only (`YYYY-MM-DD`) | `2026-03-01` | End of that UTC day (`2026-03-01T23:59:59Z`) | | HTTP-date (RFC 9110) | `Sun, 01 Mar 2026 00:00:00 GMT` | Exact instant (`2026-03-01T00:00:00Z`) | Pass a full timestamp such as `2026-03-01T00:00:00Z` when you want the start of a day; a bare date includes the entire UTC day through `23:59:59Z`. ## Caveats When running AI agents, forecasting evaluations, or historical backtests with Time Portal, keep the following boundaries in mind: - **Model knowledge cutoff (internal leakage):** Time Portal gates external tools — web search, page fetches, and the sandbox clock, packages, and network — not the weights of the LLM driving your agent. A model trained on data after `as_of` can still recall post-cutoff facts from memory. For leakage-free evaluations, pair `as_of` with a model whose training cutoff precedes the evaluation window, or evaluate on events after the model's cutoff. - **Keep one `Accept-Datetime` per run:** Send the same `Accept-Datetime` on every Search, Fetch, and Sandbox creation call within a single task. Advancing the timestamp mid-run exposes future information. - **Do not mix live web requests:** Read search results through Time Portal Fetch (or inside a sandbox with `"network": "time-portal"`). Opening result URLs with a live HTTP client or browser fetches today's version of the page. - **Historical coverage:** Not every URL has an archived snapshot at every point in time. When no capture exists on or before `as_of`, Fetch returns `status: "error"` (or `x-fetch-status-code: 0` with `format: "page"`) instead of serving a newer copy. ## Next steps - [Search](/docs/time-portal/search): Time Portal search gives ranked results from the time-gated web. - [Fetch](/docs/time-portal/fetch): Time Portal fetch gives an archived copy of a page from the time-gated web. - [Images and Network](/docs/time-portal/sandbox/images-and-network): A sandbox boots the Ubuntu build chosen by its instant and reaches only what its network setting allows. - [Pricing](/docs/get-started/pricing): Every organization gets 100 search and fetch requests and one hour of sandbox time; for more, contact us. --- # World Entities Search and fetch return companies, people, places, crypto assets, and a city's weather as world entities that share one envelope. Search and fetch return companies, people, places, crypto assets, and a city's weather as world entities that share one [envelope](#envelope). They appear next to web pages, [as of the instant](/docs/time-portal/how-the-instant-works). Each type has its own `properties` shape. Every entity has a page on Epochal World. The page's URL is the entity's `id`. Entities appear in two response fields: - **Search `results[].entity`:** the entity when the result is from an Epochal World page. `null` for every other result. - **Fetch `entity`:** the entity when the URL is an Epochal World page. `null` for any other URL. ## Entity pages You can open any entity's page in your browser at its `id`, such as [https://world.epochal.com/organization/RgPm6FrEK-Q](https://world.epochal.com/organization/RgPm6FrEK-Q). ![The Epochal World page for Adobe](/images/time-portal/epochal-world-entity-page.png) The page gives you a quick look at the entity. For the full structured data, use [Search](/docs/time-portal/search) or [Fetch](/docs/time-portal/fetch). ## Envelope Every entity shares the same five top-level fields. `properties` contains the type-specific fields. | Field | Type | Meaning | | --- | --- | --- | | `id` | string | The entity's stable URL, `https://world.epochal.com//`. | | `type` | string, open | The kind of entity. It sets the shape of `properties`. | | `schema_version` | integer | The layout version of the type's `properties`. It never changes within `/v1/`. | | `updated_at` | string (date-time) | When the properties were last refreshed. | | `properties` | object | The type's own fields. | ## Types | `type` | What it is | `schema_version` | | --- | --- | --- | | `organization` | A company: profile, headquarters, revenue band, funding rounds. | `1` | | `person` | A person: profile, jobs, schools, languages, recent posts. | `1` | | `place` | A business or point of interest: address, location, hours, ratings, open state. | `1` | | `crypto` | A crypto asset: latest day, quote, chart, price on a date, price history. | `1` | | `weather` | A city's weather: current conditions, today and yesterday, forecast, past days. | `1` | ## Shape - Every field is present; `null` when its value is unknown; an empty list is `[]`. - Series rows are objects keyed by `time` or `date`. - Units are in the field name where not obvious, such as `_pct` (percent) or `_kmh`. - Money comes with a `currency`, on the same object or one that holds it, or in its field name, such as `min_usd`. - Times are RFC 3339 in UTC; days are `YYYY-MM-DD`; a partial date is `YYYY`, `YYYY-MM`, or `YYYY-MM-DD`. - A reference to another entity is `{"id": …, "name": …}`; `id` can be `null`, so fall back to `name`. ## Open values The `type` union and every enumerated string in an entity are open. Within `/v1/`, new values can be added to each without notice. The following table lists the known values. | Enum | `type` | Field | Known values | | --- | --- | --- | --- | | `Currency` | `organization`, `crypto` | `currency`, `funding_rounds[].currency` | `USD`, `USDT`, `EUR`, `GBP`, `JPY`, `CNY`, … | | `FundingRoundType` | `organization` | `funding_rounds[].round_type`, `latest_funding_round.round_type` | `pre_seed`, `seed`, `angel`, `series_a`, `series_b`, `series_c`, … | | `LanguageProficiency` | `person` | `languages[].proficiency` | `elementary`, `limited_working`, `professional_working`, `full_professional`, `native_or_bilingual` | | `PlaceState` | `place` | `status.state` | `open`, `temporarily_closed`, `closed`, `removed` | | `Weekday` | `place` | `opening_hours[].day` | `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday` | | `WeatherStatus` | `weather` | `today.status`, `yesterday.status`, `days[].status` | `preliminary`, `final`, `not_reported` | ## How entities can change Within `/v1/`, entities change only by addition. | Change | Within `/v1/` | | --- | --- | | A new entity `type` | Yes, without notice | | A new field, always nullable | Yes, without notice | | A new value in an open enum | Yes, without notice | | Removing, renaming, or retyping a field, making a field nullable, or dropping an enum value | No. Only in a new version, such as `/v2/`, announced as [Versioning and Deprecation](/docs/resources/versioning-and-deprecation) describes | To keep your client working through every change that `/v1/` allows, follow these four rules. - **Accept a `type` you don't know.** Keep the entity as raw JSON or skip it. Never fail the whole response. - **Ignore fields you don't know.** New fields appear in `properties` and in the objects inside it. - **Accept enum values you don't know.** Treat an unknown value as "other", not as an error. - **Treat a missing field the same as `null`.** A field added later is absent from responses you stored before it existed. `schema_version` increases only with a breaking layout change, so within `/v1/` it keeps the value in the [Types](#types) table. ## Examples The following examples show one entity of each type, as search or fetch returns it. ```json Organization { "id": "https://world.epochal.com/organization/RgPm6FrEK-Q", "type": "organization", "schema_version": 1, "updated_at": "2026-11-13T21:45:57Z", "properties": { "name": "Adobe", "legal_name": "Adobe Systems Incorporated", "description": "Adobe empowers everyone, everywhere to imagine, create, and bring any digital experience to life. From creators and students to small businesses, global enterprises, and nonprofit organizations — customers choose Adobe products to ideate, collaborate, be more productive, drive business growth, and build remarkable experiences.", "tagline": "Empowering everyone to create. ✨", "domain": "adobe.com", "industry": "Software Development", "specialties": [ "Digital Publishing", "Digital Marketing", "Social Marketing", "Web Marketing", "Digital Media", "Software", "Mobile Apps", "Photoshop", "Illustrator", "Web Experience Management", "Creative Cloud", "Acrobat", "Online Analytics", "Social Measurement", "Creative Suite", "Touch Apps" ], "founded_year": 1982, "employee_count": 43511, "headquarters": { "formatted": "San Jose, CA", "street": "345 Park Avenue", "city": "San Jose", "region": "CA", "postal_code": "95110-2704", "country_code": "US" }, "revenue_range": { "min_usd": 10000000000, "max_usd": null }, "ticker": "ADBE", "exchange": null, "latest_funding_round": { "round_type": "series_unknown", "announced_on": "1984-11-01", "amount": 2500000, "currency": "USD", "investors": [ { "id": null, "name": "Apple" } ] }, "funding_rounds": [ { "round_type": "series_unknown", "announced_on": "1984-11-01", "amount": 2500000, "currency": "USD", "investors": [ { "id": null, "name": "Apple" } ] } ] } } ``` ```json Person { "id": "https://world.epochal.com/person/BUSD3RdF6WI", "type": "person", "schema_version": 1, "updated_at": "2026-11-10T05:31:47Z", "properties": { "name": "Lisa Su", "headline": "Chair & CEO at AMD", "summary": "As chair and chief executive officer at AMD, I am leading AMD's transformation into the industry’s high-performance and adaptive computing leader, helping solve the world's most important challenges by delivering the next-generation of computing and AI solutions.", "industry": "Semiconductor Manufacturing", "location": { "formatted": "Austin, Texas, United States", "country_code": "US" }, "follower_count": 239177, "experience": [ { "title": "Chair & CEO", "organization": { "id": null, "name": "AMD" }, "start_date": "2022-02", "end_date": null, "is_current": true, "location": "United States", "description": null }, { "title": "President & CEO", "organization": { "id": null, "name": "AMD" }, "start_date": "2014-10", "end_date": "2022-02", "is_current": false, "location": "Austin", "description": null }, { "title": "SVP & GM, Global Business Units", "organization": { "id": null, "name": "AMD" }, "start_date": "2012-01", "end_date": "2014-10", "is_current": false, "location": null, "description": null } ], "education": [ { "school": { "id": null, "name": "Massachusetts Institute of Technology" }, "degree": "PhD", "field_of_study": null, "start_date": "1990", "end_date": "1994" }, { "school": { "id": null, "name": "Massachusetts Institute of Technology" }, "degree": "BS/MS", "field_of_study": null, "start_date": "1986", "end_date": "1991" } ], "skills": [], "languages": [], "posts": [ { "text": "It’s been an eventful few weeks, and yesterday was another momentous day.\nThrilled to share that AMD has agreed to acquire World Labs, a truly exceptional AI research and model company led by my friend Fei-Fei Li.\nWe share an ambition to accelerate AI technology and adoption for the good of humanity. That means bringing insights from next-generation models and emerging workloads together with deep co-design and optimization across hardware, software and systems.\nWe also believe in an open AI ecosystem that gives customers choice across models and compute platforms, and this acquisition will allow us to expand our contributions to that ecosystem.\nI’ve always been a huge fan of Fei-Fei’s pioneering work in AI, and I’m incredibly excited about what our teams will accomplish together.", "posted_on": "2026-09-29", "like_count": 1652, "comment_count": 53 } ] } } ``` ```json Place { "id": "https://world.epochal.com/place/Y2FsaWZvcm5pYV91c9zgEyAGHUREu9_XLli7ZdQ", "type": "place", "schema_version": 1, "updated_at": "2026-09-18T02:38:01Z", "properties": { "name": "Golden Gate Park", "category": "Park", "categories": [ "Park", "Garden", "Tourist attraction" ], "description": "The city's 1,017-acre oasis draws hikers, bikers, art lovers & music fans, plus gardens & museums.", "summary": [], "address": { "formatted": "San Francisco, CA, United States", "street": null, "city": "San Francisco", "region": "California", "postal_code": null, "country_code": "US" }, "location": { "lat": 37.7689203, "lon": -122.48297699999999 }, "phone": "+1 415-831-2700", "website": "https://sfrecpark.org/770/Golden-Gate-Park/", "opening_hours": [ { "day": "monday", "hours": "Open 24 hours" }, { "day": "tuesday", "hours": "Open 24 hours" }, { "day": "wednesday", "hours": "Open 24 hours" }, { "day": "thursday", "hours": "Open 24 hours" }, { "day": "friday", "hours": "Open 24 hours" }, { "day": "saturday", "hours": "Open 24 hours" }, { "day": "sunday", "hours": "Open 24 hours" } ], "rating": { "score": 4.8, "review_count": 44744, "distribution": [ { "stars": 1, "count": 273 }, { "stars": 2, "count": 207 }, { "stars": 3, "count": 1286 }, { "stars": 4, "count": 6702 }, { "stars": 5, "count": 36276 } ] }, "status": { "state": "open", "detected_at": null } } } ``` ```json Crypto { "id": "https://world.epochal.com/crypto/kL2xSZlDKXw", "type": "crypto", "schema_version": 1, "updated_at": "2026-11-13T14:58:00Z", "properties": { "name": "Bitcoin", "symbol": "BTC", "currency": "USD", "stale_hours": null, "latest": { "date": "2026-11-13", "open": 71381.09, "high": 71416.98, "low": 67500, "close": 68877.66, "volume": 1606.78, "quote_volume": null, "trades": null, "currency": "USD", "previous_close": 71374.07, "change": -2496.41, "change_pct": -3.4976, "partial": true, "through": "2026-11-13T14:58:00Z" }, "range_52w": { "low": 57734.63, "high": 99815 }, "quote": { "at": "2026-11-13T14:58:00Z", "price": 68877.66, "currency": "USD" }, "chart": { "prices": [ { "time": "2026-11-12T14:58:00Z", "price": 71120.4 }, { "time": "2026-11-12T15:58:00Z", "price": 71388.12 }, { "time": "2026-11-13T14:58:00Z", "price": 68877.66 } ] }, "price_on_date": null, "price_history": null } } ``` ```json Weather { "id": "https://world.epochal.com/weather/6ZZRCnyEeYA", "type": "weather", "schema_version": 1, "updated_at": "2026-11-20T21:51:00Z", "properties": { "name": "New York City", "country_code": "US", "region": "New York", "location": { "lat": 40.71, "lon": -74.01 }, "timezone": "America/New_York", "current": { "observed_at": "2026-11-20T21:51:00Z", "temperature": { "c": 8.3, "f": 46.9 }, "model_estimate": false, "humidity_pct": 54.2, "wind": { "speed_kmh": 18.5, "speed_mph": 11.5, "direction_deg": 300 }, "condition": { "code": 2, "label": "Partly cloudy" } }, "today": { "date": "2026-11-20", "status": "preliminary", "model_estimate": false, "high": { "c": 10, "f": 50 }, "low": { "c": 4.4, "f": 40 }, "precipitation": { "mm": 0, "inch": 0 }, "hourly": null }, "yesterday": { "date": "2026-11-19", "status": "final", "model_estimate": false, "high": { "c": 12.8, "f": 55 }, "low": { "c": 6.7, "f": 44 }, "precipitation": { "mm": 3.3, "inch": 0.13 }, "hourly": null }, "forecast": { "issued_at": "2026-11-20T12:00:00Z", "hourly": [ { "time": "2026-11-21T00:00:00Z", "temperature": { "c": 6.9, "f": 44.4 }, "precipitation": { "mm": 0, "inch": 0 } } ], "daily": [ { "date": "2026-11-21", "high": { "c": 9.4, "f": 48.9 }, "low": { "c": 3.1, "f": 37.6 }, "precipitation": { "mm": 0.2, "inch": 0.01 }, "condition": { "code": 3, "label": "Overcast" } } ] }, "days": null } } ``` ## Next steps - [Search](/docs/time-portal/search): Time Portal search gives ranked results from the time-gated web. - [Fetch](/docs/time-portal/fetch): Time Portal fetch gives an archived copy of a page from the time-gated web. - [Versioning and Deprecation](/docs/resources/versioning-and-deprecation): Backward-compatible changes ship without a new path version; breaking changes ship under a new version such as /v2/. --- # Search Time Portal search gives ranked results from the time-gated web. ## Request Send a `POST` request to `https://api.epochal.com/v1/time-portal/search` with three headers and a JSON body. | Header | Required | Value | | --- | --- | --- | | `x-api-key` | Yes | Your API key. See [Authentication](/docs/get-started/authentication). | | `Accept-Datetime` | Yes | The instant the request is set to: a past HTTP-date or RFC 3339 instant at or after `1970-01-01T00:00:00Z`. For every form it accepts, see [How the Instant Works](/docs/time-portal/how-the-instant-works). | | `Content-Type` | Yes | `application/json` | ```bash cURL 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, "published_after": "2026-01-01T00:00:00Z" }' ``` ```py Python import os import requests response = requests.post( "https://api.epochal.com/v1/time-portal/search", headers={ "x-api-key": os.environ["EPOCHAL_API_KEY"], "Accept-Datetime": "2026-03-01T00:00:00Z", }, json={ "query": "european battery gigafactory delays", "num_results": 2, "published_after": "2026-01-01T00:00:00Z", }, ) response.raise_for_status() print(response.json()) ``` ### Body fields | Field | Type | Default | Description | | --- | --- | --- | --- | | `query` | string, `1` to `1,000` characters | required | Search query string. | | `num_results` | integer, `1` to `10` | `10` | Maximum number of results to return. | | `domains` | array of strings (up to 2,048 chars each; max 200 combined with `exclude_domains`) | none | Restrict results to these hosts, paths, or public suffixes (subdomains included), e.g. `example.com`, `example.com/blog`, `gov.uk`. | | `exclude_domains` | array of strings (same syntax and shared 200 limit) | none | Exclude pages from these sites (subdomains included). Cannot overlap with `domains`. | | `languages` | array of up to 8 [BCP 47](https://www.rfc-editor.org/info/bcp47) tags | none | Preferred result languages in priority order, e.g. `en`, `pt-BR`. | | `published_after` | RFC 3339 timestamp | none | Return only pages published on or after this timestamp. Must be earlier than `Accept-Datetime`. | | `categories` | array of category names | none | Filter to specific verticals: `news`, `finance` (SEC filings), `legal` (court opinions, statutes, regulations, sanctions), `publications` (academic articles), `companies`, `people`, or `maps`. Omit to search all verticals. | | `include_text` | boolean | `false` | Include each page's extracted full text in `results[].text`. | Unknown fields return `400`. Pass the cutoff timestamp in the `Accept-Datetime` header (`as_of` in the request body returns `400`). ## Response A `200` returns ranked results, best first, with the instant and a request id. ```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 }, { "title": "Gigafactory timelines slip across Europe", "url": "https://analysis.example.org/energy/gigafactory-timelines", "snippet": "Three of the five plants announced for 2026 now target 2027 or later…", "published_at": "2026-01-28T09:00:00Z", "domain": "example.org", "language": "en", "entity": null } ] } ``` | Field | Meaning | | --- | --- | | `as_of` | The instant the search was set to, from `Accept-Datetime`. | | `request_id` | Identifies this request in Epochal's logs; quote it when reporting a problem. | | `results` | Ranked results, best first. An empty list is still a `200`. | | `results[].title` | The page's title. | | `results[].url` | The page's canonical URL. | | `results[].snippet` | A short passage from the page that matches the query. | | `results[].text` | The page's extracted text. Only present when `include_text` is true and text is available. | | `results[].published_at` | When the page was published. `null` when unknown. | | `results[].domain` | The page's registrable domain, such as `example.com`. `null` when unknown. | | `results[].language` | The page's language as a BCP 47 tag. `null` when not detected. | | `results[].entity` | The entity when the result is from an Epochal World page. It's the entity [Fetch](/docs/time-portal/fetch) returns for `url`, built from the copy of the page the result came from. `null` for every other result. See [World Entities](/docs/time-portal/entities). | To read a result in full, send its `url` to [Fetch](/docs/time-portal/fetch) with the same `Accept-Datetime`. ## Best practices - **Keep the query to the one question.** `query` is plain text, up to 1,000 characters. - **Narrow by site first.** `domains` and `exclude_domains` take up to 200 entries between them: a host, a host and path, or a public suffix, subdomains included. An entry can't be in both. - **Name the languages the task needs.** `languages` takes up to 8 [BCP 47](https://www.rfc-editor.org/info/bcp47) tags, most preferred first. - **Use one instant for the whole task.** Every search and fetch in a run shares the same `Accept-Datetime`; advancing it mid-task leaks. See [How the Instant Works](/docs/time-portal/how-the-instant-works). ## Errors Errors use the same JSON shape as every other endpoint. Check `type`, not `message`. No error counts against your free requests. | Status | `type` | What to do | | --- | --- | --- | | `400` | `invalid_request` | A body field is invalid, or `Accept-Datetime` is missing, invalid, not in the past, or before 1970. See `error.message` for details. | | `401` | `invalid_api_key` | The `x-api-key` header is missing, or the key is unknown, revoked, or expired. Fix the key. | | `402` | `free_quota_exhausted` | Your organization has exhausted its free trial requests. [Contact us](https://epochal.com/contact) for more. | | `422` | `query_refused` | The query falls under the usage policy and was not billed. Do not retry the same query. | | `429` | `rate_limit_exceeded` | Rate limit exceeded. Wait for `Retry-After` before retrying. | | `500`, `503`, `504` | `internal_error`, `service_unavailable`, `timeout` | Something failed on Epochal's side. Retry with backoff. | For the cause and fix of each, see [Errors](/docs/resources/errors). ## Next steps - [Fetch](/docs/time-portal/fetch): Time Portal fetch gives an archived copy of a page from the time-gated web. - [How the Instant Works](/docs/time-portal/how-the-instant-works): Every Time Portal request evaluates against a point-in-time cutoff specified in Accept-Datetime. - [Rate Limits](/docs/get-started/rate-limits): Organization and per-IP rate limits, retry behavior, and pacing guidance. - [Errors](/docs/resources/errors): Standard JSON error envelope, HTTP status codes, sandbox failure types, and retry rules. --- # Fetch Time Portal fetch gives an archived copy of a page from the time-gated web. ## Request Send a `POST` request to `https://api.epochal.com/v1/time-portal/fetch` with three headers and a JSON body. | Header | Required | Value | | --- | --- | --- | | `x-api-key` | Yes | Your API key. See [Authentication](/docs/get-started/authentication). | | `Accept-Datetime` | Yes | The instant the request is set to: a past HTTP-date or RFC 3339 instant at or after `1970-01-01T00:00:00Z`. For every form it accepts, see [How the Instant Works](/docs/time-portal/how-the-instant-works). | | `Content-Type` | Yes | `application/json` | ```bash cURL 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 }' ``` ```py Python import os import requests response = requests.post( "https://api.epochal.com/v1/time-portal/fetch", headers={ "x-api-key": os.environ["EPOCHAL_API_KEY"], "Accept-Datetime": "2026-03-01T00:00:00Z", }, json={ "url": "https://news.example.com/energy/battery-plant-delay", "max_characters": 2000, }, ) response.raise_for_status() print(response.json()["content"]) ``` ### Body fields | Field | Type | Default | Description | | --- | --- | --- | --- | | `url` | string | required | Full `http` or `https` URL to retrieve. | | `max_characters` | integer, `1` to `1,000,000` | `100000` | Maximum characters of `content` to return. Longer pages set `truncated: true`. Ignored for `format: "page"`. | | `format` | `structured` or `page` | `structured` | `structured` returns extracted markdown and metadata in JSON. `page` returns the raw archived document body with its `Content-Type` header. | Unknown fields are rejected with `400`. ## Response A `200` returns the page's content and metadata, with the instant and a request id. ```json JSON { "as_of": "2026-03-01T00:00:00Z", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15", "status": "success", "id": "6b81feebde1a4821a125fb307894e7ad", "url": "https://news.example.com/energy/battery-plant-delay", "final_url": "https://news.example.com/energy/battery-plant-delay/", "title": "Battery plant start pushed back to late 2027", "description": "The cell maker said commissioning would slip.", "author": "Jane Doe", "published_at": "2026-02-11T06:12:00Z", "language": "en", "content": "# Battery plant start pushed back to late 2027\n\nThe cell maker said…", "truncated": true, "entity": null } ``` | Field | Meaning | | --- | --- | | `as_of` | The instant the read was set to, from `Accept-Datetime`. | | `request_id` | Identifies this request in Epochal's logs; quote it when reporting a problem. | | `status` | `success` when the page was read; `error` when it could not be, with the reason in `page_error`. | | `page_error` | Why the page could not be read: the site's `http_status_code` and a short `message`. Absent on `success`. | | `id` | Identifies the exact stored copy served. `null` when unknown. | | `url` | The URL as requested. | | `final_url` | The URL the content was read from, after redirects and normalization. | | `title` | The page's title. | | `description` | Page summary from metadata. `null` if not specified. | | `author` | Page authors, comma-separated. `null` if none are listed. | | `published_at` | When the page was published. `null` when unknown. | | `language` | The page's language as a BCP 47 tag. `null` when not detected. | | `content` | The page's extracted text as markdown, at most `max_characters` long. | | `truncated` | Whether `max_characters` cut `content` short. | | `entity` | When the URL is an Epochal World page, the crypto asset, city's weather, person, organization, or place it names, as of the instant. It has a `type` and `properties`. `null` for an ordinary web page. See [World Entities](/docs/time-portal/entities). | ## A page that could not be read When the request is fine but there is no readable copy of the page, the response is still a `200`, with `status` set to `error`, an empty `content`, and the reason in `page_error`: | `page_error.http_status_code` | What happened | | --- | --- | | `null` | There is no copy of the page from at or before the instant. Try a later `Accept-Datetime`, or search first for a URL that has one. | | `4xx` | The site refused the read or had no such page then, such as 404 or 403. Do not retry the same URL at the same instant. | | `5xx` | The site failed when the copy was read. | | `2xx` | The copy has no readable content. | A page whose redirects lead to a URL that is never served reads `Not served.`, with a `403` or `400`. A read that reaches no page counts as a request like any other. With `format: page` the body is the document itself, so the page's outcome is in two response headers instead, on every `200`: | Response header | Description | | --- | --- | | `x-fetch-status-code` | Archived origin's HTTP status code (`200` on success, or the origin's `404`, `403`, `429`, `500`, etc.). `0` when no copy exists at or before `Accept-Datetime` or the host was unreachable. Matches `page_error.http_status_code` above. | | `x-fetch-status-message` | Human-readable summary (`OK.` on success, or `page_error.message`). Branch on the numeric code, not the message. | When the page was not read, the body is empty and omits `Content-Type` and `Memento-Datetime`. The HTTP status is still `200`, and the request still counts against your quota. A non-`200` status means the API request itself failed. Treat `x-fetch-status-code` as the page's status: | Status line | `x-fetch-status-code` | What happened | What to do | | --- | --- | --- | --- | | `200` | `2xx` | The page was read; the body is the document. | Use it. | | `200` | `4xx` or `5xx` | The origin site returned this status when archived. | Avoid retrying the same URL at the same instant because the archived response will not change. | | `200` | `0` | No copy from at or before the instant, or the host could not be reached. | Try a later `Accept-Datetime` or another URL instead of retrying. | | not `200` | absent | The request failed; see [Errors](#errors). | Act on the status: fix the request, wait for `Retry-After`, or retry with backoff. | In a sandbox, an agent's reads go through this same call, and the response is reshaped so ordinary HTTP clients work. See [Images and Network](/docs/time-portal/sandbox/images-and-network#status-codes). ```bash cURL curl -sS -D - -o page.html 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/missing", "format": "page"}' # HTTP/2 200 # x-fetch-status-code: 404 # x-fetch-status-message: Page not found. ``` ## Errors A non-`200` status means the request itself failed, in either format. Errors use the same JSON shape as every other endpoint. No error counts against your free requests. | Status | `type` | What to do | | --- | --- | --- | | `400` | `invalid_request` | `url` is missing, is not a full `http`/`https` URL, targets a private/local host, uses a port other than 80 or 443, or includes embedded credentials; `max_characters` is out of range; or `Accept-Datetime` is missing, invalid, not in the past, or before 1970. See `error.message` for details. | | `401` | `invalid_api_key` | The `x-api-key` header is missing, or the key is unknown, revoked, or expired. Fix the key. | | `402` | `free_quota_exhausted` | Your organization has exhausted its free trial requests. [Contact us](https://epochal.com/contact) for more. | | `403` | `url_not_allowed` | This URL is blocked from fetching. Use another source instead of retrying. | | `429` | `rate_limit_exceeded` | Rate limit exceeded. Wait for `Retry-After` before retrying. | | `500`, `503`, `504` | `internal_error`, `service_unavailable`, `timeout` | Something failed on Epochal's side. Retry with backoff. | For the cause and fix of each, see [Errors](/docs/resources/errors). ## Next steps - [Search](/docs/time-portal/search): Time Portal search gives ranked results from the time-gated web. - [How the Instant Works](/docs/time-portal/how-the-instant-works): Every Time Portal request evaluates against a point-in-time cutoff specified in Accept-Datetime. - [Sandbox](/docs/time-portal/sandbox): A sandbox is a Linux virtual machine whose clock and network are set to an instant. - [Errors](/docs/resources/errors): Standard JSON error envelope, HTTP status codes, sandbox failure types, and retry rules. --- # Overview A sandbox is a Linux virtual machine whose clock and network are set to an instant. You can run commands and read and write files through its endpoints. ## Endpoints | Endpoint | Description | | --- | --- | | [`POST /v1/time-portal/sandbox`](/reference/sandboxCreate) | Create and boot a sandbox. Returns `202` immediately with `state: "creating"`. | | [`GET /v1/time-portal/sandbox`](/reference/sandboxList) | List organization sandboxes across all states, newest first. Filter by `state`; paginate with `cursor` and `limit` (`1`–`100`, default `50`). | | [`GET /v1/time-portal/sandbox/{id}`](/reference/sandboxGet) | Retrieve a sandbox. Pass `wait=55s` to long-poll while `creating` until `live` or `failed`. | | [`DELETE /v1/time-portal/sandbox/{id}`](/reference/sandboxTerminate) | Terminate a sandbox immediately (`204`). Idempotent on already-ended sandboxes. | | [`POST /v1/time-portal/sandbox/{id}/execs`](/reference/sandboxExec) | Start a command asynchronously. Returns `200` with the command `id`. | | [`GET /v1/time-portal/sandbox/{id}/execs/{exec_id}/output`](/reference/sandboxExecOutput) | Stream stdout/stderr frames from `stdout_offset` and `stderr_offset`, plus `exit` on completion. Supports `wait` and `max_bytes`. | | [`POST /v1/time-portal/sandbox/{id}/execs/{exec_id}/input`](/reference/sandboxExecInput) | Send stdin bytes, close stdin (`eof`), or send a POSIX signal to a running command. | | [`PUT /v1/time-portal/sandbox/{id}/files`](/reference/sandboxWriteFile) | Write raw bytes to a file at `path` and `offset`. | | [`GET /v1/time-portal/sandbox/{id}/files`](/reference/sandboxReadFile) | Read a byte range from a file. | | [`DELETE /v1/time-portal/sandbox/{id}/files`](/reference/sandboxRemoveFile) | Delete a file or directory. | | [`GET /v1/time-portal/sandbox/{id}/files/stat`](/reference/sandboxStatFile) | Retrieve file type, size, permissions, and modification time. | | [`GET /v1/time-portal/sandbox/{id}/files/list`](/reference/sandboxListFiles) | List directory entries with cursor pagination. | Every request takes `x-api-key`. Only create takes `Accept-Datetime`; later requests on the sandbox inherit its instant. ### Asynchronous endpoints | Endpoint | Returns | Then | | --- | --- | --- | | Create | `202` at once, the sandbox `creating` | Get the sandbox with `wait` until `live` or `failed` | | Command | `200` once the command has started, with its `id` | Read output with `wait` until `exit` is set | Every other endpoint finishes its work before it returns. A request with `wait` returns as soon as the state changes or new output arrives, so you can poll in a loop without sleeping. ## Create a sandbox ```bash cURL curl https://api.epochal.com/v1/time-portal/sandbox \ -H "x-api-key: $EPOCHAL_API_KEY" \ -H "Accept-Datetime: 2026-03-01T00:00:00Z" \ -H "Idempotency-Key: 7d0c9b2e-backtest-42" \ -H "Content-Type: application/json" \ -d '{"network": "time-portal", "vcpus": 1, "memory_gib": 2, "timeout": "1h"}' ``` | Header | Required | Value | | --- | --- | --- | | `Accept-Datetime` | Yes | The instant the sandbox's clock and network are set to, returned as its `as_of`. A past HTTP-date or RFC 3339 instant; one before the oldest build, `2023-04-01`, is a `400`. | | `Idempotency-Key` | No | Any unique string; a retry with the same key returns the same sandbox, so a retried create does not boot a second one. Reusing a key with a different body is a `409`. | Every body field is optional. A sandbox boots the newest Ubuntu build dated on or before `as_of`, with 1 vCPU and 2 GiB; see [Images and Network](/docs/time-portal/sandbox/images-and-network). The free hour is sized for that default; a larger sandbox uses it up faster, so a 2 vCPU, 4 GiB one gets 30 minutes. See [Pricing](/docs/get-started/pricing#how-sandboxes-use-the-free-hour). | Field | Default | What it does | | --- | --- | --- | | `network` | `none` | `none`: names do not resolve and no connection leaves the sandbox. `time-portal`: HTTP and HTTPS to the web as it stood at `as_of`, through Time Portal, and package mirrors set to it; each page read counts as one fetch request. See [Images and Network](/docs/time-portal/sandbox/images-and-network). | | `vcpus` | `1` | Virtual CPUs reserved for the sandbox: 1, 2, 4, 8, or 16. | | `memory_gib` | `2` | Memory reserved, in GiB: 1, 2, 4, 8, 16, 32, or 64, at most 8 per vCPU. | | `timeout` | `1h` | The sandbox ends this long after it boots, from `1m` to `24h`. It cannot be extended. | | `idle_timeout` | `10m`, or `timeout` when that is shorter | The sandbox ends after this long with no command running and no request that starts a command, sends input, or writes or removes files; reads and polls do not count. From `1m` to `timeout`. | | `env` | none | Environment variables for every command run in the sandbox; at most 128 and 32 KiB. | | `metadata` | `{}` | Custom key-value labels attached to the sandbox (up to 16 pairs). | | `apps` | `[]` | Prebuilt app names mounted read-only at `/opt/epochal/bin` (up to 8). Apps are current builds rather than builds from `as_of`; see [Images and Network](/docs/time-portal/sandbox/images-and-network#which-build-a-sandbox-gets). | Durations are whole numbers of hours, minutes, and seconds, in that order: `90s`, `10m`, `1h`, `1h30m`, or Go's `1h30m0s`. Fractions such as `1.5h` are refused; write `90m`. Responses format each duration in its largest exact unit, so `1h30m` is returned as `90m`. The create returns `202` with the sandbox `creating`. Until the sandbox is `live`, commands and file requests return `409`. ```bash cURL curl "https://api.epochal.com/v1/time-portal/sandbox/$SANDBOX_ID?wait=55s" \ -H "x-api-key: $EPOCHAL_API_KEY" ``` ### The sandbox object Create, get, and list return the same object. ```json JSON { "id": "sbx_7f3k9q2m4x8p1c6w", "state": "live", "as_of": "2026-03-01T00:00:00Z", "network": "time-portal", "vcpus": 1, "memory_gib": 2, "timeout": "1h", "idle_timeout": "10m", "created_at": "2026-11-02T18:04:11Z", "booted_at": "2026-11-02T18:04:14Z", "expires_at": "2026-11-02T19:04:14Z", "ended_at": null, "error": null, "metadata": {}, "apps": [] } ``` | Field | Meaning | | --- | --- | | `id` | The sandbox's id. | | `state` | `creating` (accepted and booting), `live` (booted and accepting requests), `ended` (terminated, timed out, or idle-expired; files and command output have been deleted), or `failed` (failed to boot; `error` describes the cause). | | `as_of` | Point-in-time cutoff for the sandbox's clock and network, resolved from `Accept-Datetime`. | | `network`, `vcpus`, `memory_gib`, `timeout`, `idle_timeout` | Configuration as created, with defaults applied. | | `created_at` | Timestamp when sandbox creation was accepted. | | `booted_at` | Timestamp when the sandbox finished booting; metering starts here. `null` until `live`. | | `expires_at` | Latest timestamp when the sandbox will end (`booted_at + timeout`). | | `ended_at` | Timestamp when the sandbox ended. | | `error` | Why the sandbox failed or ended unexpectedly, with a `message`: expiry (`lifetime_expired`, `idle_expired`), a crash (`out_of_memory`, `sandbox_lost`), or billing (`free_quota_exhausted`, `insufficient_credits`, `organization_suspended`, `spend_limit_reached`). `null` otherwise, including after explicit termination. | | `metadata` | The labels it was created with. | | `apps` | The apps it was created with, each as a `name` and `version`; `[]` when none. | ## Run a command Start a command with [`POST /v1/time-portal/sandbox/{id}/execs`](/reference/sandboxExec) and an `argv`, then read its output and `exit` with the output endpoint until `exit` is set. Output is kept only while the sandbox is `live`. See [Commands and Files](/docs/time-portal/sandbox/commands-and-files). ## Sandbox lifetime A sandbox ends at the first of its `timeout`, its `idle_timeout`, or a terminate. Once it ends, its files and the output of its commands are gone, and requests that run, read, or write in it return `409`. See [Lifecycle and Limits](/docs/time-portal/sandbox/lifecycle-limits-and-pricing). ## Errors Errors use the same JSON shape as every other endpoint. Check `type`, not `message`. No error counts against your free requests. The sandbox adds the following errors to the `401`, `402`, `403`, `429`, `500`, `503`, and `504` errors every endpoint shares. | Status | `type` | What to do | | --- | --- | --- | | `400` | `invalid_request` | A field, header, or path is invalid, including an `Accept-Datetime` before the oldest build or an `apps` name the catalog does not offer. Fix the request. | | `404` | `not_found` | No sandbox or command has that id in your organization. | | `409` | `conflict` | The sandbox is still starting. Wait until its state is `live` before retrying. | | `409` | `conflict` | The sandbox has ended, the command has exited, or an `Idempotency-Key` was reused with another body. Do not retry. | | `409` | `conflict` | An input's `seq` is out of order. Resend with the error's `next_seq`. | | `429` | `rate_limit_exceeded` | Too many requests, or too many sandboxes, vCPUs, or GiB running at once. Back off, or terminate sandboxes you are done with. | Sandbox runtime failures are not HTTP errors: `failed` or `ended` sandboxes report the reason in `error`. See [Errors](/docs/resources/errors). ## Troubleshooting | Symptom | Cause | Fix | | --- | --- | --- | | `GET` keeps returning `creating` | Booting usually takes seconds and can occasionally take over a minute. | Keep polling `GET /v1/time-portal/sandbox/{id}?wait=55s` until `state` is `live` or `failed`. A `failed` sandbox reports the reason in `error`. See [Lifecycle and Limits](/docs/time-portal/sandbox/lifecycle-limits-and-pricing). | | Every request on a new sandbox returns `409` `The sandbox is still starting.` | The sandbox is not `live` yet. | Wait for `state` to become `live` before retrying. | | A sandbox that was `live` returns `409` `The sandbox has ended.` | It ended via termination, `timeout`, `idle_timeout`, or exhausted quota. Inspect `error` via `GET`. | Create a new sandbox because ended sandboxes cannot be restarted. See [Errors](/docs/resources/errors). | | Files or output are gone | The sandbox ended and its state was deleted. | Read a command to its `exit` and download what you need before the sandbox ends, and set `idle_timeout` to the longest gap between your requests. See [Commands and Files](/docs/time-portal/sandbox/commands-and-files). | | The sandbox ends with `error.type` `sandbox_lost` | Its host failed. | Start a new sandbox. Download results of long jobs as they finish, so a lost sandbox costs less of a rerun. | | An input is a `409` with `next_seq` in the body | Its `seq` is out of order. | Resend with `seq` set to `next_seq`. See [Commands and Files](/docs/time-portal/sandbox/commands-and-files). | | `pip`, `npm`, or `apt` cannot find a version | The mirrors are set to the sandbox's `as_of`; the version was released later. | Pick a version released before the instant. See [Images and Network](/docs/time-portal/sandbox/images-and-network). | | Names do not resolve and no connection leaves the sandbox | `network` is `none`, the default. | Create the sandbox with `"network": "time-portal"`. See [Images and Network](/docs/time-portal/sandbox/images-and-network). | ## Next steps - [Commands and Files](/docs/time-portal/sandbox/commands-and-files): A command is a program you start in a live sandbox. - [Lifecycle and Limits](/docs/time-portal/sandbox/lifecycle-limits-and-pricing): A sandbox boots, runs while it is live, and ends at a timeout, a terminate, or a failure. - [Images and Network](/docs/time-portal/sandbox/images-and-network): A sandbox boots the Ubuntu build chosen by its instant and reaches only what its network setting allows. --- # Commands and Files A command is a program you start in a live sandbox. The files endpoints read and write the sandbox's filesystem. ## Start a command [`POST /v1/time-portal/sandbox/{id}/execs`](/reference/sandboxExec) starts a program in a `live` sandbox. It is asynchronous: it returns the command's `id` once the command has started, not when it ends. Send an `Idempotency-Key` so a retried request returns the same command instead of starting a second one. The command sees the sandbox's clock and network, both set to the sandbox's `as_of`; see [How the Instant Works](/docs/time-portal/how-the-instant-works). ```json JSON { "argv": ["python3", "-c", "import datetime; print(datetime.date.today())"], "env": {"PYTHONUNBUFFERED": "1"}, "timeout": "10m", "stdin_b64": "", "stdin_open": false } ``` - `argv` is the program and its arguments, up to 1,024 of them and 128 KiB, with `PATH` set but no shell: to use pipes or `&&`, run `["sh", "-c", "…"]`. A program that does not exist is an exit of 127, not an error. - Commands run as `root`, in `/home/epochal`, root's home, unless `cwd` says otherwise; a directory that does not exist is an exit of 2, not an error. `env` adds up to 128 variables, 32 KiB, on top of the sandbox's own. - `timeout` kills the command after this long, `1h` when unset and at most `24h`. - `stdin_b64` is the first bytes of standard input, at most 1 MiB decoded; upload larger inputs as a file. Stdin is closed after it unless `stdin_open` is true, which keeps it open for later `input` requests; bytes sent after it closes are dropped. Several commands can run in one sandbox at once, and a running command keeps the sandbox from going idle. ## Read output `GET …/execs/{exec_id}/output` returns frames of output, in stream order, and `exit` once the command has ended. ```json JSON { "frames": [ {"stream": "stdout", "offset": 0, "data_b64": "MjAyNi0wMy0wMQo="} ], "exit": {"reason": "exited", "code": 0} } ``` - Each frame is base64 bytes from `stdout` or `stderr` with the `offset` of its first byte in that stream. Pass `stdout_offset` and `stderr_offset` to ask for what came after what you have. - `wait` holds the request for up to `55s` until there is new output or the command exits, so a polling loop does not spin. A poll can return output and no `exit`. - `max_bytes` caps the output bytes returned across both streams per poll, at most 4 MiB, which is also the default. - `exit` is set only once every frame up to the end is in `frames`; until then, poll again from the end of each stream's last frame. Decode once at the end: a frame can end inside a multi-byte character. - Output is kept only while the sandbox is `live`. Once the sandbox ends, reading output is a `409`, so read a command to its `exit` before the sandbox ends. ## Check the exit reason | `exit.reason` | Meaning | | --- | --- | | `exited` | Process exited normally; `code` is its exit status. | | `signaled` | Process terminated by a signal; `signal` is the POSIX signal number. | | `out_of_memory` | Process exceeded the sandbox memory limit. | | `timeout` | Command exceeded its `timeout`. | | `sandbox_ended` | The sandbox terminated while the command was running. | | `lost` | The sandbox host stopped reporting command status. | ## Write input `POST …/execs/{exec_id}/input` sends stdin bytes, closes stdin, or sends a signal: ```json JSON {"seq": 0, "data_b64": "aGVsbG8K"} {"seq": 1, "eof": true} {"seq": 2, "signal": 15} ``` `seq` counts this command's input requests from 0. A retried request with the same `seq` is applied once, and a request out of order is a `409` `conflict` whose error carries `next_seq`; resend with that `seq`. Each request does one thing: `data_b64`, `eof`, or `signal`. Each `data_b64` is at most 1 MiB decoded; upload larger inputs as a file and have the command read it. Input to a command that has exited is a `409`. For every `409` case on a command, see [Errors](/docs/resources/errors). ## Install packages With `network: "time-portal"`, `apt`, `pip`, `uv`, and `npm` install from mirrors set to `as_of`; [Images and Network](/docs/time-portal/sandbox/images-and-network) says what is already installed. With `network: "none"`, upload what you need as files. ## Files The five endpoints under `/v1/time-portal/sandbox/{id}/files` all take absolute paths inside the sandbox. | Endpoint | Behavior | | --- | --- | | `PUT …/files?path=&offset=` | Writes raw request bytes (up to 8 MiB per request) at `offset`, creating missing parent directories. `offset=0` replaces the file; upload larger files in sequential chunks at advancing offsets. Returns the updated file stat. | | `GET …/files?path=` | Reads a byte range (`Range: bytes=-` or `bytes=-`, up to 64 MiB; defaults to the first 16 MiB). Returns `206` with `Content-Range: bytes -/`, `200` for an empty file, `416` if the range starts past EOF, or `400` for suffix/multi-range headers. | | `DELETE …/files?path=&recursive=` | Deletes a file or empty directory, or a directory tree when `recursive=true`. Non-empty directories without `recursive=true` return `400`. | | `GET …/files/stat?path=` | Returns `type` (`file`, `directory`, `symlink`, `other`), `size`, `mode`, `mtime` (sandbox clock), and `link_target`. | | `GET …/files/list?path=&recursive=&limit=` | Returns paginated directory entries with relative `path` values (default `50`, max `100`). Pass `next_cursor` as `cursor` for the next page. | A write or a remove counts as activity for `idle_timeout`. A read, a stat, or a list does not. Files live only as long as the sandbox. There is no persistent volume: download what you need to keep before the sandbox ends. ## Next steps - [Lifecycle and Limits](/docs/time-portal/sandbox/lifecycle-limits-and-pricing): A sandbox boots, runs while it is live, and ends at a timeout, a terminate, or a failure. - [Images and Network](/docs/time-portal/sandbox/images-and-network): A sandbox boots the Ubuntu build chosen by its instant and reaches only what its network setting allows. - [Sandbox](/docs/time-portal/sandbox): A sandbox is a Linux virtual machine whose clock and network are set to an instant. --- # Lifecycle and Limits A sandbox boots, runs while it is live, and ends at a timeout, a terminate, or a failure. A sandbox boots, runs while it is `live`, and ends at a timeout, a terminate, or a failure. ## States A sandbox's clock and network stay bound to its creation `Accept-Datetime` for its entire lifetime (see [How the Instant Works](/docs/time-portal/how-the-instant-works)). | State | Meaning | | --- | --- | | `creating` | Creation accepted; VM is booting. Command and file requests return `409` until `live`. | | `live` | Running and accepting command and file requests. Usage metering starts at `booted_at`. | | `ended` | Terminated, timed out, or idle-expired. Files and command output are deleted and the sandbox cannot be restarted. | | `failed` | Failed to boot; see `error` for the reason. Does not count against your free sandbox allowance. | State transitions are one-way (`creating → live → ended`, or `creating → failed`). Once `ended`, create a new sandbox. ## Wait for a sandbox `POST /v1/time-portal/sandbox` returns `202` immediately with `state: "creating"`. Long-poll with `wait=55s` until the state transitions: ```bash cURL curl "https://api.epochal.com/v1/time-portal/sandbox/$SANDBOX_ID?wait=55s" -H "x-api-key: $EPOCHAL_API_KEY" ``` `wait` is capped at `55s` (staying under standard 60-second HTTP timeouts). Loop while `state` is `creating`; booting usually takes a few seconds, occasionally over a minute. ## Two timeouts | Field | Default | Range | What it does | | --- | --- | --- | --- | | `timeout` | `1h` | `1m` to `24h` | The sandbox ends this long after it boots, whatever it is doing. `expires_at` is `booted_at + timeout`. It cannot be extended. | | `idle_timeout` | `10m`, or `timeout` when that is shorter | `1m` to `timeout` | The sandbox ends after this long with no command running and no request that starts a command, sends input, or writes or removes files. Reads do not count: getting the sandbox, listing, stat, reading files, and reading output do not keep an idle sandbox alive. | Pick `timeout` for the longest the job can take and `idle_timeout` for the longest gap between your requests. A sandbox ends at whichever comes first. A command's own `timeout` (`1h` by default, up to `24h`) is separate: it kills the command, not the sandbox. ## How a sandbox ends - **You terminate it.** [`DELETE /v1/time-portal/sandbox/{id}`](/reference/sandboxTerminate) terminates at once. Running commands end with reason `sandbox_ended`, and `error` stays `null`. Terminating an ended sandbox succeeds. - **It times out.** `timeout` passes. `error` is set to `lifetime_expired`. - **It goes idle.** `idle_timeout` passes with no run or write. `error` is set to `idle_expired`. - **It fails or runs out of quota while live.** `error` is set to `out_of_memory` (memory allocation exceeded), `sandbox_lost` (underlying host failed), or `free_quota_exhausted` (free sandbox allowance depleted). Requests that run, read, or write in an ended sandbox return `409`; get, list, and terminate still work, and get shows why it ended in `error`. ## Idempotent creates Send an `Idempotency-Key` header on create. A retried create with the same key and body returns the same sandbox instead of booting a second one. The same key with a different body is a `409` `conflict`. ## Labels `metadata` is up to 16 key-value pairs of your own, returned as given on every get and list. Use it to tag a sandbox with the run or task it belongs to; list returns the organization's sandboxes newest first, filtered by `state` if you pass one, and paged by `cursor` with a `limit` of 1 to 100, 50 when unset. ## Sizes | Setting | Default | Allowed | | --- | --- | --- | | `vcpus` | 1 | 1, 2, 4, 8, or 16 | | `memory_gib` | 2 | 1, 2, 4, 8, 16, 32, or 64, at most 8 per vCPU | ## Request limits | Parameter / Operation | Limit | | --- | --- | | `argv` | 1,024 entries, 128 KiB total | | `env` (sandbox or command) | 128 variables, 32 KiB total | | `metadata` | 16 key-value pairs | | Single `exec/input` request | 1 MiB decoded | | Single file write (`PUT .../files`) | 8 MiB per chunk (upload larger files in chunks) | | Single file read (`GET .../files`) | 64 MiB per `Range` request (16 MiB default without `Range`) | | Single output poll (`GET .../output`) | 4 MiB across stdout and stderr | | `apps` | 8 app names | ## Concurrency Creating a sandbox above your organization's concurrency or rate limit returns `429` (`rate_limit_exceeded`) with `Retry-After`. To request higher limits, [contact us](https://epochal.com/contact). ## Save sandbox time A sandbox counts against your free hour while it is `live`, from `booted_at` to `ended_at`, idle time included; a sandbox waiting on `idle_timeout` is still reserved. It counts at its size: the free hour is 1 vCPU-hour and 2 GiB-hours, so a 2 vCPU, 4 GiB sandbox uses it up in 30 minutes, and two default sandboxes running at once use it up in 30 minutes each. `creating` and `failed` sandboxes count nothing, and requests to the sandbox endpoints themselves count nothing. See [Pricing](/docs/get-started/pricing#how-sandboxes-use-the-free-hour). - Terminate explicitly. Do not rely on `timeout` for a job that finishes early. - Size for the job. The default 1 vCPU and 2 GiB gets the whole free hour; doubling either halves it. Memory is the larger share for big sandboxes; 8 GiB per vCPU is the ceiling, not the default. - Set `idle_timeout` to the longest gap you need, and terminate sandboxes you are done with. - Watch the usage page in the console, which shows what you have used. ## Next steps - [Commands and Files](/docs/time-portal/sandbox/commands-and-files): A command is a program you start in a live sandbox. - [Images and Network](/docs/time-portal/sandbox/images-and-network): A sandbox boots the Ubuntu build chosen by its instant and reaches only what its network setting allows. - [Sandbox](/docs/time-portal/sandbox): A sandbox is a Linux virtual machine whose clock and network are set to an instant. --- # Images and Network A sandbox boots the Ubuntu build chosen by its instant and reaches only what its network setting allows. A sandbox boots the Ubuntu build chosen by its instant and reaches only what its `network` setting allows. ## Which build a sandbox gets Every sandbox boots an Ubuntu image, built on a fixed set of dates. Every build is made from package archives as they stood on its date, and nothing in it is dated later. A sandbox boots the newest build dated on or before its `Accept-Datetime`, so a sandbox at `2025-03-01T00:00:00Z` gets the `2025-01-01` build. An `Accept-Datetime` before the oldest build, `2023-04-01`, is a `400`. Commands run as `root` with `HOME=/home/epochal`, root's home, and start there unless the command sets `cwd` or `env`. `python3`, `pip`, `node`, and `npm` are on `PATH`, and so is `uv` from the `2024-04-01` build on. Apps named in `apps` on create are mounted at `/opt/epochal/bin`, first on `PATH`; see [Sandbox](/docs/time-portal/sandbox). An app is a current build, not one as of the sandbox's `as_of`. Anything in the sandbox, an agent included, can read its version, bundled prompts, and docs, so a run that uses an app is not strictly held to the instant. For a strict instant, do not use apps. With `"network": "time-portal"`, `apt`, `pip`, `uv`, and `npm` install from the [package mirror](#package-mirror) set to the sandbox's `as_of`: `pip install pandas` in a sandbox at `2025-03-01` installs 2.2.3, and `pandas==2.3.0`, released later, is not found. With `"network": "none"` nothing can be installed. For how the instant is chosen, see [How the Instant Works](/docs/time-portal/how-the-instant-works). ## Builds | Date | Ubuntu | Python | Node | npm | uv | | --- | --- | --- | --- | --- | --- | | `2026-10-01` | 26.04 (resolute) | 3.14.7 | 24.21.0 | 11.19.0 | 0.12.21 | | `2026-07-01` | 26.04 (resolute) | 3.14.6 | 24.18.0 | 11.16.0 | 0.11.26 | | `2026-04-01` | 24.04 (noble) | 3.14.3 | 24.14.1 | 11.11.0 | 0.11.2 | | `2026-01-01` | 24.04 (noble) | 3.13.11 | 24.12.0 | 11.6.2 | 0.9.21 | | `2025-10-01` | 24.04 (noble) | 3.13.7 | 22.20.0 | 10.9.3 | 0.8.22 | | `2025-07-01` | 24.04 (noble) | 3.13.5 | 22.17.0 | 10.9.2 | 0.7.17 | | `2025-04-01` | 24.04 (noble) | 3.13.2 | 22.14.0 | 10.9.2 | 0.6.11 | | `2025-01-01` | 24.04 (noble) | 3.12.8 | 22.12.0 | 10.9.0 | 0.5.13 | | `2024-10-01` | 24.04 (noble) | 3.12.6 | 20.17.0 | 10.8.2 | 0.4.17 | | `2024-07-01` | 24.04 (noble) | 3.12.3 | 20.15.0 | 10.7.0 | 0.2.18 | | `2024-04-01` | 22.04 (jammy) | 3.12.2 | 20.12.0 | 10.5.0 | 0.1.26 | | `2024-01-01` | 22.04 (jammy) | 3.12.0 | 20.10.0 | 10.2.3 | none | | `2023-10-01` | 22.04 (jammy) | 3.11.5 | 18.18.0 | 9.8.1 | none | | `2023-07-01` | 22.04 (jammy) | 3.11.3 | 18.16.1 | 9.5.1 | none | | `2023-04-01` | 22.04 (jammy) | 3.11.1 | 18.15.0 | 9.5.0 | none | ## Preinstalled packages Every build installs the same packages, each at its newest version on the build's date. `/sandbox-images.json` on the docs site lists every apt and Python package installed, dependencies included, and the global npm packages, at their exact versions in every build. - **Python (pip):** `numpy`, `pandas`, `scipy`, `scikit-learn`, `matplotlib`, `seaborn`, `pillow`, `openpyxl`, `python-docx`, `python-pptx`, `pypdf`, `pdfplumber`, `reportlab`, `httpx`, `requests`, `beautifulsoup4`, `lxml`, `rich`, `typer`, `pydantic`, `pyyaml`, `tomlkit`, `orjson`, `tiktoken`, `tqdm`, `sympy`, `pyarrow` - **Node (npm, global):** `typescript`, `tsx`, `prettier`, `eslint`, `exceljs`, `docx`, `pptxgenjs` - **System (apt):** `bash`, `coreutils`, `findutils`, `grep`, `sed`, `tar`, `gzip`, `procps`, `util-linux`, `less`, `build-essential`, `linux-libc-dev`, `git`, `curl`, `wget`, `jq`, `python3`, `python3-dev`, `ripgrep`, `fd-find`, `bat`, `tree`, `htop`, `tmux`, `fzf`, `unzip`, `zip`, `7zip`, `sqlite3`, `ffmpeg`, `imagemagick`, `pandoc`, `httpie`, `file`, `rsync`, `bc`, `net-tools`, `iputils-ping`, `bind9-dnsutils`, `ca-certificates`, `xz-utils` ## Network settings The `network` setting on create fixes what a sandbox can reach for its life. For how the instant selects what the sandbox sees, see [How the Instant Works](/docs/time-portal/how-the-instant-works). | `network` | What the sandbox can reach | | --- | --- | | `none` (default) | Nothing: names do not resolve and no connection leaves the sandbox. | | `time-portal` | HTTP and HTTPS to the web as it stood at the sandbox's `as_of`, through Time Portal, and the [package mirror](#package-mirror) set to it. Nothing else. | There are no other network modes. Sandboxes cannot reach the live web, private services, or other sandboxes. ## Time Portal network - **Supported requests:** `GET` and `HEAD` requests from any HTTP client inside the sandbox (`curl`, `requests`, browser automation). Each request runs as a Time Portal [Fetch](/docs/time-portal/fetch) call with `format: "page"`, billed and rate-limited accordingly (except downloads from the [package mirror](#package-mirror)). - **DNS and TLS:** Clients that pin destination IP addresses or TLS certificates fail because traffic routes through the Time Portal proxy. - **Headers:** Sandbox requests cannot override `Accept-Datetime`, and client headers, cookies, and bodies do not leave the sandbox. ### Status codes Responses distinguish the archived site's HTTP status from Time Portal proxy errors using `x-fetch-status-code`. When `x-fetch-status-code` is present, the status came from the archive; when absent, the error came from Time Portal. `x-fetch-status-message` provides a human-readable summary for logs — branch on the numeric status code in code. | Status | `x-fetch-status-code` | What happened | What to do | | --- | --- | --- | --- | | `2xx` | same | The page as the site served it at `as_of`, with its `Content-Type`. | Use it. | | `3xx`, `4xx`, `5xx` | same | The archived origin's HTTP response, with an empty body. | Do not retry: the archive does not change. An archived `429` or `503` reflects the origin site at `as_of`, not a limit on your account. | | `404` | `0` | No copy of the page from at or before `as_of`, or the host could not be reached then. | Do not retry; try another URL. | | `403` | absent | Time Portal refused the read: a blocked URL, a non-read method (`POST`, `PUT`, etc.), or a suspended/out-of-credits organization. | Do not retry. | | `429` | absent | Organization Time Portal rate limit exceeded. | Wait `Retry-After` seconds, then retry. | | `503`, `504` | absent | Time Portal failed or timed out. | Retry with backoff. | Code that branches on `status_code` works as it would on the live web. To decide whether to retry, check `x-fetch-status-code`: when present, the status came from the archived site and is final; when absent, the error came from Time Portal. ## Package mirror `https://packages.epochal-files.com` is Epochal's package mirror. Sandboxes reach it directly rather than through Time Portal, so package downloads do not count as fetch requests. Every mirror request is pinned to the sandbox's `as_of`: only versions published on or before `as_of` exist, and `latest` resolves as of that timestamp. Every build configures its package managers to use this mirror, so `apt install`, `pip install`, `uv pip install`, `uv add`, and `npm install` work out of the box. | Ecosystem | URL | Contents | | --- | --- | --- | | Ubuntu (`apt`) | `/ubuntu` | `noble`, `resolute` and `jammy`, each with `-updates` and `-security`, as the Ubuntu archive stood on the day of `as_of`. | | PyPI (`pip`, `uv`) | `/simple/` | All of PyPI: every file uploaded by `as_of`. | | npm | `/npm/` | All of the npm registry: every version published by `as_of`, with the `latest` tag as it stood then. | | Node.js | `/node/dist/` | Node.js release builds, as on `nodejs.org/dist`. | | GitHub releases | `/github///releases/…` | Release assets of `astral-sh/uv`, `astral-sh/python-build-standalone` and `BurntSushi/ripgrep`. | Packages published after `as_of` return `404`. Other package ecosystems (such as conda, crates.io, Go modules, and Maven) are not mirrored and are not reachable from inside a sandbox. ## Inbound Nothing reaches a sandbox from outside except this API. There are no exposed ports, no SSH, and no tunnels. Interact through commands, output, input, and files. ## Choose a setting - Running code that needs no downloads: `none`. Upload dependencies as files. - An agent that browses or installs packages as of the instant: `time-portal`. ## Next steps - [Commands and Files](/docs/time-portal/sandbox/commands-and-files): A command is a program you start in a live sandbox. - [Lifecycle and Limits](/docs/time-portal/sandbox/lifecycle-limits-and-pricing): A sandbox boots, runs while it is live, and ends at a timeout, a terminate, or a failure. - [Sandbox](/docs/time-portal/sandbox): A sandbox is a Linux virtual machine whose clock and network are set to an instant. --- # Clients Open-source CLI, MCP server, and Rust and Python SDKs for the Epochal API. Epochal maintains open-source clients at [github.com/epochal-org/epochal](https://github.com/epochal-org/epochal): a CLI, an MCP server, and SDKs for Rust and Python. All clients read your API key from `EPOCHAL_API_KEY`. | Client | Package | Purpose | | --- | --- | --- | | [CLI](/docs/clients/cli) | `epochal-cli` ([crates.io](https://crates.io/crates/epochal-cli)) | Run Claude Code, Codex, or Grok Build inside a time-gated sandbox, or call Search and Fetch from the shell | | [MCP Server](/docs/clients/mcp-server) | `epochal-mcp` ([crates.io](https://crates.io/crates/epochal-mcp)) | Expose time-gated `web_search` and `web_fetch` MCP tools to any agent | | [SDKs](/docs/clients/sdks) | `epochal-api` ([crates.io](https://crates.io/crates/epochal-api), [PyPI](https://pypi.org/project/epochal-api/)), `epochal-sandbox` ([crates.io](https://crates.io/crates/epochal-sandbox), [PyPI](https://pypi.org/project/epochal-sandbox/)) | Typed API clients plus sandbox command execution, output streaming, and file transfer | ## Setup Export `EPOCHAL_API_KEY` before using any client. Set `EPOCHAL_BASE_URL` if you need to override the default API base URL (`https://api.epochal.com`). [Get API Key](https://console.epochal.com/keys) ```bash Shell export EPOCHAL_API_KEY="ek_…" ``` A date-only cutoff such as `2024-10-06` resolves to `2024-10-06T23:59:59Z`. See [How the Instant Works](/docs/time-portal/how-the-instant-works). ## Next steps - [CLI](/docs/clients/cli): Run an agent inside the Time Portal with one command. - [MCP Server](/docs/clients/mcp-server): Expose time-gated web search and fetch tools to MCP-compatible agents. - [SDKs](/docs/clients/sdks): The epochal-api and epochal-sandbox packages for Rust and Python. --- # CLI Run an agent inside the Time Portal with one command. The `epochal` CLI runs an agent on one prompt inside a Time Portal sandbox gated to a past timestamp, with Time Portal web search and fetch tools. By default it uses a built-in harness so nothing in the agent's prompt, tools, or sandbox postdates the instant; it can also run Claude Code, Codex, or Grok Build inside the sandbox. ## Install ### Prebuilt binary Download the `epochal` archive for your platform from the [latest release](https://github.com/epochal-org/epochal/releases/latest), unpack it, and put `epochal` on your `PATH`. | Platform | Archive name ends in | | --- | --- | | macOS, Apple silicon | `aarch64-apple-darwin.tar.gz` | | macOS, Intel | `x86_64-apple-darwin.tar.gz` | | Linux, x86-64 | `x86_64-unknown-linux-gnu.tar.gz` | | Linux, ARM64 | `aarch64-unknown-linux-gnu.tar.gz` | | Windows, x86-64 | `x86_64-pc-windows-msvc.zip` | Each release lists its archives' checksums in `SHA256SUMS`, and `gh attestation verify --repo epochal-org/epochal` checks that an archive was built from that repository. ### From crates.io The CLI is published to crates.io as [`epochal-cli`](https://crates.io/crates/epochal-cli). Installing it requires Rust 1.88 or later: ```bash Shell cargo install epochal-cli ``` This builds the `epochal` binary into Cargo's bin directory, `~/.cargo/bin` by default, which must be on your `PATH`. ### Build from source ```bash Shell git clone https://github.com/epochal-org/epochal.git cd epochal cargo install --path cli ``` ## Set your keys The CLI needs your Epochal API key, and a model endpoint and key for the agent, whichever harness runs it. The model key stays on your machine; see [How a run works](#how-a-run-works). [Get API Key](https://console.epochal.com/keys) ```bash Shell export EPOCHAL_API_KEY="ek_…" export EPOCHAL_LLM_BASE_URL="https://api.anthropic.com" export EPOCHAL_LLM_API_KEY="sk-ant-…" ``` Both variables are required. `EPOCHAL_LLM_BASE_URL` takes an Anthropic Messages endpoint or any OpenAI-compatible Chat Completions endpoint, such as `https://api.openai.com/v1` or a gateway. Models whose id starts with `claude` or `anthropic`, such as `anthropic/claude-sonnet-5-5`, use the Anthropic API and others use the OpenAI API; set `EPOCHAL_LLM_API` to `anthropic` or `openai` to choose. ## Run an agent at the instant `epochal time-portal run` takes a model, an instant, and a prompt. This example asks a question as of October 6, 2024, a few days before the Nobel Prizes were announced: ```bash Shell epochal time-portal run --model claude-sonnet-5-5 --as-of 2024-10-06 \ "Will AI research win a Nobel Prize this year?" ``` Progress is written to `stderr`, and the agent's final response is written to `stdout`. Add `--format json` to get the answer together with every web call, or `-o FILE` to write the result to a file. Run `epochal time-portal run --help` for the sandbox's options, such as `--internet`, `--cpu`, `--memory`, `--upload`, and `--download`. The sandbox defaults to 1 vCPU and 2 GiB, which gets the whole free hour; a larger `--cpu` or `--memory` uses it up faster. See [Pricing](/docs/get-started/pricing#how-sandboxes-use-the-free-hour). ### Claude Code, Codex, and Grok Build `--harness claude`, `--harness codex`, or `--harness grok` runs that agent inside the sandbox instead. Each is a current build, so its version and built-in prompts postdate the instant and can reveal the present to the agent: such a run is not strictly held to the instant. The CLI says so and asks before it starts; `--yes` skips the question. Each harness uses the same `EPOCHAL_LLM_BASE_URL` and `EPOCHAL_LLM_API_KEY`, and speaks its own API to it, so the endpoint must speak that API too. Claude Code needs an Anthropic Messages endpoint and gets the key as `x-api-key`. Codex and Grok Build need an OpenAI Responses endpoint, such as `https://api.openai.com/v1`, and get the key as `Authorization: Bearer`. `EPOCHAL_LLM_API` applies only to the built-in harness. ```bash Shell 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?" ``` ## How a run works `epochal time-portal run` creates a Time Portal sandbox. The built-in harness runs on your computer: it sends the conversation to your model endpoint, and runs each tool call the model makes: - **Shell and file tools** run in the sandbox, whose clock starts at the instant. - **Web search and fetch** go to the Time Portal API with your Epochal API key, at the sandbox's instant. The prompt is dated at the instant and says nothing about your computer. Your model key never reaches Epochal or the sandbox. With `--harness`, the agent runs inside the sandbox instead. Nothing it sends leaves the sandbox for the internet: its model calls and its web search and fetch calls are tunneled back to the `epochal` process on your computer, which adds your model key and forwards them, and responses come back with timestamps rewritten to the instant. The sandbox gets a placeholder key in place of yours. The model provider bills your model key as usual; Epochal bills the sandbox and the web calls. ## Search and fetch from the shell The CLI also calls [Search](/docs/time-portal/search) and [Fetch](/docs/time-portal/fetch) directly: ```bash Shell epochal time-portal search "Nobel Prize 2024 predictions" --as-of 2024-10-06 epochal time-portal fetch https://www.nobelprize.org/ --as-of 2024-10-06 ``` ## Next steps - [How the Instant Works](/docs/time-portal/how-the-instant-works): Every Time Portal request evaluates against a point-in-time cutoff specified in Accept-Datetime. - [Sandbox](/docs/time-portal/sandbox): A sandbox is a Linux virtual machine whose clock and network are set to an instant. --- # MCP Server Expose time-gated web search and fetch tools to MCP-compatible agents. `epochal-mcp` is an MCP server that exposes time-gated `web_search` and `web_fetch` tools bound to a fixed `Accept-Datetime` cutoff. ## Install Download the `epochal-mcp` archive for your platform from the [latest release](https://github.com/epochal-org/epochal/releases/latest), unpack it, and put `epochal-mcp` on your `PATH`. The archives cover the same platforms as the [CLI's](/docs/clients/cli#prebuilt-binary). `epochal-mcp` is also published to [crates.io](https://crates.io/crates/epochal-mcp). Installing it from there requires Rust 1.88 or later: ```bash Shell cargo install epochal-mcp ``` Or build from a clone of [github.com/epochal-org/epochal](https://github.com/epochal-org/epochal) with `cargo install --path mcp`. ## Run [Get API Key](https://console.epochal.com/keys) ```bash Shell export EPOCHAL_API_KEY="ek_…" epochal-mcp --time-portal 2024-10-06 # stdio transport epochal-mcp --time-portal 2024-10-06 --serve http:8788 # streamable HTTP at http://127.0.0.1:8788/mcp ``` `--time-portal` accepts RFC 3339 timestamps, HTTP-dates, or `YYYY-MM-DD` (resolved to `23:59:59Z` that day). Register with Claude Code: ```bash Shell claude mcp add epochal -e EPOCHAL_API_KEY="$EPOCHAL_API_KEY" -- epochal-mcp --time-portal 2024-10-06 ``` ## Tools | Tool | Arguments | Returns | | --- | --- | --- | | `web_search` | `query`; `num_results` (`1`–`10`, default `10`); `domains` | Result titles, URLs, and snippets | | `web_fetch` | `url`; `max_characters` (default `20,000`) | Page title, URL, and extracted markdown content | Each tool call executes one [Search](/docs/time-portal/search) or [Fetch](/docs/time-portal/fetch) API request. ## Next steps - [CLI](/docs/clients/cli): Run an agent inside the Time Portal with one command. - [For Agents](/docs/resources/for-agents): Machine-readable markdown docs, Agent Skill installation, MCP setup, and guidelines for integrating Time Portal into AI agents. - [How the Instant Works](/docs/time-portal/how-the-instant-works): Every Time Portal request evaluates against a point-in-time cutoff specified in Accept-Datetime. --- # SDKs The epochal-api and epochal-sandbox packages for Rust and Python. The Epochal SDK is available for Rust and Python. `epochal-api` is the API client, and `epochal-sandbox` builds on top of it to run commands and transfer files in sandboxes. Both read `EPOCHAL_API_KEY`. Rust requires 1.88 or later; Python requires 3.11.4 or later and provides both synchronous and asynchronous clients. ## Install ```bash Shell # Rust cargo add epochal-api epochal-sandbox cargo add tokio --features macros,rt-multi-thread # Python pip install epochal-api epochal-sandbox export EPOCHAL_API_KEY="ek_…" ``` | Package | Rust | Python | | --- | --- | --- | | `epochal-api` | [crates.io](https://crates.io/crates/epochal-api), [docs.rs](https://docs.rs/epochal-api) | [PyPI](https://pypi.org/project/epochal-api/) | | `epochal-sandbox` | [crates.io](https://crates.io/crates/epochal-sandbox), [docs.rs](https://docs.rs/epochal-sandbox) | [PyPI](https://pypi.org/project/epochal-sandbox/) | The source for both languages is at [github.com/epochal-org/epochal](https://github.com/epochal-org/epochal). ## Search and fetch ```rs Rust use epochal_api::chrono::{TimeZone, Utc}; use epochal_api::time_portal::web::{FetchRequest, PageStatus, SearchRequest}; use epochal_api::Client; #[tokio::main] async fn main() -> Result<(), epochal_api::Error> { let as_of = Utc.with_ymd_and_hms(2024, 10, 6, 23, 59, 59).unwrap(); let portal = Client::builder().build()?.time_portal(as_of); let found = portal.search(&SearchRequest::new("Nobel Prize 2024 predictions")).await?; for hit in &found.results { println!("{} {}", hit.title, hit.url); } let mut read = FetchRequest::new("https://www.nobelprize.org/"); read.max_characters = Some(2_000); let page = portal.fetch(&read).await?; match page.status { PageStatus::Success => println!("{}", page.content), _ => println!("not read: {:?}", page.page_error), } Ok(()) } ``` ```py Python from epochal.api import Client from epochal.api.time_portal import PageStatus with Client() as client: portal = client.time_portal("2024-10-06") found = portal.search("Nobel Prize 2024 predictions") for hit in found.results: print(hit.title, hit.url) page = portal.fetch("https://www.nobelprize.org/", max_characters=2000) print(page.content if page.status is PageStatus.SUCCESS else page.page_error) ``` `time_portal(as_of)` pins all calls on the returned handle to one `Accept-Datetime` instant. In Python, pass a timezone-aware `datetime`, an ISO 8601 string, or a `YYYY-MM-DD` date (interpreted as `23:59:59` UTC that day). `AsyncClient` exposes the same methods as coroutines. ## Sandboxes ```rs Rust use epochal_sandbox::chrono::{TimeZone, Utc}; use epochal_sandbox::{Network, Sandbox, Stream}; #[tokio::main] async fn main() -> Result<(), epochal_sandbox::Error> { let as_of = Utc.with_ymd_and_hms(2024, 10, 6, 23, 59, 59).unwrap(); let sandbox = Sandbox::time_portal(as_of) .with_network(Network::TimePortal) .build() .await?; let out = sandbox.command(["date", "-u"]).output().await?; println!("{}", String::from_utf8_lossy(&out.stdout)); sandbox.files().upload_dir("./src", "/home/epochal/src").await?; let run = sandbox .command(["python3", "-u", "analyze.py"]) .with_cwd("/home/epochal/src") .start() .await?; while let Some(chunk) = run.next().await? { if chunk.stream == Stream::Stdout { print!("{}", String::from_utf8_lossy(&chunk.data)); } } sandbox.files().download_dir("/home/epochal/out", "./out").await?; sandbox.terminate().await?; Ok(()) } ``` ```py Python from epochal.sandbox import Network, Sandbox with Sandbox.time_portal("2024-10-06").with_network(Network.TIME_PORTAL).build() as sandbox: print(sandbox.command(["date", "-u"]).output().text) sandbox.files.upload_dir("./src", "/home/epochal/src") run = sandbox.command(["python3", "-u", "analyze.py"]).with_cwd("/home/epochal/src") for chunk in run.start(): print(chunk.data.decode(errors="replace"), end="") sandbox.files.download_dir("/home/epochal/out", "./out") ``` `build()` waits until the sandbox is `live`, and exiting the `with` block terminates it automatically. Sandbox creation and command start requests include an `Idempotency-Key` so retries do not create duplicate sandboxes or rerun commands. ## Next steps - [Search](/docs/time-portal/search): Time Portal search gives ranked results from the time-gated web. - [Fetch](/docs/time-portal/fetch): Time Portal fetch gives an archived copy of a page from the time-gated web. - [Sandbox](/docs/time-portal/sandbox): A sandbox is a Linux virtual machine whose clock and network are set to an instant. --- # For Agents Machine-readable markdown docs, Agent Skill installation, MCP setup, and guidelines for integrating Time Portal into AI agents. The Epochal API is designed for agent use. Every endpoint is plain HTTPS authenticated with the `x-api-key` header, and most exchange JSON, so agents can call the API directly over HTTP or through the MCP server and SDKs. Four details are easy for an agent to get wrong: - **`Accept-Datetime` goes on Search, Fetch, and sandbox creation only.** It sets the point-in-time cutoff. A sandbox keeps the cutoff it was created with, and no other sandbox endpoint takes the header. - **Sandbox file contents are raw bytes, not JSON.** `PUT /v1/time-portal/sandbox/{id}/files` takes the file's bytes as the request body (`application/octet-stream`), and `GET` on the same path returns bytes. JSON-encoding an upload changes the bytes written. - **Fetch with `format: "page"` returns the document itself.** The body is the archived page with its own `Content-Type`, and the page's outcome is in the `x-fetch-status-code` and `x-fetch-status-message` response headers. The default `format: "structured"` returns JSON. - **Some responses have no body.** Terminating a sandbox and removing a file return `204`, and a file read that starts past the end of the file returns `416` with only a `Content-Range` header. Check the status code before decoding a body. ## Machine-readable documentation | Resource | Contents | When to use | | --- | --- | --- | | `https://docs.epochal.com/llms.txt` | Index of every page with a one-line summary | Discover which pages apply to a task | | `.md` (e.g. `https://docs.epochal.com/docs/time-portal/search.md`) | Plain markdown twin of any guide or reference page | Load a single guide or endpoint schema | | `https://docs.epochal.com/llms-full.txt` | Complete documentation corpus in one file | Load all docs at once when context allows | | `https://docs.epochal.com/SKILL.md` | Installable `epochal-api` Agent Skill | One-time installation for coding agents | ## Install the Agent Skill This documentation site generates and serves an [Agent Skill](https://docs.epochal.com/SKILL.md) at `https://docs.epochal.com/SKILL.md` containing the base URL, required headers, endpoints, and markdown doc links. To install it in Claude Code, download it into Claude Code's personal skills directory (`~/.claude/skills/`): ```bash Shell mkdir -p ~/.claude/skills/epochal-api curl -o ~/.claude/skills/epochal-api/SKILL.md https://docs.epochal.com/SKILL.md ``` Other coding agents that follow the Agent Skills format can load the same `SKILL.md` from their own skills directory. ## Use the MCP server If your agent supports MCP, use the [MCP Server](/docs/clients/mcp-server) to expose time-gated `web_search` and `web_fetch` tools directly without writing custom tool wrappers. ## Wiring Time Portal into an agent harness For backtests and evaluations, bind Search, Fetch, and Sandbox to the same `Accept-Datetime` cutoff: 1. **Fix `Accept-Datetime` in the harness, not the prompt.** Inject the same `Accept-Datetime` header inside your tool implementation so the model cannot advance or omit the cutoff. 2. **Route all page reads through Time Portal Fetch.** Never open search result URLs with a live HTTP client or browser — doing so exposes current web content. 3. **Run agent code in a Time Portal sandbox.** Create sandboxes at the same `Accept-Datetime` with `network: "time-portal"` so outbound HTTP calls and package installs stay time-gated. 4. **Record responses for deterministic replay.** Cache tool responses locally so subsequent evaluation passes replay cleanly without issuing extra API requests. See [How the Instant Works](/docs/time-portal/how-the-instant-works). ### Parameter defaults and bounds | Field | Default | Allowed range | | --- | --- | --- | | `Accept-Datetime` | Required (no default) | Past timestamp, `>= 1970-01-01T00:00:00Z` (Search/Fetch) or `>= 2023-04-01T00:00:00Z` (Sandbox) | | `num_results` | `10` | `1` to `10` | | `max_characters` | `100000` | `1` to `1,000,000` | | Sandbox `network` | `none` | `none` or `time-portal` | | Sandbox `timeout` | `1h` | `1m` to `24h` | | Sandbox `idle_timeout` | `10m` (or `timeout` if shorter) | `1m` to `timeout` | ## Error handling Always branch on `error.type` rather than `error.message` when handling error responses. Retry `rate_limit_exceeded`, `service_unavailable`, `timeout`, and `internal_error` with backoff (honoring `Retry-After` when present); do not retry `4xx` client or policy errors unchanged. See [Errors](/docs/resources/errors) for the full error table. ## API key hygiene for agents Never paste API keys into prompts. Export `EPOCHAL_API_KEY` in the tool host environment and issue a dedicated, expiring key per agent workflow so exposure is easy to revoke. See [Authentication](/docs/get-started/authentication). ## Next steps - [Quickstart](/docs/time-portal/quickstart): Get started with the search, fetch, and sandbox Time Portal APIs. - [MCP Server](/docs/clients/mcp-server): Expose time-gated web search and fetch tools to MCP-compatible agents. - [How the Instant Works](/docs/time-portal/how-the-instant-works): Every Time Portal request evaluates against a point-in-time cutoff specified in Accept-Datetime. - [Errors](/docs/resources/errors): Standard JSON error envelope, HTTP status codes, sandbox failure types, and retry rules. --- # FAQ Frequently asked questions about Time Portal, API keys, the free trial, rate limits, and errors. ### What is Time Portal? Time Portal is a point-in-time web and runtime environment for AI agents, composed of three APIs: Search, Fetch, and Sandbox. Every call evaluates against a historical timestamp passed in `Accept-Datetime`. ### Can I try it without a credit card? Yes. Every organization starts with 100 free Search and Fetch requests and one hour of a default sandbox (1 vCPU, 2 GiB), with no credit card required. For additional usage, [contact us](https://epochal.com/contact). ### Can my team share an organization? Yes. Invite teammates in the console. Owners and admins can also create organization-owned keys that stay active even if individual members leave. ### What does it cost? Time Portal is free to try. Every organization receives 100 Search and Fetch requests and one hour of a 1 vCPU, 2 GiB sandbox (larger sandboxes draw from that shared 1 vCPU-hour / 2 GiB-hour allowance proportionally faster). For more requests, sandbox time, or an enterprise plan, [contact us](https://epochal.com/contact). See [Pricing](/docs/get-started/pricing). ### Do errors count against the free requests? No. Only successful (`2xx`) responses count against your free request quota. ### What happens when the free requests run out? Requests return `402` with `free_quota_exhausted`. [Contact us](https://epochal.com/contact) to increase your quota. ### What is the rate limit? Rate limits apply per organization across all API keys, alongside per-IP edge ceilings. Exceeding a limit returns `429` with a `Retry-After` header. See [Rate Limits](/docs/get-started/rate-limits) for the full table, or [contact us](https://epochal.com/contact) for higher limits. ### Why do sandbox requests return 409? `409` (`conflict`) means the request does not match the sandbox's current state — for example, the sandbox is still `creating` (poll with `wait=55s` until `live`), or it has already ended (ended sandboxes cannot be restarted and their files and output are deleted). See [Errors](/docs/resources/errors). ## Next steps - [Quickstart](/docs/time-portal/quickstart): Get started with the search, fetch, and sandbox Time Portal APIs. - [Pricing](/docs/get-started/pricing): Every organization gets 100 search and fetch requests and one hour of sandbox time; for more, contact us. - [Getting Help](/docs/resources/getting-help): Support channels, status page, and what to include when reporting an API issue. --- # Getting Help Support channels, status page, and what to include when reporting an API issue. Use the channels below to troubleshoot errors, check service status, request higher limits, or report bugs. ## Support channels | Need | Resource | | --- | --- | | Diagnose an API error | [Errors](/docs/resources/errors) | | Check service availability | [status.epochal.com](https://status.epochal.com) | | Free trial quotas and sandbox allowances | [Pricing](/docs/get-started/pricing) | | Higher quota, higher rate limits, or enterprise plans | [Contact us](https://epochal.com/contact) | | Report a bug or unexpected result | [support@epochal.com](mailto:support@epochal.com) (see [What to include](#what-to-include)) | | Report a security vulnerability | [security@epochal.com](mailto:security@epochal.com) | | General inquiries or partnerships | [Contact us](https://epochal.com/contact) | ## What to include When contacting [support@epochal.com](mailto:support@epochal.com), include: - The `request_id` from the response (every search, fetch, and error response includes one). For sandbox issues, include the sandbox ID as well. - The endpoint, `Accept-Datetime` header, and sanitized request body (with your API key removed). - Expected vs. actual behavior. - For Fetch issues: the requested URL and `Accept-Datetime`. - For Sandbox issues: the sandbox ID and relevant command IDs. Never send your API key. Epochal locates requests using `request_id` or the sandbox ID. ## For agents Every docs page is available as plain markdown (see [For Agents](/docs/resources/for-agents)). An agent can inspect `error.type` and `request_id` directly and look up recovery steps in [Errors](/docs/resources/errors). ## Next steps - [Errors](/docs/resources/errors): Standard JSON error envelope, HTTP status codes, sandbox failure types, and retry rules. --- # Versioning and Deprecation Backward-compatible changes ship without a new path version; breaking changes ship under a new version such as /v2/. Backward-compatible changes ship continuously under `/v1/`. Breaking changes ship under a new path version (such as `/v2/`), and existing versions remain supported through their deprecation window. ## Backward-compatible changes The following changes may ship at any time without notice: - Adding a new endpoint, optional request field, or response field. - Adding a new `error.type` value or a new value to an open enum. - Adding a new entity `type` or a new nullable entity property. See [World Entities](/docs/time-portal/entities#how-entities-can-change). - Updating search ranking results or relevance order. - Adjusting human-readable `error.message` text (always branch on `error.type`). ## Breaking changes The following changes ship only under a new path version: - Removing or renaming an endpoint, field, or header. - Changing a field's type or making an optional field required. - Making a non-null entity field nullable or removing an enum value. - Changing the semantics of `Accept-Datetime` or `as_of`. - Removing an existing `error.type`. ## Deprecation policy When an endpoint, field, or version is deprecated: 1. We announce it in the [Changelog](/changelog) with a sunset date at least 60 days in advance. 2. We email every organization that called the deprecated surface in the previous 30 days. 3. Responses from deprecated endpoints include a `Deprecation` header with the sunset date. 4. After the sunset date, the endpoint returns `404` (`not_found`). ## Related - [Changelog](/changelog): Product updates and announcements from Epochal. - [World Entities](/docs/time-portal/entities): Search and fetch return companies, people, places, crypto assets, and a city's weather as world entities that share one envelope. - [Errors](/docs/resources/errors): Standard JSON error envelope, HTTP status codes, sandbox failure types, and retry rules. --- # Errors Standard JSON error envelope, HTTP status codes, sandbox failure types, and retry rules. Error responses return the same JSON envelope. Branch on `error.type` in code; `error.message` is intended for humans and may change. The one exception is `416` on a sandbox file read, which has no body (see [Status codes](#status-codes)). ```json JSON { "error": { "type": "invalid_api_key", "message": "No key matches that token. Check the x-api-key header.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` Include `request_id` when contacting support. For sandbox failures, include the sandbox ID as well. Failed requests (non-`2xx`) do not count against your free quota. ## Status codes | Status | `error.type` | Action | | --- | --- | --- | | `400` | `invalid_request` | Fix the request parameters or headers and retry | | `401` | `invalid_api_key` | Fix or rotate the `x-api-key` header | | `402` | `free_quota_exhausted`, `trial_only`, `insufficient_credits` | Add credits in the console (`insufficient_credits`) or [contact us](https://epochal.com/contact) (`free_quota_exhausted`, `trial_only`) before retrying | | `403` | `url_not_allowed`, `organization_suspended`, `spend_limit_reached` | Blocked URL (Fetch only), a request from outside the United States, suspended org, or spend limit reached | | `404` | `not_found` | Check the endpoint path or resource ID | | `409` | `conflict` | Request conflicts with resource state (Sandbox only; see below) | | `416` | None (empty body) | Sandbox file read only: the range starts past the end of the file. Do not decode the body as JSON; read the file's size from `Content-Range: bytes */` | | `422` | `query_refused` | Modify the query before retrying (Search only) | | `429` | `rate_limit_exceeded` | Wait for `Retry-After` before retrying with backoff | | `500` | `internal_error` | Retry with exponential backoff | | `503` | `service_unavailable` | Retry with backoff, honoring `Retry-After` if present | | `504` | `timeout` | Retry with exponential backoff | ## 400 Invalid request ```json JSON { "error": { "type": "invalid_request", "message": "The request body is invalid.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` - **Cause:** A required field or header is missing, malformed, out of range, or unknown (unknown JSON fields are rejected with `400`). On Time Portal endpoints, this also covers an invalid, future, or pre-1970 `Accept-Datetime`, or a `published_after` value that is not earlier than `Accept-Datetime`. - **Common mistakes:** - Passing `as_of` in the JSON body instead of the `Accept-Datetime` header. - Setting `published_after` to a non-RFC-3339 format or on/after the resolved `Accept-Datetime` (a bare date such as `2026-03-01` resolves to `2026-03-01T23:59:59Z`). - Sending unsupported search fields (`location`, `safe_search`, `published_before`). Valid Search request example: ```bash cURL 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": 5}' ``` Frequently hit field limits (see the API Reference for every constraint): | Field | Limit | | --- | --- | | `query` | 1 to 1,000 characters | | `domains` + `exclude_domains` | Up to 200 total entries, each up to 2,048 characters | | `languages` | Up to 8 BCP 47 tags, each 2 to 35 characters | | `max_characters` | 1 to 1,000,000 | ## 401 Invalid API key ```json JSON { "error": { "type": "invalid_api_key", "message": "No key matches that token. Check the x-api-key header.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` - **Cause:** The `x-api-key` header is missing, or the key is unknown, revoked, or expired. - **Fix:** Verify the header name (`x-api-key`) and full key value (including the `ek_` prefix). If expired or revoked, create a new key in the console. See [Authentication](/docs/get-started/authentication). ## 402 Quota or billing required ```json JSON { "error": { "type": "free_quota_exhausted", "message": "Your organization has used all its free requests for this API, so retrying will not help. To keep using it, contact sales at https://epochal.com/contact.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` Do not retry any of these unchanged. The fix depends on `error.type`: | `error.type` | Cause | Fix | | --- | --- | --- | | `free_quota_exhausted` | The organization has used all its free requests or sandbox hours for this API. | [Contact us](https://epochal.com/contact) for more quota. | | `trial_only` | This API is in trial for the organization, and no trial requests remain. | [Contact us](https://epochal.com/contact). Adding credits does not unlock a trial-only API. | | `insufficient_credits` | The organization's prepaid balance is depleted. | Add credits in the console. | ## 403 Forbidden ```json JSON { "error": { "type": "url_not_allowed", "message": "This URL can't be fetched.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` - **Cause:** `url_not_allowed` (Fetch blocks certain restricted URLs before retrieval), `spend_limit_reached` (your organization or key reached its configured spend limit), or `organization_suspended` (billing or account is suspended). None of these are billed. - **Fix:** Do not retry unchanged. For `url_not_allowed`, use another source; for `spend_limit_reached`, raise the spend limit in the console; for `organization_suspended`, [contact us](https://epochal.com/contact). ### Outside the United States Epochal is available only in the United States for now. A request to any endpoint from anywhere else is refused before it reaches the API, with a `403` and `url_not_allowed`, and the message says so: ```json JSON { "error": { "type": "url_not_allowed", "message": "Epochal is only available in the United States for now. Requests from outside the United States are refused. We are expanding as soon as we can." } } ``` This response has no `request_id`; quote its `cf-ray` response header instead. It is not billed. Do not retry it from the same location. ## 404 Not found ```json JSON { "error": { "type": "not_found", "message": "Nothing is served at that path.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` - **Cause:** Unknown endpoint path, or a resource ID that does not exist in your organization. - **Fix:** Verify the URL path and resource ID against the API Reference. ## 409 Conflict Returned only by Sandbox endpoints when a request conflicts with the resource's current state: | Condition | Response detail | Action | | --- | --- | --- | | Sandbox is still `creating` | `The sandbox is still starting.` | Poll `GET /v1/time-portal/sandbox/{id}?wait=55s` until its state is `live` before retrying. | | Sandbox has `ended` | `The sandbox has ended.` | Ended sandboxes cannot be restarted and their files and output are deleted. Create a new sandbox instead. | | Command already exited | Returned on `POST .../execs/{exec_id}/input` | Read the command's output and `exit` status instead of sending more input. | | Input `seq` out of order | Response body includes `next_seq` | Resend with `seq` set to `next_seq`. | | `Idempotency-Key` reused with a different body | Returned on sandbox or command creation | Generate a new `Idempotency-Key` for distinct requests. | ## 422 Query refused ```json JSON { "error": { "type": "query_refused", "message": "This query falls under our usage policy and was refused. The request was not billed.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` - **Cause:** Search query refused under Epochal's usage policy. Does not count against your quota. - **Fix:** Do not retry the same query. ## 429 Rate limit exceeded ```json JSON { "error": { "type": "rate_limit_exceeded", "message": "Over the organization's rate limit. Retry after a pause.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` - **Cause:** Organization rate limit, sandbox concurrency limit, or per-IP edge ceiling exceeded. - **Fix:** Wait at least `Retry-After` seconds and add random jitter before retrying. See [Rate Limits](/docs/get-started/rate-limits). ## 500, 503, and 504 Server errors ```json JSON { "error": { "type": "internal_error", "message": "Something failed on our side. The request was not billed.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` `503` returns `service_unavailable` and `504` returns `timeout` in the same envelope. None of these count against your free quota. - **Fix:** Retry with exponential backoff (honoring `Retry-After` on `503`). If errors persist, check [status.epochal.com](https://status.epochal.com) and contact support with the `request_id`. ## Sandbox runtime errors When a sandbox fails to boot (`state: "failed"`) or terminates unexpectedly (`state: "ended"`), the sandbox object returned by `GET` and `LIST` (`200`) includes an `error` object: | `error.type` | Cause | Action | | --- | --- | --- | | `lifetime_expired` | Sandbox reached its `timeout`. | Create a new sandbox with a longer `timeout`. | | `idle_expired` | No running commands or write activity for `idle_timeout`. | Increase `idle_timeout` or keep the sandbox active between commands. | | `out_of_memory` | Sandbox exceeded its `memory_gib` allocation. | Reduce memory usage or create a sandbox with more memory. | | `sandbox_lost` | Underlying host failed. | Create a new sandbox. Download artifacts incrementally during long jobs. | | `free_quota_exhausted` | Free sandbox allowance exhausted. | Do not retry; [contact us](https://epochal.com/contact) for more quota. | A sandbox in `failed` state never booted and does not consume your free sandbox allowance. See [Lifecycle and Limits](/docs/time-portal/sandbox/lifecycle-limits-and-pricing). ## Retry guidelines - Retry only `429`, `500`, `503`, and `504`. - Use exponential backoff with random jitter and a retry cap. - Send `Idempotency-Key` on sandbox creation and command creation so retried requests do not spawn duplicates. - Search and Fetch are read-only and idempotent: failed attempts are not billed. ## Report a problem See [Getting Help](/docs/resources/getting-help) for support contacts and what details to include. --- # Time Portal search `POST /v1/time-portal/search` — Time Portal Search API Search and rank the web as it existed in the past. ## Request samples ### cURL ```bash 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": 5, "published_after": "2026-01-01T00:00:00Z" }' ``` ### Python ```python import os import requests response = requests.post( "https://api.epochal.com/v1/time-portal/search", headers={"x-api-key": os.environ["EPOCHAL_API_KEY"], "Accept-Datetime": "2026-03-01T00:00:00Z"}, json={ "query": "european battery gigafactory delays", "num_results": 5, "published_after": "2026-01-01T00:00:00Z" }, ) response.raise_for_status() print(response.json()) ``` ### JavaScript ```js const response = await fetch("https://api.epochal.com/v1/time-portal/search", { method: "POST", headers: { "x-api-key": process.env.EPOCHAL_API_KEY, "Accept-Datetime": "2026-03-01T00:00:00Z", "Content-Type": "application/json" }, body: JSON.stringify({ "query": "european battery gigafactory delays", "num_results": 5, "published_after": "2026-01-01T00:00:00Z" }) }); console.log(await response.json()); ``` ## Authorizations - `x-api-key` (string, header, required) — Send your API key in the x-api-key header. Create keys in the console; each belongs to one organization. ## Headers - `Accept-Datetime` (string, header, required) — Point-in-time cutoff for the request: a past RFC 3339 timestamp, ISO 8601 date/time, or HTTP-date at or after `1970-01-01T00:00:00Z`. Nothing published or captured after this time is included. ## Body - `query` (string, body, required) — What to search the web for. (Minimum length: `1`; Maximum length: `1000`) - `num_results` (integer, body, optional) — Maximum number of results to return. Fewer results may be returned if fewer match. (Range: `1` to `10`; Default: `10`) - `domains` (string[], body, optional) — Only return pages from these sites, subdomains included. An entry is a host (`example.com`, `docs.example.com`), a host and path (`example.com/blog`), or a public suffix (`gov.uk`). A full URL works too. (`domains` and `exclude_domains` share a combined limit of 200 entries) - `exclude_domains` (string[], body, optional) — Never return pages from these sites, subdomains included. Entries take the same forms as `domains`. An entry can't also be in `domains`. - `languages` (string[], body, optional) — Preferred result languages as BCP 47 tags, most preferred first (such as `en` or `pt-BR`). Omit to return results in the query's language. - `published_after` (string (date-time) | null, body, optional) — Only return pages published on or after this time. Must be earlier than `Accept-Datetime`. - `categories` (string[], body, optional) — Only return pages in these categories. Leave it out to search everything. (finance is SEC filings; legal is court opinions, statutes, regulations and sanctions; publications is academic articles; companies is company profiles; people is people profiles; maps is places) - `include_text` (boolean, body, optional) — Also return each page's extracted full text in `results[].text`. (Default: `false`; Increases response payload size; leave `false` unless full page text is needed) ## Response fields - `as_of` (string (date-time)) — Resolved point-in-time cutoff from `Accept-Datetime`. - `request_id` (string) — Identifies this request in our logs; quote it when reporting a problem. - `results` (object[]) — Ranked results, best first. - `title` (string) — The page's title. - `url` (string) — The page's canonical URL. - `snippet` (string) — A short passage from the page that matches the query. - `text` (string | null) — The page's extracted text. Only present when `include_text` is true and text is available. - `published_at` (string (date-time) | null) — When the page was published. `null` when unknown. - `domain` (string | null) — The page's registrable domain, such as `example.com`. `null` when unknown. - `language` (string | null) — The page's language as a BCP 47 tag. `null` when not detected. - `entity` (object | null) — The entity when the result is from an Epochal World page, as fetch returns it for `url`. `null` for every other result. (Known values (open): `organization`, `person`, `crypto`, `weather`, `place`) - Variant `organization` — An entity whose `type` is `organization`. - `id` (string) — The entity's stable URL, `https://world.epochal.com//`. - `schema_version` (integer (int64)) — Schema version for this entity type's `properties` layout (`1` for all types). (Minimum: `0`) - `updated_at` (string (date-time)) — When the properties were last refreshed. - `type` (string) — The entity's type. It sets the shape of `properties`. (Constant: `organization`) - `properties` (object) — The properties of a company. - `name` (string) — The company's common name, such as `NVIDIA`. - `legal_name` (string | null) — The company's full legal name, such as `NVIDIA Corporation`. `null` when unknown. - `description` (string | null) — What the company does, in its own words, as plain text. `null` when unknown. - `tagline` (string | null) — The company's one-line headline, in its own words. `null` when unknown. - `domain` (string | null) — The website's host without scheme or path, such as `nvidia.com`. `null` when unknown. - `industry` (string | null) — The primary industry as the profile names it, such as `Computer Hardware Manufacturing`. `null` when unknown. - `specialties` (string[]) — The specialties the company lists, distinct, in profile order. - `founded_year` (integer (int64) | null) — The year it was founded. `null` when unknown. (Minimum: `0`) - `employee_count` (integer (int64) | null) — The number of employees on the profile. `null` when unknown. (Minimum: `0`) - `headquarters` (object | null) — Where the company is headquartered. `null` when no part is known. - `formatted` (string | null) — The whole address on one line. - `street` (string | null) — Street and number. - `city` (string | null) — City or town. - `region` (string | null) — State, province, or equivalent. - `postal_code` (string | null) — Postal code. - `country_code` (string | null) — ISO 3166-1 alpha-2 country code. - `revenue_range` (object | null) — The annual revenue band. `null` when unknown. - `min_usd` (number (double)) — The band's lower bound. `0` for the lowest band. - `max_usd` (number (double) | null) — The band's upper bound. `null` for the open top band. - `ticker` (string | null) — The stock ticker of the listing, such as `NVDA`. `null` when not listed or unknown. - `exchange` (string | null) — The listing's exchange code as the profile writes it, such as `NASDAQ`. `null` when unknown. - `latest_funding_round` (object | null) — The same round as `funding_rounds[0]`. `null` when `funding_rounds` is empty. - `round_type` (string | null) — The kind of round. `null` when unknown. (Known values (open): `pre_seed`, `seed`, `angel`, `series_a`, `series_b`, `series_c`, `series_d`, `series_e`, `series_f`, `series_g`, `series_h`, `series_i`, `series_j`, `series_unknown`, `grant`, `debt_financing`, `convertible_note`, `equity_crowdfunding`, `product_crowdfunding`, `private_equity`, `corporate_round`, `post_ipo_equity`, `post_ipo_debt`, `post_ipo_secondary`, `secondary_market`, `non_equity_assistance`, `initial_coin_offering`, `undisclosed`) - `announced_on` (string (date) | null) — The day the round was announced. `null` when unknown. - `amount` (number (double) | null) — The amount raised, in `currency`. `null` when undisclosed. - `currency` (string | null) — The currency of `amount`. `null` exactly when `amount` is `null`. (Known values (open): `USD`, `USDT`, `EUR`, `GBP`, `JPY`, `CNY`, `CHF`, `CAD`, `AUD`, `NZD`, `HKD`, `SGD`, `KRW`, `INR`, `BRL`, `MXN`, `ZAR`, `SEK`, `NOK`, `DKK`, `PLN`, `CZK`, `HUF`, `RON`, `TRY`, `ILS`, `IDR`, `MYR`, `PHP`, `THB`, `TWD`, `LKR`, `ISK`) - `investors` (object[]) — The investors named for the round, in source order. - `id` (string (uri) | null) — The entity's URL, such as `https://world.epochal.com/organization/`, or the URL of a page of one. `null` when the reference has no link, even if the entity has a page. - `name` (string) — The name at the instant. - `funding_rounds` (object[]) — Dated rounds announced on or before `updated_at`, newest first, without exact duplicates. - `round_type` (string | null) — The kind of round. `null` when unknown. (Known values (open): `pre_seed`, `seed`, `angel`, `series_a`, `series_b`, `series_c`, `series_d`, `series_e`, `series_f`, `series_g`, `series_h`, `series_i`, `series_j`, `series_unknown`, `grant`, `debt_financing`, `convertible_note`, `equity_crowdfunding`, `product_crowdfunding`, `private_equity`, `corporate_round`, `post_ipo_equity`, `post_ipo_debt`, `post_ipo_secondary`, `secondary_market`, `non_equity_assistance`, `initial_coin_offering`, `undisclosed`) - `announced_on` (string (date) | null) — The day the round was announced. `null` when unknown. - `amount` (number (double) | null) — The amount raised, in `currency`. `null` when undisclosed. - `currency` (string | null) — The currency of `amount`. `null` exactly when `amount` is `null`. (Known values (open): `USD`, `USDT`, `EUR`, `GBP`, `JPY`, `CNY`, `CHF`, `CAD`, `AUD`, `NZD`, `HKD`, `SGD`, `KRW`, `INR`, `BRL`, `MXN`, `ZAR`, `SEK`, `NOK`, `DKK`, `PLN`, `CZK`, `HUF`, `RON`, `TRY`, `ILS`, `IDR`, `MYR`, `PHP`, `THB`, `TWD`, `LKR`, `ISK`) - `investors` (object[]) — The investors named for the round, in source order. - `id` (string (uri) | null) — The entity's URL, such as `https://world.epochal.com/organization/`, or the URL of a page of one. `null` when the reference has no link, even if the entity has a page. - `name` (string) — The name at the instant. - Variant `person` — An entity whose `type` is `person`. - `id` (string) — The entity's stable URL, `https://world.epochal.com//`. - `schema_version` (integer (int64)) — Schema version for this entity type's `properties` layout (`1` for all types). (Minimum: `0`) - `updated_at` (string (date-time)) — When the properties were last refreshed. - `type` (string) — The entity's type. It sets the shape of `properties`. (Constant: `person`) - `properties` (object) — The properties of a person. - `name` (string) — The person's full name. - `headline` (string | null) — A one-line professional summary. `null` when unknown. - `summary` (string | null) — The person's own description of themselves. `null` when unknown. - `industry` (string | null) — The industry as the profile names it. `null` when unknown. - `location` (object | null) — Where the person is based. `null` when both parts are unknown. - `formatted` (string | null) — The place as one line, such as `Austin, Texas, United States`. `null` when unknown. - `country_code` (string | null) — ISO 3166-1 alpha-2 country code, uppercase. `null` when unknown. - `follower_count` (integer (int64) | null) — The number of followers of the professional profile. `null` when unknown. (Minimum: `0`) - `experience` (object[]) — Positions, current ones first, then the most recent end or start date first. - `title` (string | null) — The job title. `null` when unknown. - `organization` (object | null) — The employer. `null` when unnamed. - `id` (string (uri) | null) — The entity's URL, such as `https://world.epochal.com/organization/`, or the URL of a page of one. `null` when the reference has no link, even if the entity has a page. - `name` (string) — The name at the instant. - `start_date` (string | null) — When the position started. `null` when unknown. - `end_date` (string | null) — When the position ended. `null` when ongoing or unknown. - `is_current` (boolean | null) — Whether the person holds the position now. `null` when unknown. - `location` (string | null) — Where the position is based, as written. `null` when unknown. - `description` (string | null) — What the role involved, in the person's words. `null` when unknown. - `education` (object[]) — Periods of study, most recent first. - `school` (object | null) — The school. `null` when unnamed. - `id` (string (uri) | null) — The entity's URL, such as `https://world.epochal.com/organization/`, or the URL of a page of one. `null` when the reference has no link, even if the entity has a page. - `name` (string) — The name at the instant. - `degree` (string | null) — The degree earned, as written, such as `MSEE`. `null` when unknown. - `field_of_study` (string | null) — The field of study, as written. `null` when unknown. - `start_date` (string | null) — When the study started. `null` when unknown. - `end_date` (string | null) — When the study ended. `null` when unknown. - `skills` (string[]) — The skills the person lists, distinct, in profile order. - `languages` (object[]) — Languages the person speaks, distinct by name. - `name` (string) — The language, such as `Spanish`. - `proficiency` (string | null) — How well the person knows the language. `null` when unknown. (Known values (open): `elementary`, `limited_working`, `professional_working`, `full_professional`, `native_or_bilingual`) - `posts` (object[]) — Recent posts dated on or before `updated_at`, newest first. - `text` (string) — The post's text, or the text it reposts when it adds none. - `posted_on` (string (date)) — The day it was posted. - `like_count` (integer (int64) | null) — The number of likes. `null` when unknown. (Minimum: `0`) - `comment_count` (integer (int64) | null) — The number of comments. `null` when unknown. (Minimum: `0`) - Variant `crypto` — An entity whose `type` is `crypto`. - `id` (string) — The entity's stable URL, `https://world.epochal.com//`. - `schema_version` (integer (int64)) — Schema version for this entity type's `properties` layout (`1` for all types). (Minimum: `0`) - `updated_at` (string (date-time)) — When the properties were last refreshed. - `type` (string) — The entity's type. It sets the shape of `properties`. (Constant: `crypto`) - `properties` (object) — The properties of a crypto asset, which is one coin, not a trading pair. They hold its latest UTC day, the price at a minute, and the price on a date or the daily history that the URL asks for. Each day is rolled up from 1-minute bars of the best market Epochal holds for that day. - `name` (string) — The asset's name, such as `Bitcoin`. - `symbol` (string) — The asset's symbol at the instant, such as `BTC`. - `currency` (string) — The currency of `latest` and `range_52w`, such as `USDT`. Every other priced object names its own currency, and `chart` is in the currency of `quote`. (Known values (open): `USD`, `USDT`, `EUR`, `GBP`, `JPY`, `CNY`, `CHF`, `CAD`, `AUD`, `NZD`, `HKD`, `SGD`, `KRW`, `INR`, `BRL`, `MXN`, `ZAR`, `SEK`, `NOK`, `DKK`, `PLN`, `CZK`, `HUF`, `RON`, `TRY`, `ILS`, `IDR`, `MYR`, `PHP`, `THB`, `TWD`, `LKR`, `ISK`) - `stale_hours` (integer (int64) | null) — Hours since the last trade (`latest.through`), rounded up, when that trade is more than 24 hours before the instant. The price is then not current. `null` otherwise. (Minimum: `0`) - `latest` (object | null) — The UTC day that contains the instant, up to the instant. `null` when no price is visible. - `date` (string (date)) — The UTC day. - `open` (number (double)) — The price at the start of the day's first bar. - `high` (number (double)) — The highest price. - `low` (number (double)) — The lowest price. - `close` (number (double)) — The price at the end of the day's last bar, or the last price while `partial` is true. - `volume` (number (double)) — The coin traded, in coin units to two decimals. - `quote_volume` (number (double) | null) — The value traded in `currency`, to two decimals. `null` when the market does not publish it. - `trades` (integer (int64) | null) — The number of trades. `null` when the market does not publish it. (Minimum: `0`) - `currency` (string) — The currency of the day's prices. (Known values (open): `USD`, `USDT`, `EUR`, `GBP`, `JPY`, `CNY`, `CHF`, `CAD`, `AUD`, `NZD`, `HKD`, `SGD`, `KRW`, `INR`, `BRL`, `MXN`, `ZAR`, `SEK`, `NOK`, `DKK`, `PLN`, `CZK`, `HUF`, `RON`, `TRY`, `ILS`, `IDR`, `MYR`, `PHP`, `THB`, `TWD`, `LKR`, `ISK`) - `previous_close` (number (double) | null) — The previous UTC day's close. `null` without a previous day. - `change` (number (double) | null) — `close` minus `previous_close`. `null` without a previous day. - `change_pct` (number (double) | null) — `change` as a percentage of `previous_close`. `null` without a previous day. - `partial` (boolean) — Whether the day's last bar is not yet published at the instant. - `through` (string (date-time)) — The start of the last minute the day includes. - `range_52w` (object | null) — The low and high of the 365 UTC days to `latest.date`, in `currency`. `null` without `latest`. - `low` (number (double)) — The lowest low. - `high` (number (double)) — The highest high. - `quote` (object | null) — The price at the URL's `at`, or at the latest minute when the URL has no `at`. - `at` (string (date-time)) — The start of the minute. This is the URL's `at` rounded down to the minute, or `latest.through` when the URL has no `at`. - `price` (number (double)) — The price at the end of the minute. - `currency` (string) — The currency of `price`. (Known values (open): `USD`, `USDT`, `EUR`, `GBP`, `JPY`, `CNY`, `CHF`, `CAD`, `AUD`, `NZD`, `HKD`, `SGD`, `KRW`, `INR`, `BRL`, `MXN`, `ZAR`, `SEK`, `NOK`, `DKK`, `PLN`, `CZK`, `HUF`, `RON`, `TRY`, `ILS`, `IDR`, `MYR`, `PHP`, `THB`, `TWD`, `LKR`, `ISK`) - `chart` (object | null) — The price every hour over the 24 hours to `quote.at`, in the currency of `quote`. `null` when no minute in those hours is visible. - `prices` (object[]) — One price per step that has one, oldest first. - `time` (string (date-time)) — The time of the price. - `price` (number (double)) — The price. - `price_on_date` (object | null) — The UTC day of the URL's `date`, clipped to the instant. `null` without `date`. - `requested_date` (string (date)) — The URL's `date`, or the day containing the instant when `date` is later than it. - `date` (string (date)) — The UTC day returned, the same as `requested_date`. - `open` (number (double)) — The price at the start of the day's first bar. - `high` (number (double)) — The highest price. - `low` (number (double)) — The lowest price. - `close` (number (double)) — The price at the end of the day's last bar, or the last price while `partial` is true. - `volume` (number (double)) — The coin traded, in coin units to two decimals. - `quote_volume` (number (double) | null) — The value traded in `currency`, to two decimals. `null` when the market does not publish it. - `trades` (integer (int64) | null) — The number of trades. `null` when the market does not publish it. (Minimum: `0`) - `currency` (string) — The currency of the day's prices. (Known values (open): `USD`, `USDT`, `EUR`, `GBP`, `JPY`, `CNY`, `CHF`, `CAD`, `AUD`, `NZD`, `HKD`, `SGD`, `KRW`, `INR`, `BRL`, `MXN`, `ZAR`, `SEK`, `NOK`, `DKK`, `PLN`, `CZK`, `HUF`, `RON`, `TRY`, `ILS`, `IDR`, `MYR`, `PHP`, `THB`, `TWD`, `LKR`, `ISK`) - `previous_close` (number (double) | null) — The previous UTC day's close. `null` without a previous day. - `change` (number (double) | null) — `close` minus `previous_close`. `null` without a previous day. - `change_pct` (number (double) | null) — `change` as a percentage of `previous_close`. `null` without a previous day. - `partial` (boolean) — Whether the day's last bar is not yet published at the instant. - `through` (string (date-time)) — The start of the last minute the day includes. - `price_history` (object | null) — Daily bars for the URL's `from` and `to`. `null` without `from`. - `from` (string (date)) — The first date asked for, inclusive. - `to` (string (date)) — The last date asked for, inclusive, clipped to the instant. - `bars` (object[]) — One row per day, oldest first. - `date` (string (date)) — The UTC day. - `open` (number (double)) — The first price. - `high` (number (double)) — The highest price. - `low` (number (double)) — The lowest price. - `close` (number (double)) — The last price. - `volume` (number (double)) — The coin traded, in coin units to two decimals. - `currency` (string) — The currency of the row's prices. (Known values (open): `USD`, `USDT`, `EUR`, `GBP`, `JPY`, `CNY`, `CHF`, `CAD`, `AUD`, `NZD`, `HKD`, `SGD`, `KRW`, `INR`, `BRL`, `MXN`, `ZAR`, `SEK`, `NOK`, `DKK`, `PLN`, `CZK`, `HUF`, `RON`, `TRY`, `ILS`, `IDR`, `MYR`, `PHP`, `THB`, `TWD`, `LKR`, `ISK`) - Variant `weather` — An entity whose `type` is `weather`. - `id` (string) — The entity's stable URL, `https://world.epochal.com//`. - `schema_version` (integer (int64)) — Schema version for this entity type's `properties` layout (`1` for all types). (Minimum: `0`) - `updated_at` (string (date-time)) — When the properties were last refreshed. - `type` (string) — The entity's type. It sets the shape of `properties`. (Constant: `weather`) - `properties` (object) — A place's weather at the instant. It holds the latest report, today's and yesterday's observed figures, and the forecast, or the observed days of a date or range. Today is the local day of the instant. The place is a city, a smaller town, or a landmark. A block is `null` when the view doesn't ask for it or the place has no data for it. No block names the source of its values. - `name` (string) — The place's name. - `country_code` (string) — ISO 3166-1 alpha-2 country code. - `region` (string | null) — The first-level administrative area, such as a state. `null` when unknown. - `location` (object) — The place's coordinates, to two decimals. - `lat` (number (double)) — Latitude in degrees, north positive. - `lon` (number (double)) — Longitude in degrees, east positive. - `timezone` (string) — The IANA time zone. Every local date in these properties is in it. - `current` (object | null) — The latest report. Filled in the default view, and for a `?date=` of today or a later day that a run covers. - `observed_at` (string (date-time)) — Observation time, or the time a model estimate is valid for. - `temperature` (object) — Air temperature. - `c` (number (double)) — Degrees Celsius. - `f` (number (double)) — Degrees Fahrenheit. - `model_estimate` (boolean) — Whether the value is a model estimate, used when no station is near or none has filed in 3 hours. - `humidity_pct` (number (double) | null) — Relative humidity, in percent. `null` when the report lacks a temperature or dew point. - `wind` (object | null) — The wind. `null` when the report has no wind group. - `speed_kmh` (number (double)) — Sustained speed, km/h. - `speed_mph` (number (double)) — Sustained speed, mph. - `direction_deg` (integer (int64) | null) — The direction the wind blows from, in degrees clockwise from north. `null` for a calm or variable wind. (Range: `0` to `65535`) - `condition` (object | null) — The weather or sky condition. `null` when the report has neither. - `code` (integer (int64)) — The WMO weather code (code table 4677, 0–99). (Range: `0` to `255`) - `label` (string) — The code in words, such as `Partly cloudy`. - `today` (object | null) — Today so far. Filled in the default view only. - `date` (string (date)) — The local date. - `status` (string | null) — How final the observed figures are. `null` for a date after the instant. (Known values (open): `preliminary`, `final`, `not_reported`) - `model_estimate` (boolean) — Whether the figures are a model estimate for a place with no station near it. - `high` (object | null) — The highest temperature observed. - `c` (number (double)) — Degrees Celsius. - `f` (number (double)) — Degrees Fahrenheit. - `low` (object | null) — The lowest temperature observed. - `c` (number (double)) — Degrees Celsius. - `f` (number (double)) — Degrees Fahrenheit. - `precipitation` (object | null) — The day's precipitation. - `mm` (number (double)) — Millimeters. - `inch` (number (double)) — Inches. - `hourly` (object[] | null) — The day's observations. Filled only for a `?date=` of a day up to the instant. - `time` (string (date-time)) — Observation time. - `temperature` (object) — Air temperature. - `yesterday` (object | null) — The local day before `today`. Filled in the default view only. - `date` (string (date)) — The local date. - `status` (string | null) — How final the observed figures are. `null` for a date after the instant. (Known values (open): `preliminary`, `final`, `not_reported`) - `model_estimate` (boolean) — Whether the figures are a model estimate for a place with no station near it. - `high` (object | null) — The highest temperature observed. - `c` (number (double)) — Degrees Celsius. - `f` (number (double)) — Degrees Fahrenheit. - `low` (object | null) — The lowest temperature observed. - `c` (number (double)) — Degrees Celsius. - `f` (number (double)) — Degrees Fahrenheit. - `precipitation` (object | null) — The day's precipitation. - `mm` (number (double)) — Millimeters. - `inch` (number (double)) — Inches. - `hourly` (object[] | null) — The day's observations. Filled only for a `?date=` of a day up to the instant. - `time` (string (date-time)) — Observation time. - `temperature` (object) — Air temperature. - `forecast` (object | null) — The forecast from the newest run published by the instant. Filled in the default view, for a `?date=` of today or a later day that a run covers, and for a `?from=&to=` that ends after today, with `daily` cut to the range. - `issued_at` (string (date-time)) — The initialization time of the run that `hourly` comes from. - `hourly` (object[]) — The next 48 hours, every 3 hours. - `time` (string (date-time)) — The end of the step. - `temperature` (object) — Temperature at the end of the step. - `precipitation` (object) — Precipitation in the step. - `daily` (object[]) — Up to 15 local days from today, each from the newest run that covers it. - `date` (string (date)) — The local date. - `high` (object) — Forecast high. - `low` (object) — Forecast low. - `precipitation` (object) — Forecast precipitation. - `condition` (object | null) — The day's most significant weather condition. - `days` (object[] | null) — The days of `?date=` (one) or `?from=&to=` (each local day of the range up to today), oldest first. `null` in the default view and for a range that starts after today. - `date` (string (date)) — The local date. - `status` (string | null) — How final the observed figures are. `null` for a date after the instant. (Known values (open): `preliminary`, `final`, `not_reported`) - `model_estimate` (boolean) — Whether the figures are a model estimate for a place with no station near it. - `high` (object | null) — The highest temperature observed. - `c` (number (double)) — Degrees Celsius. - `f` (number (double)) — Degrees Fahrenheit. - `low` (object | null) — The lowest temperature observed. - `c` (number (double)) — Degrees Celsius. - `f` (number (double)) — Degrees Fahrenheit. - `precipitation` (object | null) — The day's precipitation. - `mm` (number (double)) — Millimeters. - `inch` (number (double)) — Inches. - `hourly` (object[] | null) — The day's observations. Filled only for a `?date=` of a day up to the instant. - `time` (string (date-time)) — Observation time. - `temperature` (object) — Air temperature. - Variant `place` — An entity whose `type` is `place`. - `id` (string) — The entity's stable URL, `https://world.epochal.com//`. - `schema_version` (integer (int64)) — Schema version for this entity type's `properties` layout (`1` for all types). (Minimum: `0`) - `updated_at` (string (date-time)) — When the properties were last refreshed. - `type` (string) — The entity's type. It sets the shape of `properties`. (Constant: `place`) - `properties` (object) — The properties of a place, which is a business or point of interest, as of the instant. - `name` (string) — The place's name. - `category` (string | null) — The main category, as the map labels it, such as `Historical landmark`. It is normally `categories[0]`. `null` when unknown. - `categories` (string[]) — Every category, main one first. - `description` (string | null) — What the place is, in a sentence or two. `null` when unknown. - `summary` (string[]) — A longer account of the place, one paragraph per entry. - `address` (object | null) — The street address. `null` when no part is known. - `formatted` (string | null) — The whole address on one line. - `street` (string | null) — Street and number. - `city` (string | null) — City or town. - `region` (string | null) — State, province, or equivalent. - `postal_code` (string | null) — Postal code. - `country_code` (string | null) — ISO 3166-1 alpha-2 country code. - `location` (object | null) — The place's coordinates. `null` when unknown or out of range. - `lat` (number (double)) — Latitude in degrees, north positive. - `lon` (number (double)) — Longitude in degrees, east positive. - `phone` (string | null) — The phone number, as the map lists it. `null` when unknown. - `website` (string (uri) | null) — The place's own website, a full URL. `null` when unknown. - `opening_hours` (object[]) — Opening hours per weekday, Monday first, in zero to seven rows. - `day` (string) — The weekday. (Known values (open): `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`) - `hours` (string) — The hours as the map writes them, such as `9 am to 12 am`, or `Closed`. - `rating` (object | null) — A summary of the place's reviews. `null` when neither score nor count is known. - `score` (number (double) | null) — The average star rating, 1 to 5. `null` when unknown. - `review_count` (integer (int64) | null) — How many reviews the place has. `null` when unknown. (Minimum: `0`) - `distribution` (object[]) — Reviews per star level, from 1 to 5, ascending. It has exactly five rows, or none when unknown. - `stars` (integer (int64)) — The star level, 1 to 5. (Range: `1` to `5`) - `count` (integer (int64)) — Reviews at that level. (Minimum: `0`) - `status` (object) — Whether the place is open. - `state` (string) — Whether the place is open. (Known values (open): `open`, `temporarily_closed`, `closed`, `removed`) - `detected_at` (string (date-time) | null) — When the map first showed the current non-open state. `null` for an open place or when unknown. - `entities` (object[]) — Reserved; entities come on `results[].entity`. (Default: `[]`) - Variant `organization` — An entity whose `type` is `organization`. - `id` (string) — The entity's stable URL, `https://world.epochal.com//`. - `schema_version` (integer (int64)) — Schema version for this entity type's `properties` layout (`1` for all types). (Minimum: `0`) - `updated_at` (string (date-time)) — When the properties were last refreshed. - `type` (string) — The entity's type. It sets the shape of `properties`. (Constant: `organization`) - `properties` (object) — The properties of a company. - `name` (string) — The company's common name, such as `NVIDIA`. - `legal_name` (string | null) — The company's full legal name, such as `NVIDIA Corporation`. `null` when unknown. - `description` (string | null) — What the company does, in its own words, as plain text. `null` when unknown. - `tagline` (string | null) — The company's one-line headline, in its own words. `null` when unknown. - `domain` (string | null) — The website's host without scheme or path, such as `nvidia.com`. `null` when unknown. - `industry` (string | null) — The primary industry as the profile names it, such as `Computer Hardware Manufacturing`. `null` when unknown. - `specialties` (string[]) — The specialties the company lists, distinct, in profile order. - `founded_year` (integer (int64) | null) — The year it was founded. `null` when unknown. (Minimum: `0`) - `employee_count` (integer (int64) | null) — The number of employees on the profile. `null` when unknown. (Minimum: `0`) - `headquarters` (object | null) — Where the company is headquartered. `null` when no part is known. - `formatted` (string | null) — The whole address on one line. - `street` (string | null) — Street and number. - `city` (string | null) — City or town. - `region` (string | null) — State, province, or equivalent. - `postal_code` (string | null) — Postal code. - `country_code` (string | null) — ISO 3166-1 alpha-2 country code. - `revenue_range` (object | null) — The annual revenue band. `null` when unknown. - `min_usd` (number (double)) — The band's lower bound. `0` for the lowest band. - `max_usd` (number (double) | null) — The band's upper bound. `null` for the open top band. - `ticker` (string | null) — The stock ticker of the listing, such as `NVDA`. `null` when not listed or unknown. - `exchange` (string | null) — The listing's exchange code as the profile writes it, such as `NASDAQ`. `null` when unknown. - `latest_funding_round` (object | null) — The same round as `funding_rounds[0]`. `null` when `funding_rounds` is empty. - `round_type` (string | null) — The kind of round. `null` when unknown. (Known values (open): `pre_seed`, `seed`, `angel`, `series_a`, `series_b`, `series_c`, `series_d`, `series_e`, `series_f`, `series_g`, `series_h`, `series_i`, `series_j`, `series_unknown`, `grant`, `debt_financing`, `convertible_note`, `equity_crowdfunding`, `product_crowdfunding`, `private_equity`, `corporate_round`, `post_ipo_equity`, `post_ipo_debt`, `post_ipo_secondary`, `secondary_market`, `non_equity_assistance`, `initial_coin_offering`, `undisclosed`) - `announced_on` (string (date) | null) — The day the round was announced. `null` when unknown. - `amount` (number (double) | null) — The amount raised, in `currency`. `null` when undisclosed. - `currency` (string | null) — The currency of `amount`. `null` exactly when `amount` is `null`. (Known values (open): `USD`, `USDT`, `EUR`, `GBP`, `JPY`, `CNY`, `CHF`, `CAD`, `AUD`, `NZD`, `HKD`, `SGD`, `KRW`, `INR`, `BRL`, `MXN`, `ZAR`, `SEK`, `NOK`, `DKK`, `PLN`, `CZK`, `HUF`, `RON`, `TRY`, `ILS`, `IDR`, `MYR`, `PHP`, `THB`, `TWD`, `LKR`, `ISK`) - `investors` (object[]) — The investors named for the round, in source order. - `id` (string (uri) | null) — The entity's URL, such as `https://world.epochal.com/organization/`, or the URL of a page of one. `null` when the reference has no link, even if the entity has a page. - `name` (string) — The name at the instant. - `funding_rounds` (object[]) — Dated rounds announced on or before `updated_at`, newest first, without exact duplicates. - `round_type` (string | null) — The kind of round. `null` when unknown. (Known values (open): `pre_seed`, `seed`, `angel`, `series_a`, `series_b`, `series_c`, `series_d`, `series_e`, `series_f`, `series_g`, `series_h`, `series_i`, `series_j`, `series_unknown`, `grant`, `debt_financing`, `convertible_note`, `equity_crowdfunding`, `product_crowdfunding`, `private_equity`, `corporate_round`, `post_ipo_equity`, `post_ipo_debt`, `post_ipo_secondary`, `secondary_market`, `non_equity_assistance`, `initial_coin_offering`, `undisclosed`) - `announced_on` (string (date) | null) — The day the round was announced. `null` when unknown. - `amount` (number (double) | null) — The amount raised, in `currency`. `null` when undisclosed. - `currency` (string | null) — The currency of `amount`. `null` exactly when `amount` is `null`. (Known values (open): `USD`, `USDT`, `EUR`, `GBP`, `JPY`, `CNY`, `CHF`, `CAD`, `AUD`, `NZD`, `HKD`, `SGD`, `KRW`, `INR`, `BRL`, `MXN`, `ZAR`, `SEK`, `NOK`, `DKK`, `PLN`, `CZK`, `HUF`, `RON`, `TRY`, `ILS`, `IDR`, `MYR`, `PHP`, `THB`, `TWD`, `LKR`, `ISK`) - `investors` (object[]) — The investors named for the round, in source order. - `id` (string (uri) | null) — The entity's URL, such as `https://world.epochal.com/organization/`, or the URL of a page of one. `null` when the reference has no link, even if the entity has a page. - `name` (string) — The name at the instant. - Variant `person` — An entity whose `type` is `person`. - `id` (string) — The entity's stable URL, `https://world.epochal.com//`. - `schema_version` (integer (int64)) — Schema version for this entity type's `properties` layout (`1` for all types). (Minimum: `0`) - `updated_at` (string (date-time)) — When the properties were last refreshed. - `type` (string) — The entity's type. It sets the shape of `properties`. (Constant: `person`) - `properties` (object) — The properties of a person. - `name` (string) — The person's full name. - `headline` (string | null) — A one-line professional summary. `null` when unknown. - `summary` (string | null) — The person's own description of themselves. `null` when unknown. - `industry` (string | null) — The industry as the profile names it. `null` when unknown. - `location` (object | null) — Where the person is based. `null` when both parts are unknown. - `formatted` (string | null) — The place as one line, such as `Austin, Texas, United States`. `null` when unknown. - `country_code` (string | null) — ISO 3166-1 alpha-2 country code, uppercase. `null` when unknown. - `follower_count` (integer (int64) | null) — The number of followers of the professional profile. `null` when unknown. (Minimum: `0`) - `experience` (object[]) — Positions, current ones first, then the most recent end or start date first. - `title` (string | null) — The job title. `null` when unknown. - `organization` (object | null) — The employer. `null` when unnamed. - `id` (string (uri) | null) — The entity's URL, such as `https://world.epochal.com/organization/`, or the URL of a page of one. `null` when the reference has no link, even if the entity has a page. - `name` (string) — The name at the instant. - `start_date` (string | null) — When the position started. `null` when unknown. - `end_date` (string | null) — When the position ended. `null` when ongoing or unknown. - `is_current` (boolean | null) — Whether the person holds the position now. `null` when unknown. - `location` (string | null) — Where the position is based, as written. `null` when unknown. - `description` (string | null) — What the role involved, in the person's words. `null` when unknown. - `education` (object[]) — Periods of study, most recent first. - `school` (object | null) — The school. `null` when unnamed. - `id` (string (uri) | null) — The entity's URL, such as `https://world.epochal.com/organization/`, or the URL of a page of one. `null` when the reference has no link, even if the entity has a page. - `name` (string) — The name at the instant. - `degree` (string | null) — The degree earned, as written, such as `MSEE`. `null` when unknown. - `field_of_study` (string | null) — The field of study, as written. `null` when unknown. - `start_date` (string | null) — When the study started. `null` when unknown. - `end_date` (string | null) — When the study ended. `null` when unknown. - `skills` (string[]) — The skills the person lists, distinct, in profile order. - `languages` (object[]) — Languages the person speaks, distinct by name. - `name` (string) — The language, such as `Spanish`. - `proficiency` (string | null) — How well the person knows the language. `null` when unknown. (Known values (open): `elementary`, `limited_working`, `professional_working`, `full_professional`, `native_or_bilingual`) - `posts` (object[]) — Recent posts dated on or before `updated_at`, newest first. - `text` (string) — The post's text, or the text it reposts when it adds none. - `posted_on` (string (date)) — The day it was posted. - `like_count` (integer (int64) | null) — The number of likes. `null` when unknown. (Minimum: `0`) - `comment_count` (integer (int64) | null) — The number of comments. `null` when unknown. (Minimum: `0`) - Variant `crypto` — An entity whose `type` is `crypto`. - `id` (string) — The entity's stable URL, `https://world.epochal.com//`. - `schema_version` (integer (int64)) — Schema version for this entity type's `properties` layout (`1` for all types). (Minimum: `0`) - `updated_at` (string (date-time)) — When the properties were last refreshed. - `type` (string) — The entity's type. It sets the shape of `properties`. (Constant: `crypto`) - `properties` (object) — The properties of a crypto asset, which is one coin, not a trading pair. They hold its latest UTC day, the price at a minute, and the price on a date or the daily history that the URL asks for. Each day is rolled up from 1-minute bars of the best market Epochal holds for that day. - `name` (string) — The asset's name, such as `Bitcoin`. - `symbol` (string) — The asset's symbol at the instant, such as `BTC`. - `currency` (string) — The currency of `latest` and `range_52w`, such as `USDT`. Every other priced object names its own currency, and `chart` is in the currency of `quote`. (Known values (open): `USD`, `USDT`, `EUR`, `GBP`, `JPY`, `CNY`, `CHF`, `CAD`, `AUD`, `NZD`, `HKD`, `SGD`, `KRW`, `INR`, `BRL`, `MXN`, `ZAR`, `SEK`, `NOK`, `DKK`, `PLN`, `CZK`, `HUF`, `RON`, `TRY`, `ILS`, `IDR`, `MYR`, `PHP`, `THB`, `TWD`, `LKR`, `ISK`) - `stale_hours` (integer (int64) | null) — Hours since the last trade (`latest.through`), rounded up, when that trade is more than 24 hours before the instant. The price is then not current. `null` otherwise. (Minimum: `0`) - `latest` (object | null) — The UTC day that contains the instant, up to the instant. `null` when no price is visible. - `date` (string (date)) — The UTC day. - `open` (number (double)) — The price at the start of the day's first bar. - `high` (number (double)) — The highest price. - `low` (number (double)) — The lowest price. - `close` (number (double)) — The price at the end of the day's last bar, or the last price while `partial` is true. - `volume` (number (double)) — The coin traded, in coin units to two decimals. - `quote_volume` (number (double) | null) — The value traded in `currency`, to two decimals. `null` when the market does not publish it. - `trades` (integer (int64) | null) — The number of trades. `null` when the market does not publish it. (Minimum: `0`) - `currency` (string) — The currency of the day's prices. (Known values (open): `USD`, `USDT`, `EUR`, `GBP`, `JPY`, `CNY`, `CHF`, `CAD`, `AUD`, `NZD`, `HKD`, `SGD`, `KRW`, `INR`, `BRL`, `MXN`, `ZAR`, `SEK`, `NOK`, `DKK`, `PLN`, `CZK`, `HUF`, `RON`, `TRY`, `ILS`, `IDR`, `MYR`, `PHP`, `THB`, `TWD`, `LKR`, `ISK`) - `previous_close` (number (double) | null) — The previous UTC day's close. `null` without a previous day. - `change` (number (double) | null) — `close` minus `previous_close`. `null` without a previous day. - `change_pct` (number (double) | null) — `change` as a percentage of `previous_close`. `null` without a previous day. - `partial` (boolean) — Whether the day's last bar is not yet published at the instant. - `through` (string (date-time)) — The start of the last minute the day includes. - `range_52w` (object | null) — The low and high of the 365 UTC days to `latest.date`, in `currency`. `null` without `latest`. - `low` (number (double)) — The lowest low. - `high` (number (double)) — The highest high. - `quote` (object | null) — The price at the URL's `at`, or at the latest minute when the URL has no `at`. - `at` (string (date-time)) — The start of the minute. This is the URL's `at` rounded down to the minute, or `latest.through` when the URL has no `at`. - `price` (number (double)) — The price at the end of the minute. - `currency` (string) — The currency of `price`. (Known values (open): `USD`, `USDT`, `EUR`, `GBP`, `JPY`, `CNY`, `CHF`, `CAD`, `AUD`, `NZD`, `HKD`, `SGD`, `KRW`, `INR`, `BRL`, `MXN`, `ZAR`, `SEK`, `NOK`, `DKK`, `PLN`, `CZK`, `HUF`, `RON`, `TRY`, `ILS`, `IDR`, `MYR`, `PHP`, `THB`, `TWD`, `LKR`, `ISK`) - `chart` (object | null) — The price every hour over the 24 hours to `quote.at`, in the currency of `quote`. `null` when no minute in those hours is visible. - `prices` (object[]) — One price per step that has one, oldest first. - `time` (string (date-time)) — The time of the price. - `price` (number (double)) — The price. - `price_on_date` (object | null) — The UTC day of the URL's `date`, clipped to the instant. `null` without `date`. - `requested_date` (string (date)) — The URL's `date`, or the day containing the instant when `date` is later than it. - `date` (string (date)) — The UTC day returned, the same as `requested_date`. - `open` (number (double)) — The price at the start of the day's first bar. - `high` (number (double)) — The highest price. - `low` (number (double)) — The lowest price. - `close` (number (double)) — The price at the end of the day's last bar, or the last price while `partial` is true. - `volume` (number (double)) — The coin traded, in coin units to two decimals. - `quote_volume` (number (double) | null) — The value traded in `currency`, to two decimals. `null` when the market does not publish it. - `trades` (integer (int64) | null) — The number of trades. `null` when the market does not publish it. (Minimum: `0`) - `currency` (string) — The currency of the day's prices. (Known values (open): `USD`, `USDT`, `EUR`, `GBP`, `JPY`, `CNY`, `CHF`, `CAD`, `AUD`, `NZD`, `HKD`, `SGD`, `KRW`, `INR`, `BRL`, `MXN`, `ZAR`, `SEK`, `NOK`, `DKK`, `PLN`, `CZK`, `HUF`, `RON`, `TRY`, `ILS`, `IDR`, `MYR`, `PHP`, `THB`, `TWD`, `LKR`, `ISK`) - `previous_close` (number (double) | null) — The previous UTC day's close. `null` without a previous day. - `change` (number (double) | null) — `close` minus `previous_close`. `null` without a previous day. - `change_pct` (number (double) | null) — `change` as a percentage of `previous_close`. `null` without a previous day. - `partial` (boolean) — Whether the day's last bar is not yet published at the instant. - `through` (string (date-time)) — The start of the last minute the day includes. - `price_history` (object | null) — Daily bars for the URL's `from` and `to`. `null` without `from`. - `from` (string (date)) — The first date asked for, inclusive. - `to` (string (date)) — The last date asked for, inclusive, clipped to the instant. - `bars` (object[]) — One row per day, oldest first. - `date` (string (date)) — The UTC day. - `open` (number (double)) — The first price. - `high` (number (double)) — The highest price. - `low` (number (double)) — The lowest price. - `close` (number (double)) — The last price. - `volume` (number (double)) — The coin traded, in coin units to two decimals. - `currency` (string) — The currency of the row's prices. (Known values (open): `USD`, `USDT`, `EUR`, `GBP`, `JPY`, `CNY`, `CHF`, `CAD`, `AUD`, `NZD`, `HKD`, `SGD`, `KRW`, `INR`, `BRL`, `MXN`, `ZAR`, `SEK`, `NOK`, `DKK`, `PLN`, `CZK`, `HUF`, `RON`, `TRY`, `ILS`, `IDR`, `MYR`, `PHP`, `THB`, `TWD`, `LKR`, `ISK`) - Variant `weather` — An entity whose `type` is `weather`. - `id` (string) — The entity's stable URL, `https://world.epochal.com//`. - `schema_version` (integer (int64)) — Schema version for this entity type's `properties` layout (`1` for all types). (Minimum: `0`) - `updated_at` (string (date-time)) — When the properties were last refreshed. - `type` (string) — The entity's type. It sets the shape of `properties`. (Constant: `weather`) - `properties` (object) — A place's weather at the instant. It holds the latest report, today's and yesterday's observed figures, and the forecast, or the observed days of a date or range. Today is the local day of the instant. The place is a city, a smaller town, or a landmark. A block is `null` when the view doesn't ask for it or the place has no data for it. No block names the source of its values. - `name` (string) — The place's name. - `country_code` (string) — ISO 3166-1 alpha-2 country code. - `region` (string | null) — The first-level administrative area, such as a state. `null` when unknown. - `location` (object) — The place's coordinates, to two decimals. - `lat` (number (double)) — Latitude in degrees, north positive. - `lon` (number (double)) — Longitude in degrees, east positive. - `timezone` (string) — The IANA time zone. Every local date in these properties is in it. - `current` (object | null) — The latest report. Filled in the default view, and for a `?date=` of today or a later day that a run covers. - `observed_at` (string (date-time)) — Observation time, or the time a model estimate is valid for. - `temperature` (object) — Air temperature. - `c` (number (double)) — Degrees Celsius. - `f` (number (double)) — Degrees Fahrenheit. - `model_estimate` (boolean) — Whether the value is a model estimate, used when no station is near or none has filed in 3 hours. - `humidity_pct` (number (double) | null) — Relative humidity, in percent. `null` when the report lacks a temperature or dew point. - `wind` (object | null) — The wind. `null` when the report has no wind group. - `speed_kmh` (number (double)) — Sustained speed, km/h. - `speed_mph` (number (double)) — Sustained speed, mph. - `direction_deg` (integer (int64) | null) — The direction the wind blows from, in degrees clockwise from north. `null` for a calm or variable wind. (Range: `0` to `65535`) - `condition` (object | null) — The weather or sky condition. `null` when the report has neither. - `code` (integer (int64)) — The WMO weather code (code table 4677, 0–99). (Range: `0` to `255`) - `label` (string) — The code in words, such as `Partly cloudy`. - `today` (object | null) — Today so far. Filled in the default view only. - `date` (string (date)) — The local date. - `status` (string | null) — How final the observed figures are. `null` for a date after the instant. (Known values (open): `preliminary`, `final`, `not_reported`) - `model_estimate` (boolean) — Whether the figures are a model estimate for a place with no station near it. - `high` (object | null) — The highest temperature observed. - `c` (number (double)) — Degrees Celsius. - `f` (number (double)) — Degrees Fahrenheit. - `low` (object | null) — The lowest temperature observed. - `c` (number (double)) — Degrees Celsius. - `f` (number (double)) — Degrees Fahrenheit. - `precipitation` (object | null) — The day's precipitation. - `mm` (number (double)) — Millimeters. - `inch` (number (double)) — Inches. - `hourly` (object[] | null) — The day's observations. Filled only for a `?date=` of a day up to the instant. - `time` (string (date-time)) — Observation time. - `temperature` (object) — Air temperature. - `c` (number (double)) — Degrees Celsius. - `f` (number (double)) — Degrees Fahrenheit. - `yesterday` (object | null) — The local day before `today`. Filled in the default view only. - `date` (string (date)) — The local date. - `status` (string | null) — How final the observed figures are. `null` for a date after the instant. (Known values (open): `preliminary`, `final`, `not_reported`) - `model_estimate` (boolean) — Whether the figures are a model estimate for a place with no station near it. - `high` (object | null) — The highest temperature observed. - `c` (number (double)) — Degrees Celsius. - `f` (number (double)) — Degrees Fahrenheit. - `low` (object | null) — The lowest temperature observed. - `c` (number (double)) — Degrees Celsius. - `f` (number (double)) — Degrees Fahrenheit. - `precipitation` (object | null) — The day's precipitation. - `mm` (number (double)) — Millimeters. - `inch` (number (double)) — Inches. - `hourly` (object[] | null) — The day's observations. Filled only for a `?date=` of a day up to the instant. - `time` (string (date-time)) — Observation time. - `temperature` (object) — Air temperature. - `c` (number (double)) — Degrees Celsius. - `f` (number (double)) — Degrees Fahrenheit. - `forecast` (object | null) — The forecast from the newest run published by the instant. Filled in the default view, for a `?date=` of today or a later day that a run covers, and for a `?from=&to=` that ends after today, with `daily` cut to the range. - `issued_at` (string (date-time)) — The initialization time of the run that `hourly` comes from. - `hourly` (object[]) — The next 48 hours, every 3 hours. - `time` (string (date-time)) — The end of the step. - `temperature` (object) — Temperature at the end of the step. - `c` (number (double)) — Degrees Celsius. - `f` (number (double)) — Degrees Fahrenheit. - `precipitation` (object) — Precipitation in the step. - `mm` (number (double)) — Millimeters. - `inch` (number (double)) — Inches. - `daily` (object[]) — Up to 15 local days from today, each from the newest run that covers it. - `date` (string (date)) — The local date. - `high` (object) — Forecast high. - `c` (number (double)) — Degrees Celsius. - `f` (number (double)) — Degrees Fahrenheit. - `low` (object) — Forecast low. - `c` (number (double)) — Degrees Celsius. - `f` (number (double)) — Degrees Fahrenheit. - `precipitation` (object) — Forecast precipitation. - `mm` (number (double)) — Millimeters. - `inch` (number (double)) — Inches. - `condition` (object | null) — The day's most significant weather condition. - `code` (integer (int64)) — The WMO weather code (code table 4677, 0–99). (Range: `0` to `255`) - `label` (string) — The code in words, such as `Partly cloudy`. - `days` (object[] | null) — The days of `?date=` (one) or `?from=&to=` (each local day of the range up to today), oldest first. `null` in the default view and for a range that starts after today. - `date` (string (date)) — The local date. - `status` (string | null) — How final the observed figures are. `null` for a date after the instant. (Known values (open): `preliminary`, `final`, `not_reported`) - `model_estimate` (boolean) — Whether the figures are a model estimate for a place with no station near it. - `high` (object | null) — The highest temperature observed. - `c` (number (double)) — Degrees Celsius. - `f` (number (double)) — Degrees Fahrenheit. - `low` (object | null) — The lowest temperature observed. - `c` (number (double)) — Degrees Celsius. - `f` (number (double)) — Degrees Fahrenheit. - `precipitation` (object | null) — The day's precipitation. - `mm` (number (double)) — Millimeters. - `inch` (number (double)) — Inches. - `hourly` (object[] | null) — The day's observations. Filled only for a `?date=` of a day up to the instant. - `time` (string (date-time)) — Observation time. - `temperature` (object) — Air temperature. - `c` (number (double)) — Degrees Celsius. - `f` (number (double)) — Degrees Fahrenheit. - Variant `place` — An entity whose `type` is `place`. - `id` (string) — The entity's stable URL, `https://world.epochal.com//`. - `schema_version` (integer (int64)) — Schema version for this entity type's `properties` layout (`1` for all types). (Minimum: `0`) - `updated_at` (string (date-time)) — When the properties were last refreshed. - `type` (string) — The entity's type. It sets the shape of `properties`. (Constant: `place`) - `properties` (object) — The properties of a place, which is a business or point of interest, as of the instant. - `name` (string) — The place's name. - `category` (string | null) — The main category, as the map labels it, such as `Historical landmark`. It is normally `categories[0]`. `null` when unknown. - `categories` (string[]) — Every category, main one first. - `description` (string | null) — What the place is, in a sentence or two. `null` when unknown. - `summary` (string[]) — A longer account of the place, one paragraph per entry. - `address` (object | null) — The street address. `null` when no part is known. - `formatted` (string | null) — The whole address on one line. - `street` (string | null) — Street and number. - `city` (string | null) — City or town. - `region` (string | null) — State, province, or equivalent. - `postal_code` (string | null) — Postal code. - `country_code` (string | null) — ISO 3166-1 alpha-2 country code. - `location` (object | null) — The place's coordinates. `null` when unknown or out of range. - `lat` (number (double)) — Latitude in degrees, north positive. - `lon` (number (double)) — Longitude in degrees, east positive. - `phone` (string | null) — The phone number, as the map lists it. `null` when unknown. - `website` (string (uri) | null) — The place's own website, a full URL. `null` when unknown. - `opening_hours` (object[]) — Opening hours per weekday, Monday first, in zero to seven rows. - `day` (string) — The weekday. (Known values (open): `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`) - `hours` (string) — The hours as the map writes them, such as `9 am to 12 am`, or `Closed`. - `rating` (object | null) — A summary of the place's reviews. `null` when neither score nor count is known. - `score` (number (double) | null) — The average star rating, 1 to 5. `null` when unknown. - `review_count` (integer (int64) | null) — How many reviews the place has. `null` when unknown. (Minimum: `0`) - `distribution` (object[]) — Reviews per star level, from 1 to 5, ascending. It has exactly five rows, or none when unknown. - `stars` (integer (int64)) — The star level, 1 to 5. (Range: `1` to `5`) - `count` (integer (int64)) — Reviews at that level. (Minimum: `0`) - `status` (object) — Whether the place is open. - `state` (string) — Whether the place is open. (Known values (open): `open`, `temporarily_closed`, `closed`, `removed`) - `detected_at` (string (date-time) | null) — When the map first showed the current non-open state. `null` for an open place or when unknown. ## Responses ### 200 Response as of `Accept-Datetime`, with the resolved cutoff timestamp in `as_of`. ```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": [] } ``` ### 400 The request is invalid. The message names the field. Fix it before retrying. ```json { "error": { "type": "invalid_request", "message": "The request body is invalid.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 401 The x-api-key header is missing, or the key is unknown, revoked or expired. ```json { "error": { "type": "invalid_api_key", "message": "No key matches that token. Check the x-api-key header.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 402 One of: free_quota_exhausted, trial_only, insufficient_credits. ```json { "error": { "type": "free_quota_exhausted", "message": "Your organization has used all its free requests for this API, so retrying will not help. To keep using it, contact sales at https://epochal.com/contact.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 403 One of: organization_suspended, spend_limit_reached. ```json { "error": { "type": "organization_suspended", "message": "The organization's billing is suspended. Contact us at https://epochal.com/contact to continue.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 422 The query was refused by the usage policy and is not billed. Modify the query before retrying. ```json { "error": { "type": "query_refused", "message": "This query falls under our usage policy and was refused. The request was not billed.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 429 Rate limit exceeded for this organization. Wait for the Retry-After interval before retrying. ```json { "error": { "type": "rate_limit_exceeded", "message": "Over the organization's rate limit. Retry after a pause.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 500 Something failed on our side. Not billed. Retry with backoff. ```json { "error": { "type": "internal_error", "message": "Something failed on our side. The request was not billed.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 503 Temporarily unavailable. Not billed. Retry with backoff, waiting for Retry-After when present. ```json { "error": { "type": "service_unavailable", "message": "The service is temporarily unavailable. The request was not billed.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 504 The request did not finish in time. Not billed. Retry with backoff. ```json { "error": { "type": "timeout", "message": "The request did not finish in time. The request was not billed.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` --- # Time Portal fetch `POST /v1/time-portal/fetch` — Time Portal Fetch API Retrieve an archived URL as it existed at `Accept-Datetime`, either as markdown with metadata (`format: structured`) or as the raw document (`format: page`). ## Request samples ### cURL ```bash 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 }' ``` ### Python ```python import os import requests response = requests.post( "https://api.epochal.com/v1/time-portal/fetch", headers={"x-api-key": os.environ["EPOCHAL_API_KEY"], "Accept-Datetime": "2026-03-01T00:00:00Z"}, json={ "url": "https://news.example.com/energy/battery-plant-delay", "max_characters": 2000 }, ) response.raise_for_status() print(response.json()) ``` ### JavaScript ```js const response = await fetch("https://api.epochal.com/v1/time-portal/fetch", { method: "POST", headers: { "x-api-key": process.env.EPOCHAL_API_KEY, "Accept-Datetime": "2026-03-01T00:00:00Z", "Content-Type": "application/json" }, body: JSON.stringify({ "url": "https://news.example.com/energy/battery-plant-delay", "max_characters": 2000 }) }); console.log(await response.json()); ``` ## Authorizations - `x-api-key` (string, header, required) — Send your API key in the x-api-key header. Create keys in the console; each belongs to one organization. ## Headers - `Accept-Datetime` (string, header, required) — Point-in-time cutoff for the request: a past RFC 3339 timestamp, ISO 8601 date/time, or HTTP-date at or after `1970-01-01T00:00:00Z`. Nothing published or captured after this time is included. ## Body - `url` (string, body, required) — The page to read: a full `http` or `https` URL. (Minimum length: `1`) - `max_characters` (integer, body, optional) — Maximum number of characters of `content` to return; longer pages are truncated. Ignored for `format: "page"`. (Range: `1` to `1000000`; Default: `100000`) - `format` (string, body, optional) — `structured` (default) returns extracted markdown and metadata in JSON. `page` returns the raw archived document body with its `Content-Type` header and no content learned after `Accept-Datetime`. (One of: `structured`, `page`; Default: `"structured"`) ## Response fields - `as_of` (string (date-time)) — Resolved point-in-time cutoff from `Accept-Datetime`. - `request_id` (string) — Identifies this request in our logs; quote it when reporting a problem. - `status` (string) — `success` when the page was read; `error` when it could not be, with the reason in `page_error`. The request itself succeeded either way and is billed. (One of: `success`, `error`; Default: `"success"`) - `page_error` (object | null) — Why the page could not be read. Absent when `status` is `success`. - `http_status_code` (integer (uint16) | null) — The HTTP status the site answered with. `null` when no site answered: the host could not be reached, or no copy is archived at `Accept-Datetime`. (Range: `0` to `65535`; Default: `null`) - `message` (string) — A short reason, for people; branch on `http_status_code`. - `id` (string | null) — Identifies the exact stored version served. `null` when unknown. - `url` (string) — The URL as requested. - `final_url` (string) — The URL the content was read from, after redirects and normalization. - `title` (string) — The page's title. - `description` (string | null) — The page's own summary, from its metadata. `null` when it declares none. - `author` (string | null) — The page's authors, comma-separated. `null` when it names none. - `published_at` (string (date-time) | null) — When the page says it was first published. `null` when it declares no trusted date. - `language` (string | null) — The page's language as a BCP 47 tag. `null` when not detected. - `content` (string) — The page's extracted text as markdown, at most `max_characters` long. - `truncated` (boolean) — Whether `max_characters` cut `content` short. - `entity` (object | null) — The crypto asset, city's weather, person, organization or place when the URL is an Epochal World page. `null` for ordinary web pages. (Known values (open): `organization`, `person`, `crypto`, `weather`, `place`) - Variant `organization` — An entity whose `type` is `organization`. - `id` (string) — The entity's stable URL, `https://world.epochal.com//`. - `schema_version` (integer (int64)) — Schema version for this entity type's `properties` layout (`1` for all types). (Minimum: `0`) - `updated_at` (string (date-time)) — When the properties were last refreshed. - `type` (string) — The entity's type. It sets the shape of `properties`. (Constant: `organization`) - `properties` (object) — The properties of a company. - `name` (string) — The company's common name, such as `NVIDIA`. - `legal_name` (string | null) — The company's full legal name, such as `NVIDIA Corporation`. `null` when unknown. - `description` (string | null) — What the company does, in its own words, as plain text. `null` when unknown. - `tagline` (string | null) — The company's one-line headline, in its own words. `null` when unknown. - `domain` (string | null) — The website's host without scheme or path, such as `nvidia.com`. `null` when unknown. - `industry` (string | null) — The primary industry as the profile names it, such as `Computer Hardware Manufacturing`. `null` when unknown. - `specialties` (string[]) — The specialties the company lists, distinct, in profile order. - `founded_year` (integer (int64) | null) — The year it was founded. `null` when unknown. (Minimum: `0`) - `employee_count` (integer (int64) | null) — The number of employees on the profile. `null` when unknown. (Minimum: `0`) - `headquarters` (object | null) — Where the company is headquartered. `null` when no part is known. - `formatted` (string | null) — The whole address on one line. - `street` (string | null) — Street and number. - `city` (string | null) — City or town. - `region` (string | null) — State, province, or equivalent. - `postal_code` (string | null) — Postal code. - `country_code` (string | null) — ISO 3166-1 alpha-2 country code. - `revenue_range` (object | null) — The annual revenue band. `null` when unknown. - `min_usd` (number (double)) — The band's lower bound. `0` for the lowest band. - `max_usd` (number (double) | null) — The band's upper bound. `null` for the open top band. - `ticker` (string | null) — The stock ticker of the listing, such as `NVDA`. `null` when not listed or unknown. - `exchange` (string | null) — The listing's exchange code as the profile writes it, such as `NASDAQ`. `null` when unknown. - `latest_funding_round` (object | null) — The same round as `funding_rounds[0]`. `null` when `funding_rounds` is empty. - `round_type` (string | null) — The kind of round. `null` when unknown. (Known values (open): `pre_seed`, `seed`, `angel`, `series_a`, `series_b`, `series_c`, `series_d`, `series_e`, `series_f`, `series_g`, `series_h`, `series_i`, `series_j`, `series_unknown`, `grant`, `debt_financing`, `convertible_note`, `equity_crowdfunding`, `product_crowdfunding`, `private_equity`, `corporate_round`, `post_ipo_equity`, `post_ipo_debt`, `post_ipo_secondary`, `secondary_market`, `non_equity_assistance`, `initial_coin_offering`, `undisclosed`) - `announced_on` (string (date) | null) — The day the round was announced. `null` when unknown. - `amount` (number (double) | null) — The amount raised, in `currency`. `null` when undisclosed. - `currency` (string | null) — The currency of `amount`. `null` exactly when `amount` is `null`. (Known values (open): `USD`, `USDT`, `EUR`, `GBP`, `JPY`, `CNY`, `CHF`, `CAD`, `AUD`, `NZD`, `HKD`, `SGD`, `KRW`, `INR`, `BRL`, `MXN`, `ZAR`, `SEK`, `NOK`, `DKK`, `PLN`, `CZK`, `HUF`, `RON`, `TRY`, `ILS`, `IDR`, `MYR`, `PHP`, `THB`, `TWD`, `LKR`, `ISK`) - `investors` (object[]) — The investors named for the round, in source order. - `id` (string (uri) | null) — The entity's URL, such as `https://world.epochal.com/organization/`, or the URL of a page of one. `null` when the reference has no link, even if the entity has a page. - `name` (string) — The name at the instant. - `funding_rounds` (object[]) — Dated rounds announced on or before `updated_at`, newest first, without exact duplicates. - `round_type` (string | null) — The kind of round. `null` when unknown. (Known values (open): `pre_seed`, `seed`, `angel`, `series_a`, `series_b`, `series_c`, `series_d`, `series_e`, `series_f`, `series_g`, `series_h`, `series_i`, `series_j`, `series_unknown`, `grant`, `debt_financing`, `convertible_note`, `equity_crowdfunding`, `product_crowdfunding`, `private_equity`, `corporate_round`, `post_ipo_equity`, `post_ipo_debt`, `post_ipo_secondary`, `secondary_market`, `non_equity_assistance`, `initial_coin_offering`, `undisclosed`) - `announced_on` (string (date) | null) — The day the round was announced. `null` when unknown. - `amount` (number (double) | null) — The amount raised, in `currency`. `null` when undisclosed. - `currency` (string | null) — The currency of `amount`. `null` exactly when `amount` is `null`. (Known values (open): `USD`, `USDT`, `EUR`, `GBP`, `JPY`, `CNY`, `CHF`, `CAD`, `AUD`, `NZD`, `HKD`, `SGD`, `KRW`, `INR`, `BRL`, `MXN`, `ZAR`, `SEK`, `NOK`, `DKK`, `PLN`, `CZK`, `HUF`, `RON`, `TRY`, `ILS`, `IDR`, `MYR`, `PHP`, `THB`, `TWD`, `LKR`, `ISK`) - `investors` (object[]) — The investors named for the round, in source order. - `id` (string (uri) | null) — The entity's URL, such as `https://world.epochal.com/organization/`, or the URL of a page of one. `null` when the reference has no link, even if the entity has a page. - `name` (string) — The name at the instant. - Variant `person` — An entity whose `type` is `person`. - `id` (string) — The entity's stable URL, `https://world.epochal.com//`. - `schema_version` (integer (int64)) — Schema version for this entity type's `properties` layout (`1` for all types). (Minimum: `0`) - `updated_at` (string (date-time)) — When the properties were last refreshed. - `type` (string) — The entity's type. It sets the shape of `properties`. (Constant: `person`) - `properties` (object) — The properties of a person. - `name` (string) — The person's full name. - `headline` (string | null) — A one-line professional summary. `null` when unknown. - `summary` (string | null) — The person's own description of themselves. `null` when unknown. - `industry` (string | null) — The industry as the profile names it. `null` when unknown. - `location` (object | null) — Where the person is based. `null` when both parts are unknown. - `formatted` (string | null) — The place as one line, such as `Austin, Texas, United States`. `null` when unknown. - `country_code` (string | null) — ISO 3166-1 alpha-2 country code, uppercase. `null` when unknown. - `follower_count` (integer (int64) | null) — The number of followers of the professional profile. `null` when unknown. (Minimum: `0`) - `experience` (object[]) — Positions, current ones first, then the most recent end or start date first. - `title` (string | null) — The job title. `null` when unknown. - `organization` (object | null) — The employer. `null` when unnamed. - `id` (string (uri) | null) — The entity's URL, such as `https://world.epochal.com/organization/`, or the URL of a page of one. `null` when the reference has no link, even if the entity has a page. - `name` (string) — The name at the instant. - `start_date` (string | null) — When the position started. `null` when unknown. - `end_date` (string | null) — When the position ended. `null` when ongoing or unknown. - `is_current` (boolean | null) — Whether the person holds the position now. `null` when unknown. - `location` (string | null) — Where the position is based, as written. `null` when unknown. - `description` (string | null) — What the role involved, in the person's words. `null` when unknown. - `education` (object[]) — Periods of study, most recent first. - `school` (object | null) — The school. `null` when unnamed. - `id` (string (uri) | null) — The entity's URL, such as `https://world.epochal.com/organization/`, or the URL of a page of one. `null` when the reference has no link, even if the entity has a page. - `name` (string) — The name at the instant. - `degree` (string | null) — The degree earned, as written, such as `MSEE`. `null` when unknown. - `field_of_study` (string | null) — The field of study, as written. `null` when unknown. - `start_date` (string | null) — When the study started. `null` when unknown. - `end_date` (string | null) — When the study ended. `null` when unknown. - `skills` (string[]) — The skills the person lists, distinct, in profile order. - `languages` (object[]) — Languages the person speaks, distinct by name. - `name` (string) — The language, such as `Spanish`. - `proficiency` (string | null) — How well the person knows the language. `null` when unknown. (Known values (open): `elementary`, `limited_working`, `professional_working`, `full_professional`, `native_or_bilingual`) - `posts` (object[]) — Recent posts dated on or before `updated_at`, newest first. - `text` (string) — The post's text, or the text it reposts when it adds none. - `posted_on` (string (date)) — The day it was posted. - `like_count` (integer (int64) | null) — The number of likes. `null` when unknown. (Minimum: `0`) - `comment_count` (integer (int64) | null) — The number of comments. `null` when unknown. (Minimum: `0`) - Variant `crypto` — An entity whose `type` is `crypto`. - `id` (string) — The entity's stable URL, `https://world.epochal.com//`. - `schema_version` (integer (int64)) — Schema version for this entity type's `properties` layout (`1` for all types). (Minimum: `0`) - `updated_at` (string (date-time)) — When the properties were last refreshed. - `type` (string) — The entity's type. It sets the shape of `properties`. (Constant: `crypto`) - `properties` (object) — The properties of a crypto asset, which is one coin, not a trading pair. They hold its latest UTC day, the price at a minute, and the price on a date or the daily history that the URL asks for. Each day is rolled up from 1-minute bars of the best market Epochal holds for that day. - `name` (string) — The asset's name, such as `Bitcoin`. - `symbol` (string) — The asset's symbol at the instant, such as `BTC`. - `currency` (string) — The currency of `latest` and `range_52w`, such as `USDT`. Every other priced object names its own currency, and `chart` is in the currency of `quote`. (Known values (open): `USD`, `USDT`, `EUR`, `GBP`, `JPY`, `CNY`, `CHF`, `CAD`, `AUD`, `NZD`, `HKD`, `SGD`, `KRW`, `INR`, `BRL`, `MXN`, `ZAR`, `SEK`, `NOK`, `DKK`, `PLN`, `CZK`, `HUF`, `RON`, `TRY`, `ILS`, `IDR`, `MYR`, `PHP`, `THB`, `TWD`, `LKR`, `ISK`) - `stale_hours` (integer (int64) | null) — Hours since the last trade (`latest.through`), rounded up, when that trade is more than 24 hours before the instant. The price is then not current. `null` otherwise. (Minimum: `0`) - `latest` (object | null) — The UTC day that contains the instant, up to the instant. `null` when no price is visible. - `date` (string (date)) — The UTC day. - `open` (number (double)) — The price at the start of the day's first bar. - `high` (number (double)) — The highest price. - `low` (number (double)) — The lowest price. - `close` (number (double)) — The price at the end of the day's last bar, or the last price while `partial` is true. - `volume` (number (double)) — The coin traded, in coin units to two decimals. - `quote_volume` (number (double) | null) — The value traded in `currency`, to two decimals. `null` when the market does not publish it. - `trades` (integer (int64) | null) — The number of trades. `null` when the market does not publish it. (Minimum: `0`) - `currency` (string) — The currency of the day's prices. (Known values (open): `USD`, `USDT`, `EUR`, `GBP`, `JPY`, `CNY`, `CHF`, `CAD`, `AUD`, `NZD`, `HKD`, `SGD`, `KRW`, `INR`, `BRL`, `MXN`, `ZAR`, `SEK`, `NOK`, `DKK`, `PLN`, `CZK`, `HUF`, `RON`, `TRY`, `ILS`, `IDR`, `MYR`, `PHP`, `THB`, `TWD`, `LKR`, `ISK`) - `previous_close` (number (double) | null) — The previous UTC day's close. `null` without a previous day. - `change` (number (double) | null) — `close` minus `previous_close`. `null` without a previous day. - `change_pct` (number (double) | null) — `change` as a percentage of `previous_close`. `null` without a previous day. - `partial` (boolean) — Whether the day's last bar is not yet published at the instant. - `through` (string (date-time)) — The start of the last minute the day includes. - `range_52w` (object | null) — The low and high of the 365 UTC days to `latest.date`, in `currency`. `null` without `latest`. - `low` (number (double)) — The lowest low. - `high` (number (double)) — The highest high. - `quote` (object | null) — The price at the URL's `at`, or at the latest minute when the URL has no `at`. - `at` (string (date-time)) — The start of the minute. This is the URL's `at` rounded down to the minute, or `latest.through` when the URL has no `at`. - `price` (number (double)) — The price at the end of the minute. - `currency` (string) — The currency of `price`. (Known values (open): `USD`, `USDT`, `EUR`, `GBP`, `JPY`, `CNY`, `CHF`, `CAD`, `AUD`, `NZD`, `HKD`, `SGD`, `KRW`, `INR`, `BRL`, `MXN`, `ZAR`, `SEK`, `NOK`, `DKK`, `PLN`, `CZK`, `HUF`, `RON`, `TRY`, `ILS`, `IDR`, `MYR`, `PHP`, `THB`, `TWD`, `LKR`, `ISK`) - `chart` (object | null) — The price every hour over the 24 hours to `quote.at`, in the currency of `quote`. `null` when no minute in those hours is visible. - `prices` (object[]) — One price per step that has one, oldest first. - `time` (string (date-time)) — The time of the price. - `price` (number (double)) — The price. - `price_on_date` (object | null) — The UTC day of the URL's `date`, clipped to the instant. `null` without `date`. - `requested_date` (string (date)) — The URL's `date`, or the day containing the instant when `date` is later than it. - `date` (string (date)) — The UTC day returned, the same as `requested_date`. - `open` (number (double)) — The price at the start of the day's first bar. - `high` (number (double)) — The highest price. - `low` (number (double)) — The lowest price. - `close` (number (double)) — The price at the end of the day's last bar, or the last price while `partial` is true. - `volume` (number (double)) — The coin traded, in coin units to two decimals. - `quote_volume` (number (double) | null) — The value traded in `currency`, to two decimals. `null` when the market does not publish it. - `trades` (integer (int64) | null) — The number of trades. `null` when the market does not publish it. (Minimum: `0`) - `currency` (string) — The currency of the day's prices. (Known values (open): `USD`, `USDT`, `EUR`, `GBP`, `JPY`, `CNY`, `CHF`, `CAD`, `AUD`, `NZD`, `HKD`, `SGD`, `KRW`, `INR`, `BRL`, `MXN`, `ZAR`, `SEK`, `NOK`, `DKK`, `PLN`, `CZK`, `HUF`, `RON`, `TRY`, `ILS`, `IDR`, `MYR`, `PHP`, `THB`, `TWD`, `LKR`, `ISK`) - `previous_close` (number (double) | null) — The previous UTC day's close. `null` without a previous day. - `change` (number (double) | null) — `close` minus `previous_close`. `null` without a previous day. - `change_pct` (number (double) | null) — `change` as a percentage of `previous_close`. `null` without a previous day. - `partial` (boolean) — Whether the day's last bar is not yet published at the instant. - `through` (string (date-time)) — The start of the last minute the day includes. - `price_history` (object | null) — Daily bars for the URL's `from` and `to`. `null` without `from`. - `from` (string (date)) — The first date asked for, inclusive. - `to` (string (date)) — The last date asked for, inclusive, clipped to the instant. - `bars` (object[]) — One row per day, oldest first. - `date` (string (date)) — The UTC day. - `open` (number (double)) — The first price. - `high` (number (double)) — The highest price. - `low` (number (double)) — The lowest price. - `close` (number (double)) — The last price. - `volume` (number (double)) — The coin traded, in coin units to two decimals. - `currency` (string) — The currency of the row's prices. (Known values (open): `USD`, `USDT`, `EUR`, `GBP`, `JPY`, `CNY`, `CHF`, `CAD`, `AUD`, `NZD`, `HKD`, `SGD`, `KRW`, `INR`, `BRL`, `MXN`, `ZAR`, `SEK`, `NOK`, `DKK`, `PLN`, `CZK`, `HUF`, `RON`, `TRY`, `ILS`, `IDR`, `MYR`, `PHP`, `THB`, `TWD`, `LKR`, `ISK`) - Variant `weather` — An entity whose `type` is `weather`. - `id` (string) — The entity's stable URL, `https://world.epochal.com//`. - `schema_version` (integer (int64)) — Schema version for this entity type's `properties` layout (`1` for all types). (Minimum: `0`) - `updated_at` (string (date-time)) — When the properties were last refreshed. - `type` (string) — The entity's type. It sets the shape of `properties`. (Constant: `weather`) - `properties` (object) — A place's weather at the instant. It holds the latest report, today's and yesterday's observed figures, and the forecast, or the observed days of a date or range. Today is the local day of the instant. The place is a city, a smaller town, or a landmark. A block is `null` when the view doesn't ask for it or the place has no data for it. No block names the source of its values. - `name` (string) — The place's name. - `country_code` (string) — ISO 3166-1 alpha-2 country code. - `region` (string | null) — The first-level administrative area, such as a state. `null` when unknown. - `location` (object) — The place's coordinates, to two decimals. - `lat` (number (double)) — Latitude in degrees, north positive. - `lon` (number (double)) — Longitude in degrees, east positive. - `timezone` (string) — The IANA time zone. Every local date in these properties is in it. - `current` (object | null) — The latest report. Filled in the default view, and for a `?date=` of today or a later day that a run covers. - `observed_at` (string (date-time)) — Observation time, or the time a model estimate is valid for. - `temperature` (object) — Air temperature. - `c` (number (double)) — Degrees Celsius. - `f` (number (double)) — Degrees Fahrenheit. - `model_estimate` (boolean) — Whether the value is a model estimate, used when no station is near or none has filed in 3 hours. - `humidity_pct` (number (double) | null) — Relative humidity, in percent. `null` when the report lacks a temperature or dew point. - `wind` (object | null) — The wind. `null` when the report has no wind group. - `speed_kmh` (number (double)) — Sustained speed, km/h. - `speed_mph` (number (double)) — Sustained speed, mph. - `direction_deg` (integer (int64) | null) — The direction the wind blows from, in degrees clockwise from north. `null` for a calm or variable wind. (Range: `0` to `65535`) - `condition` (object | null) — The weather or sky condition. `null` when the report has neither. - `code` (integer (int64)) — The WMO weather code (code table 4677, 0–99). (Range: `0` to `255`) - `label` (string) — The code in words, such as `Partly cloudy`. - `today` (object | null) — Today so far. Filled in the default view only. - `date` (string (date)) — The local date. - `status` (string | null) — How final the observed figures are. `null` for a date after the instant. (Known values (open): `preliminary`, `final`, `not_reported`) - `model_estimate` (boolean) — Whether the figures are a model estimate for a place with no station near it. - `high` (object | null) — The highest temperature observed. - `c` (number (double)) — Degrees Celsius. - `f` (number (double)) — Degrees Fahrenheit. - `low` (object | null) — The lowest temperature observed. - `c` (number (double)) — Degrees Celsius. - `f` (number (double)) — Degrees Fahrenheit. - `precipitation` (object | null) — The day's precipitation. - `mm` (number (double)) — Millimeters. - `inch` (number (double)) — Inches. - `hourly` (object[] | null) — The day's observations. Filled only for a `?date=` of a day up to the instant. - `time` (string (date-time)) — Observation time. - `temperature` (object) — Air temperature. - `c` (number (double)) — Degrees Celsius. - `f` (number (double)) — Degrees Fahrenheit. - `yesterday` (object | null) — The local day before `today`. Filled in the default view only. - `date` (string (date)) — The local date. - `status` (string | null) — How final the observed figures are. `null` for a date after the instant. (Known values (open): `preliminary`, `final`, `not_reported`) - `model_estimate` (boolean) — Whether the figures are a model estimate for a place with no station near it. - `high` (object | null) — The highest temperature observed. - `c` (number (double)) — Degrees Celsius. - `f` (number (double)) — Degrees Fahrenheit. - `low` (object | null) — The lowest temperature observed. - `c` (number (double)) — Degrees Celsius. - `f` (number (double)) — Degrees Fahrenheit. - `precipitation` (object | null) — The day's precipitation. - `mm` (number (double)) — Millimeters. - `inch` (number (double)) — Inches. - `hourly` (object[] | null) — The day's observations. Filled only for a `?date=` of a day up to the instant. - `time` (string (date-time)) — Observation time. - `temperature` (object) — Air temperature. - `c` (number (double)) — Degrees Celsius. - `f` (number (double)) — Degrees Fahrenheit. - `forecast` (object | null) — The forecast from the newest run published by the instant. Filled in the default view, for a `?date=` of today or a later day that a run covers, and for a `?from=&to=` that ends after today, with `daily` cut to the range. - `issued_at` (string (date-time)) — The initialization time of the run that `hourly` comes from. - `hourly` (object[]) — The next 48 hours, every 3 hours. - `time` (string (date-time)) — The end of the step. - `temperature` (object) — Temperature at the end of the step. - `c` (number (double)) — Degrees Celsius. - `f` (number (double)) — Degrees Fahrenheit. - `precipitation` (object) — Precipitation in the step. - `mm` (number (double)) — Millimeters. - `inch` (number (double)) — Inches. - `daily` (object[]) — Up to 15 local days from today, each from the newest run that covers it. - `date` (string (date)) — The local date. - `high` (object) — Forecast high. - `c` (number (double)) — Degrees Celsius. - `f` (number (double)) — Degrees Fahrenheit. - `low` (object) — Forecast low. - `c` (number (double)) — Degrees Celsius. - `f` (number (double)) — Degrees Fahrenheit. - `precipitation` (object) — Forecast precipitation. - `mm` (number (double)) — Millimeters. - `inch` (number (double)) — Inches. - `condition` (object | null) — The day's most significant weather condition. - `code` (integer (int64)) — The WMO weather code (code table 4677, 0–99). (Range: `0` to `255`) - `label` (string) — The code in words, such as `Partly cloudy`. - `days` (object[] | null) — The days of `?date=` (one) or `?from=&to=` (each local day of the range up to today), oldest first. `null` in the default view and for a range that starts after today. - `date` (string (date)) — The local date. - `status` (string | null) — How final the observed figures are. `null` for a date after the instant. (Known values (open): `preliminary`, `final`, `not_reported`) - `model_estimate` (boolean) — Whether the figures are a model estimate for a place with no station near it. - `high` (object | null) — The highest temperature observed. - `c` (number (double)) — Degrees Celsius. - `f` (number (double)) — Degrees Fahrenheit. - `low` (object | null) — The lowest temperature observed. - `c` (number (double)) — Degrees Celsius. - `f` (number (double)) — Degrees Fahrenheit. - `precipitation` (object | null) — The day's precipitation. - `mm` (number (double)) — Millimeters. - `inch` (number (double)) — Inches. - `hourly` (object[] | null) — The day's observations. Filled only for a `?date=` of a day up to the instant. - `time` (string (date-time)) — Observation time. - `temperature` (object) — Air temperature. - `c` (number (double)) — Degrees Celsius. - `f` (number (double)) — Degrees Fahrenheit. - Variant `place` — An entity whose `type` is `place`. - `id` (string) — The entity's stable URL, `https://world.epochal.com//`. - `schema_version` (integer (int64)) — Schema version for this entity type's `properties` layout (`1` for all types). (Minimum: `0`) - `updated_at` (string (date-time)) — When the properties were last refreshed. - `type` (string) — The entity's type. It sets the shape of `properties`. (Constant: `place`) - `properties` (object) — The properties of a place, which is a business or point of interest, as of the instant. - `name` (string) — The place's name. - `category` (string | null) — The main category, as the map labels it, such as `Historical landmark`. It is normally `categories[0]`. `null` when unknown. - `categories` (string[]) — Every category, main one first. - `description` (string | null) — What the place is, in a sentence or two. `null` when unknown. - `summary` (string[]) — A longer account of the place, one paragraph per entry. - `address` (object | null) — The street address. `null` when no part is known. - `formatted` (string | null) — The whole address on one line. - `street` (string | null) — Street and number. - `city` (string | null) — City or town. - `region` (string | null) — State, province, or equivalent. - `postal_code` (string | null) — Postal code. - `country_code` (string | null) — ISO 3166-1 alpha-2 country code. - `location` (object | null) — The place's coordinates. `null` when unknown or out of range. - `lat` (number (double)) — Latitude in degrees, north positive. - `lon` (number (double)) — Longitude in degrees, east positive. - `phone` (string | null) — The phone number, as the map lists it. `null` when unknown. - `website` (string (uri) | null) — The place's own website, a full URL. `null` when unknown. - `opening_hours` (object[]) — Opening hours per weekday, Monday first, in zero to seven rows. - `day` (string) — The weekday. (Known values (open): `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`) - `hours` (string) — The hours as the map writes them, such as `9 am to 12 am`, or `Closed`. - `rating` (object | null) — A summary of the place's reviews. `null` when neither score nor count is known. - `score` (number (double) | null) — The average star rating, 1 to 5. `null` when unknown. - `review_count` (integer (int64) | null) — How many reviews the place has. `null` when unknown. (Minimum: `0`) - `distribution` (object[]) — Reviews per star level, from 1 to 5, ascending. It has exactly five rows, or none when unknown. - `stars` (integer (int64)) — The star level, 1 to 5. (Range: `1` to `5`) - `count` (integer (int64)) — Reviews at that level. (Minimum: `0`) - `status` (object) — Whether the place is open. - `state` (string) — Whether the place is open. (Known values (open): `open`, `temporarily_closed`, `closed`, `removed`) - `detected_at` (string (date-time) | null) — When the map first showed the current non-open state. `null` for an open place or when unknown. ## Responses ### 200 `structured`: extracted markdown and metadata as of `Accept-Datetime`, with the resolved cutoff in `as_of` (pages that could not be read return `status: error` with `page_error`). `page`: the archived document body with its `Content-Type` and `Memento-Datetime` set to `Accept-Datetime` (unreadable pages return an empty body and report the outcome in `x-fetch-status-code` and `x-fetch-status-message`). ```json { "as_of": "2026-03-01T00:00:00Z", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15", "status": "success", "id": "6b81feebde1a4821a125fb307894e7ad", "url": "https://news.example.com/energy/battery-plant-delay", "final_url": "https://news.example.com/energy/battery-plant-delay/", "title": "Battery plant start pushed back to late 2027", "description": "The cell maker said commissioning would slip.", "author": "Jane Doe", "published_at": "2026-02-11T06:12:00Z", "language": "en", "content": "# Battery plant start pushed back to late 2027\n\nThe cell maker said…", "truncated": true, "entity": null } ``` ### 400 The request is invalid. The message names the field. Fix it before retrying. ```json { "error": { "type": "invalid_request", "message": "The request body is invalid.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 401 The x-api-key header is missing, or the key is unknown, revoked or expired. ```json { "error": { "type": "invalid_api_key", "message": "No key matches that token. Check the x-api-key header.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 402 One of: free_quota_exhausted, trial_only, insufficient_credits. ```json { "error": { "type": "free_quota_exhausted", "message": "Your organization has used all its free requests for this API, so retrying will not help. To keep using it, contact sales at https://epochal.com/contact.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 403 One of: organization_suspended, spend_limit_reached, url_not_allowed. ```json { "error": { "type": "organization_suspended", "message": "The organization's billing is suspended. Contact us at https://epochal.com/contact to continue.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 429 Rate limit exceeded for this organization. Wait for the Retry-After interval before retrying. ```json { "error": { "type": "rate_limit_exceeded", "message": "Over the organization's rate limit. Retry after a pause.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 500 Something failed on our side. Not billed. Retry with backoff. ```json { "error": { "type": "internal_error", "message": "Something failed on our side. The request was not billed.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 503 Temporarily unavailable. Not billed. Retry with backoff, waiting for Retry-After when present. ```json { "error": { "type": "service_unavailable", "message": "The service is temporarily unavailable. The request was not billed.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 504 The request did not finish in time. Not billed. Retry with backoff. ```json { "error": { "type": "timeout", "message": "The request did not finish in time. The request was not billed.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` --- # List sandboxes `GET /v1/time-portal/sandbox` — Time Portal Sandbox API List the organization's sandboxes across all states. ## Request samples ### cURL ```bash curl https://api.epochal.com/v1/time-portal/sandbox \ -H "x-api-key: $EPOCHAL_API_KEY" ``` ### Python ```python import os import requests response = requests.get( "https://api.epochal.com/v1/time-portal/sandbox", headers={"x-api-key": os.environ["EPOCHAL_API_KEY"]}, ) response.raise_for_status() print(response.json()) ``` ### JavaScript ```js const response = await fetch("https://api.epochal.com/v1/time-portal/sandbox", { method: "GET", headers: { "x-api-key": process.env.EPOCHAL_API_KEY } }); console.log(await response.json()); ``` ## Query parameters - `state` (string | null, query, optional) — Filter to sandboxes in this state. (One of: `creating` (Accepted and booting); `live` (Booted and accepting requests); `ended` (Terminated, timed out, or idle-expired; files and command output have been deleted); `failed` (Failed to boot; see `error` for the reason)) - `cursor` (string, query, optional) — Pagination cursor from the previous page's `next_cursor`. - `limit` (integer, query, optional) — Maximum number of sandboxes to return (`1` to `100`, default `50`). (Range: `1` to `100`) ## Authorizations - `x-api-key` (string, header, required) — Send your API key in the x-api-key header. Create keys in the console; each belongs to one organization. ## Response fields - `sandboxes` (object[]) — Page of sandboxes. - `id` (string) — Unique sandbox ID. - `state` (string) — Current lifecycle state of the sandbox. (One of: `creating` (Accepted and booting); `live` (Booted and accepting requests); `ended` (Terminated, timed out, or idle-expired; files and command output have been deleted); `failed` (Failed to boot; see `error` for the reason)) - `as_of` (string (date-time)) — Point-in-time cutoff for the sandbox's clock and network, resolved from `Accept-Datetime`. - `network` (string) — Network access mode. (One of: `none` (No outbound network access. DNS does not resolve and all outbound connections are blocked); `time-portal` (Archived web access as of the sandbox's `as_of` via Time Portal, plus time-gated package mirrors. Each web page fetched counts as one Time Portal fetch request)) - `vcpus` (integer) — Reserved virtual CPUs. (Minimum: `0`) - `memory_gib` (integer) — Reserved memory in GiB. (Minimum: `0`) - `timeout` (string) — Maximum lifetime from boot. - `idle_timeout` (string) — Maximum idle duration before automatic termination. - `created_at` (string (date-time)) — Timestamp when sandbox creation was accepted. - `booted_at` (string (date-time) | null) — Timestamp when the sandbox finished booting; metering starts here. (Default: `null`) - `expires_at` (string (date-time) | null) — Latest timestamp when the sandbox will end (`booted_at + timeout`). (Default: `null`) - `ended_at` (string (date-time) | null) — Timestamp when the sandbox ended. (Default: `null`) - `error` (object | null) — Reason the sandbox failed or ended unexpectedly: `lifetime_expired`, `idle_expired`, `out_of_memory`, `sandbox_lost`, `free_quota_exhausted`, `insufficient_credits`, `organization_suspended`, or `spend_limit_reached`. `null` after normal termination. (Default: `null`) - `type` (unknown) — A stable machine-readable code. - `message` (string) — What went wrong, in one sentence. - `request_id` (string | null) — Identifies this request in our logs; quote it when reporting a problem. - `next_seq` (integer (uint64) | null) — On an input `seq` out of order: the `seq` the command expects next. (Minimum: `0`) - `metadata` (object) — Custom labels provided at creation. (Default: `{}`) - `apps` (object[]) — Prebuilt apps mounted in the sandbox. (Default: `[]`) - `name` (string) — App name. - `version` (string) — App version mounted in the sandbox. - `next_cursor` (string | null) — Pass as `cursor` to fetch the next page; omitted on the final page. (Default: `null`) ## Responses ### 200 One page of sandboxes. ```json { "sandboxes": [ { "id": "sbx_7f3k9q2m4x8p1c6w", "state": "live", "as_of": "2026-03-01T00:00:00Z", "network": "time-portal", "vcpus": 1, "memory_gib": 2, "timeout": "1h", "idle_timeout": "10m", "created_at": "2026-11-02T18:04:11Z", "booted_at": "2026-11-02T18:04:14Z", "expires_at": "2026-11-02T19:04:14Z", "ended_at": null, "error": null, "metadata": {}, "apps": [] } ], "next_cursor": null } ``` ### 400 The request is invalid. The message names the field. Fix it before retrying. ```json { "error": { "type": "invalid_request", "message": "The request body is invalid.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 401 The x-api-key header is missing, or the key is unknown, revoked or expired. ```json { "error": { "type": "invalid_api_key", "message": "No key matches that token. Check the x-api-key header.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 402 One of: free_quota_exhausted, trial_only, insufficient_credits. ```json { "error": { "type": "free_quota_exhausted", "message": "Your organization has used all its free requests for this API, so retrying will not help. To keep using it, contact sales at https://epochal.com/contact.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 403 One of: organization_suspended, spend_limit_reached. ```json { "error": { "type": "organization_suspended", "message": "The organization's billing is suspended. Contact us at https://epochal.com/contact to continue.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 429 Rate limit exceeded for this organization. Wait for the Retry-After interval before retrying. ```json { "error": { "type": "rate_limit_exceeded", "message": "Over the organization's rate limit. Retry after a pause.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 500 Something failed on our side. Not billed. Retry with backoff. ```json { "error": { "type": "internal_error", "message": "Something failed on our side. The request was not billed.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 503 Temporarily unavailable. Not billed. Retry with backoff, waiting for Retry-After when present. ```json { "error": { "type": "service_unavailable", "message": "The service is temporarily unavailable. The request was not billed.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 504 The request did not finish in time. Not billed. Retry with backoff. ```json { "error": { "type": "timeout", "message": "The request did not finish in time. The request was not billed.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` --- # Create a sandbox `POST /v1/time-portal/sandbox` — Time Portal Sandbox API Create and boot a Linux sandbox gated to `Accept-Datetime`. The sandbox starts in the `creating` state and becomes `live` once it is ready to run commands. ## Request samples ### cURL ```bash curl https://api.epochal.com/v1/time-portal/sandbox \ -H "x-api-key: $EPOCHAL_API_KEY" \ -H "Accept-Datetime: 2026-03-01T00:00:00Z" \ -H "Content-Type: application/json" \ -d '{ "network": "time-portal", "vcpus": 1, "memory_gib": 2, "timeout": "1h" }' ``` ### Python ```python import os import requests response = requests.post( "https://api.epochal.com/v1/time-portal/sandbox", headers={"x-api-key": os.environ["EPOCHAL_API_KEY"], "Accept-Datetime": "2026-03-01T00:00:00Z"}, json={ "network": "time-portal", "vcpus": 1, "memory_gib": 2, "timeout": "1h" }, ) response.raise_for_status() print(response.json()) ``` ### JavaScript ```js const response = await fetch("https://api.epochal.com/v1/time-portal/sandbox", { method: "POST", headers: { "x-api-key": process.env.EPOCHAL_API_KEY, "Accept-Datetime": "2026-03-01T00:00:00Z", "Content-Type": "application/json" }, body: JSON.stringify({ "network": "time-portal", "vcpus": 1, "memory_gib": 2, "timeout": "1h" }) }); console.log(await response.json()); ``` ## Authorizations - `x-api-key` (string, header, required) — Send your API key in the x-api-key header. Create keys in the console; each belongs to one organization. ## Headers - `Accept-Datetime` (string, header, required) — Point-in-time cutoff for the request: a past RFC 3339 timestamp, ISO 8601 date/time, or HTTP-date at or after `2023-04-01T00:00:00Z`. Nothing published or captured after this time is included. - `Idempotency-Key` (string, header, optional) — Unique request identifier; retrying with the same key returns the same sandbox. Reusing a key with a different body returns `409`. ## Body - `network` (string, body, optional) — Network access mode: `time-portal` enables archived web access and time-gated package mirrors, and `none` disables outbound network access. (One of: `none` (No outbound network access. DNS does not resolve and all outbound connections are blocked); `time-portal` (Archived web access as of the sandbox's `as_of` via Time Portal, plus time-gated package mirrors. Each web page fetched counts as one Time Portal fetch request); Default: `"none"`) - `vcpus` (integer, body, optional) — Virtual CPUs reserved for the sandbox: 1, 2, 4, 8, or 16. (Minimum: `1`; Default: `1`) - `memory_gib` (integer, body, optional) — Memory reserved for the sandbox, in GiB: 1, 2, 4, 8, 16, 32, or 64 (at most 8 GiB per vCPU). (Minimum: `1`; Default: `2`) - `timeout` (string, body, optional) — Maximum sandbox lifetime after boot, from `1m` to `24h`. Cannot be extended. (Default: `"1h"`) - `idle_timeout` (string | null, body, optional) — Ends the sandbox after this duration with no running command and no exec, input, file write, or file delete request (reads and polls do not reset the timer). From `1m` to `timeout`; defaults to `10m` or `timeout`, whichever is shorter. - `env` (object, body, optional) — Environment variables available to every command run in the sandbox (at most 128 variables and 32 KiB total). - `metadata` (object, body, optional) — Custom key-value labels attached to the sandbox (at most 16 pairs). - `apps` (string[], body, optional) — Prebuilt apps mounted read-only at `/opt/epochal/bin`, by name (at most 8). Each app is a current build rather than one from `as_of`, so a sandbox that uses apps is not strictly gated to its timestamp. ## Response fields - `id` (string) — Unique sandbox ID. - `state` (string) — Current lifecycle state of the sandbox. (One of: `creating` (Accepted and booting); `live` (Booted and accepting requests); `ended` (Terminated, timed out, or idle-expired; files and command output have been deleted); `failed` (Failed to boot; see `error` for the reason)) - `as_of` (string (date-time)) — Point-in-time cutoff for the sandbox's clock and network, resolved from `Accept-Datetime`. - `network` (string) — Network access mode. (One of: `none` (No outbound network access. DNS does not resolve and all outbound connections are blocked); `time-portal` (Archived web access as of the sandbox's `as_of` via Time Portal, plus time-gated package mirrors. Each web page fetched counts as one Time Portal fetch request)) - `vcpus` (integer) — Reserved virtual CPUs. (Minimum: `0`) - `memory_gib` (integer) — Reserved memory in GiB. (Minimum: `0`) - `timeout` (string) — Maximum lifetime from boot. - `idle_timeout` (string) — Maximum idle duration before automatic termination. - `created_at` (string (date-time)) — Timestamp when sandbox creation was accepted. - `booted_at` (string (date-time) | null) — Timestamp when the sandbox finished booting; metering starts here. (Default: `null`) - `expires_at` (string (date-time) | null) — Latest timestamp when the sandbox will end (`booted_at + timeout`). (Default: `null`) - `ended_at` (string (date-time) | null) — Timestamp when the sandbox ended. (Default: `null`) - `error` (object | null) — Reason the sandbox failed or ended unexpectedly: `lifetime_expired`, `idle_expired`, `out_of_memory`, `sandbox_lost`, `free_quota_exhausted`, `insufficient_credits`, `organization_suspended`, or `spend_limit_reached`. `null` after normal termination. (Default: `null`) - `type` (unknown) — A stable machine-readable code. - `message` (string) — What went wrong, in one sentence. - `request_id` (string | null) — Identifies this request in our logs; quote it when reporting a problem. - `next_seq` (integer (uint64) | null) — On an input `seq` out of order: the `seq` the command expects next. (Minimum: `0`) - `metadata` (object) — Custom labels provided at creation. (Default: `{}`) - `apps` (object[]) — Prebuilt apps mounted in the sandbox. (Default: `[]`) - `name` (string) — App name. - `version` (string) — App version mounted in the sandbox. ## Responses ### 202 The accepted sandbox. ```json { "id": "sbx_7f3k9q2m4x8p1c6w", "state": "creating", "as_of": "2026-03-01T00:00:00Z", "network": "time-portal", "vcpus": 1, "memory_gib": 2, "timeout": "1h", "idle_timeout": "10m", "created_at": "2026-11-02T18:04:11Z", "booted_at": null, "expires_at": null, "ended_at": null, "error": null, "metadata": {}, "apps": [] } ``` ### 400 The request is invalid. The message names the field. Fix it before retrying. ```json { "error": { "type": "invalid_request", "message": "The request body is invalid.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 401 The x-api-key header is missing, or the key is unknown, revoked or expired. ```json { "error": { "type": "invalid_api_key", "message": "No key matches that token. Check the x-api-key header.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 402 One of: free_quota_exhausted, trial_only, insufficient_credits. ```json { "error": { "type": "free_quota_exhausted", "message": "Your organization has used all its free requests for this API, so retrying will not help. To keep using it, contact sales at https://epochal.com/contact.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 403 One of: organization_suspended, spend_limit_reached. ```json { "error": { "type": "organization_suspended", "message": "The organization's billing is suspended. Contact us at https://epochal.com/contact to continue.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 409 An `Idempotency-Key` was reused with a different request body. ```json { "error": { "type": "conflict", "message": "Idempotency-Key was already used with a different request body.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 429 Rate limit exceeded for this organization. Wait for the Retry-After interval before retrying. ```json { "error": { "type": "rate_limit_exceeded", "message": "Over the organization's rate limit. Retry after a pause.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 500 Something failed on our side. Not billed. Retry with backoff. ```json { "error": { "type": "internal_error", "message": "Something failed on our side. The request was not billed.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 503 Temporarily unavailable. Not billed. Retry with backoff, waiting for Retry-After when present. ```json { "error": { "type": "service_unavailable", "message": "The service is temporarily unavailable. The request was not billed.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 504 The request did not finish in time. Not billed. Retry with backoff. ```json { "error": { "type": "timeout", "message": "The request did not finish in time. The request was not billed.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` --- # Get a sandbox `GET /v1/time-portal/sandbox/{id}` — Time Portal Sandbox API Retrieve a sandbox by ID. When `wait` is set and `state` is `creating`, the request waits until the sandbox becomes `live` or `failed`. Sandboxes in any other state return immediately. ## Request samples ### cURL ```bash curl https://api.epochal.com/v1/time-portal/sandbox/sbx_7f3k9q2m4x8p1c6w \ -H "x-api-key: $EPOCHAL_API_KEY" ``` ### Python ```python import os import requests response = requests.get( "https://api.epochal.com/v1/time-portal/sandbox/sbx_7f3k9q2m4x8p1c6w", headers={"x-api-key": os.environ["EPOCHAL_API_KEY"]}, ) response.raise_for_status() print(response.json()) ``` ### JavaScript ```js const response = await fetch("https://api.epochal.com/v1/time-portal/sandbox/sbx_7f3k9q2m4x8p1c6w", { method: "GET", headers: { "x-api-key": process.env.EPOCHAL_API_KEY } }); console.log(await response.json()); ``` ## Path parameters - `id` (string, path, required) — Unique sandbox ID. ## Query parameters - `wait` (string, query, optional) — Maximum duration to hold the request while the sandbox is `creating` (capped at `55s`). Returns immediately when unset. ## Authorizations - `x-api-key` (string, header, required) — Send your API key in the x-api-key header. Create keys in the console; each belongs to one organization. ## Response fields - `id` (string) — Unique sandbox ID. - `state` (string) — Current lifecycle state of the sandbox. (One of: `creating` (Accepted and booting); `live` (Booted and accepting requests); `ended` (Terminated, timed out, or idle-expired; files and command output have been deleted); `failed` (Failed to boot; see `error` for the reason)) - `as_of` (string (date-time)) — Point-in-time cutoff for the sandbox's clock and network, resolved from `Accept-Datetime`. - `network` (string) — Network access mode. (One of: `none` (No outbound network access. DNS does not resolve and all outbound connections are blocked); `time-portal` (Archived web access as of the sandbox's `as_of` via Time Portal, plus time-gated package mirrors. Each web page fetched counts as one Time Portal fetch request)) - `vcpus` (integer) — Reserved virtual CPUs. (Minimum: `0`) - `memory_gib` (integer) — Reserved memory in GiB. (Minimum: `0`) - `timeout` (string) — Maximum lifetime from boot. - `idle_timeout` (string) — Maximum idle duration before automatic termination. - `created_at` (string (date-time)) — Timestamp when sandbox creation was accepted. - `booted_at` (string (date-time) | null) — Timestamp when the sandbox finished booting; metering starts here. (Default: `null`) - `expires_at` (string (date-time) | null) — Latest timestamp when the sandbox will end (`booted_at + timeout`). (Default: `null`) - `ended_at` (string (date-time) | null) — Timestamp when the sandbox ended. (Default: `null`) - `error` (object | null) — Reason the sandbox failed or ended unexpectedly: `lifetime_expired`, `idle_expired`, `out_of_memory`, `sandbox_lost`, `free_quota_exhausted`, `insufficient_credits`, `organization_suspended`, or `spend_limit_reached`. `null` after normal termination. (Default: `null`) - `type` (unknown) — A stable machine-readable code. - `message` (string) — What went wrong, in one sentence. - `request_id` (string | null) — Identifies this request in our logs; quote it when reporting a problem. - `next_seq` (integer (uint64) | null) — On an input `seq` out of order: the `seq` the command expects next. (Minimum: `0`) - `metadata` (object) — Custom labels provided at creation. (Default: `{}`) - `apps` (object[]) — Prebuilt apps mounted in the sandbox. (Default: `[]`) - `name` (string) — App name. - `version` (string) — App version mounted in the sandbox. ## Responses ### 200 The sandbox. ```json { "id": "sbx_7f3k9q2m4x8p1c6w", "state": "live", "as_of": "2026-03-01T00:00:00Z", "network": "time-portal", "vcpus": 1, "memory_gib": 2, "timeout": "1h", "idle_timeout": "10m", "created_at": "2026-11-02T18:04:11Z", "booted_at": "2026-11-02T18:04:14Z", "expires_at": "2026-11-02T19:04:14Z", "ended_at": null, "error": null, "metadata": {}, "apps": [] } ``` ### 400 The request is invalid. The message names the field. Fix it before retrying. ```json { "error": { "type": "invalid_request", "message": "The request body is invalid.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 401 The x-api-key header is missing, or the key is unknown, revoked or expired. ```json { "error": { "type": "invalid_api_key", "message": "No key matches that token. Check the x-api-key header.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 402 One of: free_quota_exhausted, trial_only, insufficient_credits. ```json { "error": { "type": "free_quota_exhausted", "message": "Your organization has used all its free requests for this API, so retrying will not help. To keep using it, contact sales at https://epochal.com/contact.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 403 One of: organization_suspended, spend_limit_reached. ```json { "error": { "type": "organization_suspended", "message": "The organization's billing is suspended. Contact us at https://epochal.com/contact to continue.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 404 No matching resource was found, or the resource belongs to another organization. ```json { "error": { "type": "not_found", "message": "Nothing is served at that path.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 429 Rate limit exceeded for this organization. Wait for the Retry-After interval before retrying. ```json { "error": { "type": "rate_limit_exceeded", "message": "Over the organization's rate limit. Retry after a pause.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 500 Something failed on our side. Not billed. Retry with backoff. ```json { "error": { "type": "internal_error", "message": "Something failed on our side. The request was not billed.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 503 Temporarily unavailable. Not billed. Retry with backoff, waiting for Retry-After when present. ```json { "error": { "type": "service_unavailable", "message": "The service is temporarily unavailable. The request was not billed.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 504 The request did not finish in time. Not billed. Retry with backoff. ```json { "error": { "type": "timeout", "message": "The request did not finish in time. The request was not billed.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` --- # Terminate a sandbox `DELETE /v1/time-portal/sandbox/{id}` — Time Portal Sandbox API Terminate the sandbox immediately. Its files and command output are permanently deleted, and usage metering stops. Terminating an already-ended sandbox succeeds. ## Request samples ### cURL ```bash curl https://api.epochal.com/v1/time-portal/sandbox/sbx_7f3k9q2m4x8p1c6w \ -X DELETE \ -H "x-api-key: $EPOCHAL_API_KEY" ``` ### Python ```python import os import requests response = requests.delete( "https://api.epochal.com/v1/time-portal/sandbox/sbx_7f3k9q2m4x8p1c6w", headers={"x-api-key": os.environ["EPOCHAL_API_KEY"]}, ) response.raise_for_status() ``` ### JavaScript ```js const response = await fetch("https://api.epochal.com/v1/time-portal/sandbox/sbx_7f3k9q2m4x8p1c6w", { method: "DELETE", headers: { "x-api-key": process.env.EPOCHAL_API_KEY } }); console.log(response.status); ``` ## Path parameters - `id` (string, path, required) — Unique sandbox ID. ## Authorizations - `x-api-key` (string, header, required) — Send your API key in the x-api-key header. Create keys in the console; each belongs to one organization. ## Responses ### 204 Terminated. ```json ``` ### 400 The request is invalid. The message names the field. Fix it before retrying. ```json { "error": { "type": "invalid_request", "message": "The request body is invalid.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 401 The x-api-key header is missing, or the key is unknown, revoked or expired. ```json { "error": { "type": "invalid_api_key", "message": "No key matches that token. Check the x-api-key header.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 402 One of: free_quota_exhausted, trial_only, insufficient_credits. ```json { "error": { "type": "free_quota_exhausted", "message": "Your organization has used all its free requests for this API, so retrying will not help. To keep using it, contact sales at https://epochal.com/contact.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 403 One of: organization_suspended, spend_limit_reached. ```json { "error": { "type": "organization_suspended", "message": "The organization's billing is suspended. Contact us at https://epochal.com/contact to continue.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 404 No matching resource was found, or the resource belongs to another organization. ```json { "error": { "type": "not_found", "message": "Nothing is served at that path.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 429 Rate limit exceeded for this organization. Wait for the Retry-After interval before retrying. ```json { "error": { "type": "rate_limit_exceeded", "message": "Over the organization's rate limit. Retry after a pause.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 500 Something failed on our side. Not billed. Retry with backoff. ```json { "error": { "type": "internal_error", "message": "Something failed on our side. The request was not billed.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 503 Temporarily unavailable. Not billed. Retry with backoff, waiting for Retry-After when present. ```json { "error": { "type": "service_unavailable", "message": "The service is temporarily unavailable. The request was not billed.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 504 The request did not finish in time. Not billed. Retry with backoff. ```json { "error": { "type": "timeout", "message": "The request did not finish in time. The request was not billed.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` --- # Run a command `POST /v1/time-portal/sandbox/{id}/execs` — Time Portal Sandbox API Start a command asynchronously in a `live` sandbox. Returns the command `id` immediately, and you can read output and exit status from the output endpoint. Commands run as `root` in the image's `HOME`. Multiple commands can run concurrently, and an active command resets `idle_timeout`. Send an `Idempotency-Key` header to make retries safe. ## Request samples ### cURL ```bash curl https://api.epochal.com/v1/time-portal/sandbox/sbx_7f3k9q2m4x8p1c6w/execs \ -H "x-api-key: $EPOCHAL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "argv": [ "python3", "-c", "import datetime; print(datetime.date.today())" ] }' ``` ### Python ```python import os import requests response = requests.post( "https://api.epochal.com/v1/time-portal/sandbox/sbx_7f3k9q2m4x8p1c6w/execs", headers={"x-api-key": os.environ["EPOCHAL_API_KEY"]}, json={ "argv": [ "python3", "-c", "import datetime; print(datetime.date.today())" ] }, ) response.raise_for_status() print(response.json()) ``` ### JavaScript ```js const response = await fetch("https://api.epochal.com/v1/time-portal/sandbox/sbx_7f3k9q2m4x8p1c6w/execs", { method: "POST", headers: { "x-api-key": process.env.EPOCHAL_API_KEY, "Content-Type": "application/json" }, body: JSON.stringify({ "argv": [ "python3", "-c", "import datetime; print(datetime.date.today())" ] }) }); console.log(await response.json()); ``` ## Path parameters - `id` (string, path, required) — Unique sandbox ID. ## Authorizations - `x-api-key` (string, header, required) — Send your API key in the x-api-key header. Create keys in the console; each belongs to one organization. ## Headers - `Idempotency-Key` (string, header, optional) — Unique request identifier; retrying with the same key returns the same command. Reusing a key with a different body returns `409`. ## Body - `argv` (string[], body, required) — Program and arguments (executed directly without a shell, using `PATH`; up to 1,024 entries and 128 KiB total). A missing program exits with code 127 rather than returning an HTTP error. - `env` (object, body, optional) — Environment variables added to the sandbox environment for this command (up to 128 variables and 32 KiB total). - `cwd` (string | null, body, optional) — Working directory for the command; defaults to the image's `HOME`. A missing directory exits with code 2. - `timeout` (string | null, body, optional) — Terminate the command after this duration (up to `24h`, default `1h`). - `stdin_b64` (string, body, optional) — Initial bytes written to stdin, base64-encoded (up to 1 MiB decoded). Upload larger inputs as a file. - `stdin_open` (boolean, body, optional) — Keep stdin open after `stdin_b64` for subsequent `input` requests; closed immediately if `false`. ## Response fields - `id` (string) — Command ID within the sandbox. ## Responses ### 200 The started command. ```json { "id": "exec_m3p8x2k7" } ``` ### 400 The request is invalid. The message names the field. Fix it before retrying. ```json { "error": { "type": "invalid_request", "message": "The request body is invalid.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 401 The x-api-key header is missing, or the key is unknown, revoked or expired. ```json { "error": { "type": "invalid_api_key", "message": "No key matches that token. Check the x-api-key header.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 402 One of: free_quota_exhausted, trial_only, insufficient_credits. ```json { "error": { "type": "free_quota_exhausted", "message": "Your organization has used all its free requests for this API, so retrying will not help. To keep using it, contact sales at https://epochal.com/contact.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 403 One of: organization_suspended, spend_limit_reached. ```json { "error": { "type": "organization_suspended", "message": "The organization's billing is suspended. Contact us at https://epochal.com/contact to continue.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 404 No matching resource was found, or the resource belongs to another organization. ```json { "error": { "type": "not_found", "message": "Nothing is served at that path.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 409 The sandbox is not `live`: it is still starting (wait until its state is `live` before retrying), or it has already ended (it cannot be restarted). Also returned when an `Idempotency-Key` was reused with a different request body, or when a keyed command may already have started (check the sandbox, or retry with a new key). ```json { "error": { "type": "conflict", "message": "The sandbox is still starting.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 429 Rate limit exceeded for this organization. Wait for the Retry-After interval before retrying. ```json { "error": { "type": "rate_limit_exceeded", "message": "Over the organization's rate limit. Retry after a pause.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 500 Something failed on our side. Not billed. Retry with backoff. ```json { "error": { "type": "internal_error", "message": "Something failed on our side. The request was not billed.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 503 Temporarily unavailable. Not billed. Retry with backoff, waiting for Retry-After when present. ```json { "error": { "type": "service_unavailable", "message": "The service is temporarily unavailable. The request was not billed.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 504 The request did not finish in time. Not billed. Retry with backoff. ```json { "error": { "type": "timeout", "message": "The request did not finish in time. The request was not billed.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` --- # Read a command's output `GET /v1/time-portal/sandbox/{id}/execs/{exec_id}/output` — Time Portal Sandbox API Read stdout and stderr frames from the given byte offsets, along with `exit` once the command finishes. When `wait` is set, the request waits until new output arrives or the command exits. Keep polling from the updated offsets until `exit` is present. Output is retained only while the sandbox is `live` and returns `409` after it ends. ## Request samples ### cURL ```bash curl https://api.epochal.com/v1/time-portal/sandbox/sbx_7f3k9q2m4x8p1c6w/execs/exec_m3p8x2k7/output \ -H "x-api-key: $EPOCHAL_API_KEY" ``` ### Python ```python import os import requests response = requests.get( "https://api.epochal.com/v1/time-portal/sandbox/sbx_7f3k9q2m4x8p1c6w/execs/exec_m3p8x2k7/output", headers={"x-api-key": os.environ["EPOCHAL_API_KEY"]}, ) response.raise_for_status() print(response.json()) ``` ### JavaScript ```js const response = await fetch("https://api.epochal.com/v1/time-portal/sandbox/sbx_7f3k9q2m4x8p1c6w/execs/exec_m3p8x2k7/output", { method: "GET", headers: { "x-api-key": process.env.EPOCHAL_API_KEY } }); console.log(await response.json()); ``` ## Path parameters - `id` (string, path, required) — Unique sandbox ID. - `exec_id` (string, path, required) — Command ID returned when the command was started. ## Query parameters - `stdout_offset` (integer, query, optional) — First stdout byte offset to read (the end of what was already read). (Minimum: `0`; Default: `0`) - `stderr_offset` (integer, query, optional) — First stderr byte offset to read. (Minimum: `0`; Default: `0`) - `wait` (string, query, optional) — Maximum duration to hold the request until new output arrives or the command exits (capped at `55s`). Returns immediately when unset. - `max_bytes` (integer, query, optional) — Maximum output bytes to return across both streams (up to 4 MiB, which is also the default). (Range: `1` to `4194304`) ## Authorizations - `x-api-key` (string, header, required) — Send your API key in the x-api-key header. Create keys in the console; each belongs to one organization. ## Response fields - `frames` (object[]) — Output in stream order; empty when `wait` passed with none. - `stream` (unknown) — Stream the bytes came from (`stdout` or `stderr`). - `offset` (integer) — Byte offset of the first byte in this stream. (Minimum: `0`) - `data_b64` (string) — Base64-encoded output bytes. - `exit` (object | null) — Set once the command has ended and every frame up to its end is in `frames`; until then, call again from the end of each stream's last frame. - Variant `exited` — Command exited with `code`. - `reason` (string) — (Constant: `exited`) - `code` (integer) — Exit status code. - Variant `signaled` — Command was terminated by a signal. - `reason` (string) — (Constant: `signaled`) - `signal` (integer) — POSIX signal number. - Variant `out_of_memory` — Command exceeded the sandbox's available memory. - `reason` (string) — (Constant: `out_of_memory`) - Variant `timeout` — Command exceeded its `timeout`. - `reason` (string) — (Constant: `timeout`) - Variant `sandbox_ended` — Sandbox ended while the command was running. - `reason` (string) — (Constant: `sandbox_ended`) - Variant `lost` — Sandbox stopped reporting command status. - `reason` (string) — (Constant: `lost`) ## Responses ### 200 Output frames, and the exit status if finished. ```json { "frames": [ { "stream": "stdout", "offset": 0, "data_b64": "MjAyNi0wMy0wMQo=" } ], "exit": { "reason": "exited", "code": 0 } } ``` ### 400 The request is invalid. The message names the field. Fix it before retrying. ```json { "error": { "type": "invalid_request", "message": "The request body is invalid.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 401 The x-api-key header is missing, or the key is unknown, revoked or expired. ```json { "error": { "type": "invalid_api_key", "message": "No key matches that token. Check the x-api-key header.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 402 One of: free_quota_exhausted, trial_only, insufficient_credits. ```json { "error": { "type": "free_quota_exhausted", "message": "Your organization has used all its free requests for this API, so retrying will not help. To keep using it, contact sales at https://epochal.com/contact.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 403 One of: organization_suspended, spend_limit_reached. ```json { "error": { "type": "organization_suspended", "message": "The organization's billing is suspended. Contact us at https://epochal.com/contact to continue.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 404 No matching resource was found, or the resource belongs to another organization. ```json { "error": { "type": "not_found", "message": "Nothing is served at that path.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 409 The sandbox is not `live`: it is still starting (wait until its state is `live` before retrying), or it has already ended (it cannot be restarted). ```json { "error": { "type": "conflict", "message": "The sandbox is still starting.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 429 Rate limit exceeded for this organization. Wait for the Retry-After interval before retrying. ```json { "error": { "type": "rate_limit_exceeded", "message": "Over the organization's rate limit. Retry after a pause.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 500 Something failed on our side. Not billed. Retry with backoff. ```json { "error": { "type": "internal_error", "message": "Something failed on our side. The request was not billed.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 503 Temporarily unavailable. Not billed. Retry with backoff, waiting for Retry-After when present. ```json { "error": { "type": "service_unavailable", "message": "The service is temporarily unavailable. The request was not billed.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 504 The request did not finish in time. Not billed. Retry with backoff. ```json { "error": { "type": "timeout", "message": "The request did not finish in time. The request was not billed.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` --- # Write to a command `POST /v1/time-portal/sandbox/{id}/execs/{exec_id}/input` — Time Portal Sandbox API Send stdin bytes, close stdin (`eof`), or send a signal to a running command. Use `seq` starting from `0` to order input requests safely across retries. Stdin closes immediately after `stdin_b64` unless `stdin_open` was enabled when starting the command. Returns `409` if the command has already exited. ## Request samples ### cURL ```bash curl https://api.epochal.com/v1/time-portal/sandbox/sbx_7f3k9q2m4x8p1c6w/execs/exec_m3p8x2k7/input \ -H "x-api-key: $EPOCHAL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "seq": 0, "eof": true }' ``` ### Python ```python import os import requests response = requests.post( "https://api.epochal.com/v1/time-portal/sandbox/sbx_7f3k9q2m4x8p1c6w/execs/exec_m3p8x2k7/input", headers={"x-api-key": os.environ["EPOCHAL_API_KEY"]}, json={ "seq": 0, "eof": true }, ) response.raise_for_status() print(response.json()) ``` ### JavaScript ```js const response = await fetch("https://api.epochal.com/v1/time-portal/sandbox/sbx_7f3k9q2m4x8p1c6w/execs/exec_m3p8x2k7/input", { method: "POST", headers: { "x-api-key": process.env.EPOCHAL_API_KEY, "Content-Type": "application/json" }, body: JSON.stringify({ "seq": 0, "eof": true }) }); console.log(await response.json()); ``` ## Path parameters - `id` (string, path, required) — Unique sandbox ID. - `exec_id` (string, path, required) — Command ID returned when the command was started. ## Authorizations - `x-api-key` (string, header, required) — Send your API key in the x-api-key header. Create keys in the console; each belongs to one organization. ## Body - `seq` (integer, body, required) — This call's place in the command's input sequence, from 0. (Minimum: `0`) - `data_b64` (string | null, body, optional) — Bytes for stdin, base64; at most 1 MiB decoded. Upload larger inputs as a file. - `eof` (boolean | null, body, optional) — Close stdin. (One of: `true`, `null`) - `signal` (integer (int32) | null, body, optional) — Send this signal number to the command, e.g. 15 for SIGTERM. ## Response fields - `next_seq` (integer) — The `seq` the next call must carry. (Minimum: `0`) ## Responses ### 200 The next expected `seq`. ```json { "next_seq": 1 } ``` ### 400 The request is invalid. The message names the field. Fix it before retrying. ```json { "error": { "type": "invalid_request", "message": "The request body is invalid.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 401 The x-api-key header is missing, or the key is unknown, revoked or expired. ```json { "error": { "type": "invalid_api_key", "message": "No key matches that token. Check the x-api-key header.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 402 One of: free_quota_exhausted, trial_only, insufficient_credits. ```json { "error": { "type": "free_quota_exhausted", "message": "Your organization has used all its free requests for this API, so retrying will not help. To keep using it, contact sales at https://epochal.com/contact.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 403 One of: organization_suspended, spend_limit_reached. ```json { "error": { "type": "organization_suspended", "message": "The organization's billing is suspended. Contact us at https://epochal.com/contact to continue.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 404 No matching resource was found, or the resource belongs to another organization. ```json { "error": { "type": "not_found", "message": "Nothing is served at that path.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 409 The sandbox is not `live`: it is still starting (wait until its state is `live` before retrying), or it has already ended (it cannot be restarted). Also returned when the command has already exited, its stdin is closed, or `seq` is out of order (`next_seq` gives the expected value). ```json { "error": { "type": "conflict", "message": "The command has exited.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 429 Rate limit exceeded for this organization. Wait for the Retry-After interval before retrying. ```json { "error": { "type": "rate_limit_exceeded", "message": "Over the organization's rate limit. Retry after a pause.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 500 Something failed on our side. Not billed. Retry with backoff. ```json { "error": { "type": "internal_error", "message": "Something failed on our side. The request was not billed.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 503 Temporarily unavailable. Not billed. Retry with backoff, waiting for Retry-After when present. ```json { "error": { "type": "service_unavailable", "message": "The service is temporarily unavailable. The request was not billed.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 504 The request did not finish in time. Not billed. Retry with backoff. ```json { "error": { "type": "timeout", "message": "The request did not finish in time. The request was not billed.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` --- # Read a file `GET /v1/time-portal/sandbox/{id}/files` — Time Portal Sandbox API Read a byte range of a file. Returns `206` with `Content-Range: bytes -/` clamped to the file length; `200` for an empty file; and `416` with `Content-Range: bytes */` when the range starts past the end. `bytes=-` reads up to 16 MiB from `first`. ## Request samples ### cURL ```bash curl "https://api.epochal.com/v1/time-portal/sandbox/sbx_7f3k9q2m4x8p1c6w/files?path=%2Fhome%2Fepochal%2Fout%2Fresult.csv" \ -H "x-api-key: $EPOCHAL_API_KEY" ``` ### Python ```python import os import requests response = requests.get( "https://api.epochal.com/v1/time-portal/sandbox/sbx_7f3k9q2m4x8p1c6w/files?path=%2Fhome%2Fepochal%2Fout%2Fresult.csv", headers={"x-api-key": os.environ["EPOCHAL_API_KEY"]}, ) response.raise_for_status() print(response.content) ``` ### JavaScript ```js const response = await fetch("https://api.epochal.com/v1/time-portal/sandbox/sbx_7f3k9q2m4x8p1c6w/files?path=%2Fhome%2Fepochal%2Fout%2Fresult.csv", { method: "GET", headers: { "x-api-key": process.env.EPOCHAL_API_KEY } }); console.log(new Uint8Array(await response.arrayBuffer())); ``` ## Path parameters - `id` (string, path, required) — Unique sandbox ID. ## Query parameters - `path` (string, query, required) — Absolute path inside the sandbox. ## Authorizations - `x-api-key` (string, header, required) — Send your API key in the x-api-key header. Create keys in the console; each belongs to one organization. ## Headers - `Range` (string, header, optional) — Byte range to read (`bytes=-` or `bytes=-`), up to 64 MiB; defaults to the first 16 MiB. Suffix and multi-range headers return `400`. ## Responses ### 200 The file is empty: no bytes. ```json ``` ### 206 The bytes, with `Content-Range: bytes -/`. ```json ``` ### 400 The request is invalid. The message names the field. Fix it before retrying. ```json { "error": { "type": "invalid_request", "message": "The request body is invalid.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 401 The x-api-key header is missing, or the key is unknown, revoked or expired. ```json { "error": { "type": "invalid_api_key", "message": "No key matches that token. Check the x-api-key header.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 402 One of: free_quota_exhausted, trial_only, insufficient_credits. ```json { "error": { "type": "free_quota_exhausted", "message": "Your organization has used all its free requests for this API, so retrying will not help. To keep using it, contact sales at https://epochal.com/contact.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 403 One of: organization_suspended, spend_limit_reached. ```json { "error": { "type": "organization_suspended", "message": "The organization's billing is suspended. Contact us at https://epochal.com/contact to continue.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 404 No matching resource was found, or the resource belongs to another organization. ```json { "error": { "type": "not_found", "message": "Nothing is served at that path.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 409 The sandbox is not `live`: it is still starting (wait until its state is `live` before retrying), or it has already ended (it cannot be restarted). ```json { "error": { "type": "conflict", "message": "The sandbox is still starting.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 416 The range starts past the end of the file: `Content-Range: bytes */` and no body. ```json ``` ### 429 Rate limit exceeded for this organization. Wait for the Retry-After interval before retrying. ```json { "error": { "type": "rate_limit_exceeded", "message": "Over the organization's rate limit. Retry after a pause.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 500 Something failed on our side. Not billed. Retry with backoff. ```json { "error": { "type": "internal_error", "message": "Something failed on our side. The request was not billed.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 503 Temporarily unavailable. Not billed. Retry with backoff, waiting for Retry-After when present. ```json { "error": { "type": "service_unavailable", "message": "The service is temporarily unavailable. The request was not billed.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 504 The request did not finish in time. Not billed. Retry with backoff. ```json { "error": { "type": "timeout", "message": "The request did not finish in time. The request was not billed.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` --- # Write a file `PUT /v1/time-portal/sandbox/{id}/files` — Time Portal Sandbox API Write up to 8 MiB at `offset`, creating any missing parent directories. Writing at offset 0 replaces the file, while a non-zero offset writes at that byte position so larger files can be uploaded in chunks. ## Request samples ### cURL ```bash curl "https://api.epochal.com/v1/time-portal/sandbox/sbx_7f3k9q2m4x8p1c6w/files?path=%2Fhome%2Fepochal%2Fout%2Fresult.csv" \ -X PUT \ -H "x-api-key: $EPOCHAL_API_KEY" \ -H "Content-Type: application/octet-stream" \ --data-binary @data.bin ``` ### Python ```python import os import requests response = requests.put( "https://api.epochal.com/v1/time-portal/sandbox/sbx_7f3k9q2m4x8p1c6w/files?path=%2Fhome%2Fepochal%2Fout%2Fresult.csv", headers={"x-api-key": os.environ["EPOCHAL_API_KEY"], "Content-Type": "application/octet-stream"}, data=open("data.bin", "rb"), ) response.raise_for_status() print(response.json()) ``` ### JavaScript ```js import { readFile } from "node:fs/promises"; const response = await fetch("https://api.epochal.com/v1/time-portal/sandbox/sbx_7f3k9q2m4x8p1c6w/files?path=%2Fhome%2Fepochal%2Fout%2Fresult.csv", { method: "PUT", headers: { "x-api-key": process.env.EPOCHAL_API_KEY, "Content-Type": "application/octet-stream" }, body: await readFile("data.bin") }); console.log(await response.json()); ``` ## Path parameters - `id` (string, path, required) — Unique sandbox ID. ## Query parameters - `path` (string, query, required) — Absolute path inside the sandbox; missing parent directories are created automatically. - `offset` (integer, query, optional) — Byte offset at which to write the request body. (Minimum: `0`; Default: `0`) ## Authorizations - `x-api-key` (string, header, required) — Send your API key in the x-api-key header. Create keys in the console; each belongs to one organization. ## Response fields - `path` (string) — Its absolute path; in a directory listing, its path relative to the listed directory. - `type` (unknown) — What kind of file it is. - `size` (integer) — Its size in bytes. (Minimum: `0`) - `mode` (integer) — Its permission bits, e.g. 420 for `0644`. (Minimum: `0`) - `mtime` (string (date-time) | null) — Last modification timestamp according to the sandbox's clock. (Default: `null`) - `link_target` (string | null) — Symlink target path, when `type` is `symlink`. ## Responses ### 200 The file after the write. ```json { "path": "/home/epochal/out/result.csv", "type": "file", "size": 18432, "mode": 420, "mtime": "2026-03-01T00:02:13Z" } ``` ### 400 The request is invalid. The message names the field. Fix it before retrying. ```json { "error": { "type": "invalid_request", "message": "The request body is invalid.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 401 The x-api-key header is missing, or the key is unknown, revoked or expired. ```json { "error": { "type": "invalid_api_key", "message": "No key matches that token. Check the x-api-key header.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 402 One of: free_quota_exhausted, trial_only, insufficient_credits. ```json { "error": { "type": "free_quota_exhausted", "message": "Your organization has used all its free requests for this API, so retrying will not help. To keep using it, contact sales at https://epochal.com/contact.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 403 One of: organization_suspended, spend_limit_reached. ```json { "error": { "type": "organization_suspended", "message": "The organization's billing is suspended. Contact us at https://epochal.com/contact to continue.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 404 No matching resource was found, or the resource belongs to another organization. ```json { "error": { "type": "not_found", "message": "Nothing is served at that path.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 409 The sandbox is not `live`: it is still starting (wait until its state is `live` before retrying), or it has already ended (it cannot be restarted). ```json { "error": { "type": "conflict", "message": "The sandbox is still starting.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 429 Rate limit exceeded for this organization. Wait for the Retry-After interval before retrying. ```json { "error": { "type": "rate_limit_exceeded", "message": "Over the organization's rate limit. Retry after a pause.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 500 Something failed on our side. Not billed. Retry with backoff. ```json { "error": { "type": "internal_error", "message": "Something failed on our side. The request was not billed.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 503 Temporarily unavailable. Not billed. Retry with backoff, waiting for Retry-After when present. ```json { "error": { "type": "service_unavailable", "message": "The service is temporarily unavailable. The request was not billed.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 504 The request did not finish in time. Not billed. Retry with backoff. ```json { "error": { "type": "timeout", "message": "The request did not finish in time. The request was not billed.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` --- # Remove a file `DELETE /v1/time-portal/sandbox/{id}/files` — Time Portal Sandbox API Remove a file or an empty directory, or a directory and everything under it with `recursive`. A non-empty directory without `recursive` is a `400`. ## Request samples ### cURL ```bash curl "https://api.epochal.com/v1/time-portal/sandbox/sbx_7f3k9q2m4x8p1c6w/files?path=%2Fhome%2Fepochal%2Fout%2Fresult.csv" \ -X DELETE \ -H "x-api-key: $EPOCHAL_API_KEY" ``` ### Python ```python import os import requests response = requests.delete( "https://api.epochal.com/v1/time-portal/sandbox/sbx_7f3k9q2m4x8p1c6w/files?path=%2Fhome%2Fepochal%2Fout%2Fresult.csv", headers={"x-api-key": os.environ["EPOCHAL_API_KEY"]}, ) response.raise_for_status() ``` ### JavaScript ```js const response = await fetch("https://api.epochal.com/v1/time-portal/sandbox/sbx_7f3k9q2m4x8p1c6w/files?path=%2Fhome%2Fepochal%2Fout%2Fresult.csv", { method: "DELETE", headers: { "x-api-key": process.env.EPOCHAL_API_KEY } }); console.log(response.status); ``` ## Path parameters - `id` (string, path, required) — Unique sandbox ID. ## Query parameters - `path` (string, query, required) — Absolute path inside the sandbox. - `recursive` (boolean, query, optional) — Recursively remove a directory and its contents; when `false`, only removes a file or empty directory. ## Authorizations - `x-api-key` (string, header, required) — Send your API key in the x-api-key header. Create keys in the console; each belongs to one organization. ## Responses ### 204 Removed. ```json ``` ### 400 The request is invalid. The message names the field. Fix it before retrying. ```json { "error": { "type": "invalid_request", "message": "The request body is invalid.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 401 The x-api-key header is missing, or the key is unknown, revoked or expired. ```json { "error": { "type": "invalid_api_key", "message": "No key matches that token. Check the x-api-key header.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 402 One of: free_quota_exhausted, trial_only, insufficient_credits. ```json { "error": { "type": "free_quota_exhausted", "message": "Your organization has used all its free requests for this API, so retrying will not help. To keep using it, contact sales at https://epochal.com/contact.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 403 One of: organization_suspended, spend_limit_reached. ```json { "error": { "type": "organization_suspended", "message": "The organization's billing is suspended. Contact us at https://epochal.com/contact to continue.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 404 No matching resource was found, or the resource belongs to another organization. ```json { "error": { "type": "not_found", "message": "Nothing is served at that path.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 409 The sandbox is not `live`: it is still starting (wait until its state is `live` before retrying), or it has already ended (it cannot be restarted). ```json { "error": { "type": "conflict", "message": "The sandbox is still starting.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 429 Rate limit exceeded for this organization. Wait for the Retry-After interval before retrying. ```json { "error": { "type": "rate_limit_exceeded", "message": "Over the organization's rate limit. Retry after a pause.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 500 Something failed on our side. Not billed. Retry with backoff. ```json { "error": { "type": "internal_error", "message": "Something failed on our side. The request was not billed.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 503 Temporarily unavailable. Not billed. Retry with backoff, waiting for Retry-After when present. ```json { "error": { "type": "service_unavailable", "message": "The service is temporarily unavailable. The request was not billed.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 504 The request did not finish in time. Not billed. Retry with backoff. ```json { "error": { "type": "timeout", "message": "The request did not finish in time. The request was not billed.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` --- # Stat a file `GET /v1/time-portal/sandbox/{id}/files/stat` — Time Portal Sandbox API Retrieve a file's type, size, permissions, and modification time. ## Request samples ### cURL ```bash curl "https://api.epochal.com/v1/time-portal/sandbox/sbx_7f3k9q2m4x8p1c6w/files/stat?path=%2Fhome%2Fepochal%2Fout%2Fresult.csv" \ -H "x-api-key: $EPOCHAL_API_KEY" ``` ### Python ```python import os import requests response = requests.get( "https://api.epochal.com/v1/time-portal/sandbox/sbx_7f3k9q2m4x8p1c6w/files/stat?path=%2Fhome%2Fepochal%2Fout%2Fresult.csv", headers={"x-api-key": os.environ["EPOCHAL_API_KEY"]}, ) response.raise_for_status() print(response.json()) ``` ### JavaScript ```js const response = await fetch("https://api.epochal.com/v1/time-portal/sandbox/sbx_7f3k9q2m4x8p1c6w/files/stat?path=%2Fhome%2Fepochal%2Fout%2Fresult.csv", { method: "GET", headers: { "x-api-key": process.env.EPOCHAL_API_KEY } }); console.log(await response.json()); ``` ## Path parameters - `id` (string, path, required) — Unique sandbox ID. ## Query parameters - `path` (string, query, required) — Absolute path inside the sandbox. ## Authorizations - `x-api-key` (string, header, required) — Send your API key in the x-api-key header. Create keys in the console; each belongs to one organization. ## Response fields - `path` (string) — Its absolute path; in a directory listing, its path relative to the listed directory. - `type` (unknown) — What kind of file it is. - `size` (integer) — Its size in bytes. (Minimum: `0`) - `mode` (integer) — Its permission bits, e.g. 420 for `0644`. (Minimum: `0`) - `mtime` (string (date-time) | null) — Last modification timestamp according to the sandbox's clock. (Default: `null`) - `link_target` (string | null) — Symlink target path, when `type` is `symlink`. ## Responses ### 200 The file's metadata. ```json { "path": "/home/epochal/out/result.csv", "type": "file", "size": 18432, "mode": 420, "mtime": "2026-03-01T00:02:13Z" } ``` ### 400 The request is invalid. The message names the field. Fix it before retrying. ```json { "error": { "type": "invalid_request", "message": "The request body is invalid.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 401 The x-api-key header is missing, or the key is unknown, revoked or expired. ```json { "error": { "type": "invalid_api_key", "message": "No key matches that token. Check the x-api-key header.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 402 One of: free_quota_exhausted, trial_only, insufficient_credits. ```json { "error": { "type": "free_quota_exhausted", "message": "Your organization has used all its free requests for this API, so retrying will not help. To keep using it, contact sales at https://epochal.com/contact.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 403 One of: organization_suspended, spend_limit_reached. ```json { "error": { "type": "organization_suspended", "message": "The organization's billing is suspended. Contact us at https://epochal.com/contact to continue.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 404 No matching resource was found, or the resource belongs to another organization. ```json { "error": { "type": "not_found", "message": "Nothing is served at that path.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 409 The sandbox is not `live`: it is still starting (wait until its state is `live` before retrying), or it has already ended (it cannot be restarted). ```json { "error": { "type": "conflict", "message": "The sandbox is still starting.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 429 Rate limit exceeded for this organization. Wait for the Retry-After interval before retrying. ```json { "error": { "type": "rate_limit_exceeded", "message": "Over the organization's rate limit. Retry after a pause.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 500 Something failed on our side. Not billed. Retry with backoff. ```json { "error": { "type": "internal_error", "message": "Something failed on our side. The request was not billed.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 503 Temporarily unavailable. Not billed. Retry with backoff, waiting for Retry-After when present. ```json { "error": { "type": "service_unavailable", "message": "The service is temporarily unavailable. The request was not billed.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 504 The request did not finish in time. Not billed. Retry with backoff. ```json { "error": { "type": "timeout", "message": "The request did not finish in time. The request was not billed.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` --- # List a directory `GET /v1/time-portal/sandbox/{id}/files/list` — Time Portal Sandbox API List directory entries with each `path` relative to the requested directory. ## Request samples ### cURL ```bash curl "https://api.epochal.com/v1/time-portal/sandbox/sbx_7f3k9q2m4x8p1c6w/files/list?path=%2Fhome%2Fepochal%2Fout" \ -H "x-api-key: $EPOCHAL_API_KEY" ``` ### Python ```python import os import requests response = requests.get( "https://api.epochal.com/v1/time-portal/sandbox/sbx_7f3k9q2m4x8p1c6w/files/list?path=%2Fhome%2Fepochal%2Fout", headers={"x-api-key": os.environ["EPOCHAL_API_KEY"]}, ) response.raise_for_status() print(response.json()) ``` ### JavaScript ```js const response = await fetch("https://api.epochal.com/v1/time-portal/sandbox/sbx_7f3k9q2m4x8p1c6w/files/list?path=%2Fhome%2Fepochal%2Fout", { method: "GET", headers: { "x-api-key": process.env.EPOCHAL_API_KEY } }); console.log(await response.json()); ``` ## Path parameters - `id` (string, path, required) — Unique sandbox ID. ## Query parameters - `path` (string, query, required) — Absolute directory path to list. - `recursive` (boolean, query, optional) — Descend recursively into subdirectories. - `cursor` (string, query, optional) — Pagination cursor from the previous page's `next_cursor`. - `limit` (integer, query, optional) — Maximum number of entries to return (`1` to `100`, default `50`). (Range: `1` to `100`) ## Authorizations - `x-api-key` (string, header, required) — Send your API key in the x-api-key header. Create keys in the console; each belongs to one organization. ## Response fields - `entries` (object[]) — One page of entries. - `path` (string) — Its absolute path; in a directory listing, its path relative to the listed directory. - `type` (unknown) — What kind of file it is. - `size` (integer) — Its size in bytes. (Minimum: `0`) - `mode` (integer) — Its permission bits, e.g. 420 for `0644`. (Minimum: `0`) - `mtime` (string (date-time) | null) — Last modification timestamp according to the sandbox's clock. (Default: `null`) - `link_target` (string | null) — Symlink target path, when `type` is `symlink`. - `next_cursor` (string | null) — Pass as `cursor` for the next page; absent on the last. (Default: `null`) ## Responses ### 200 One page of entries. ```json { "entries": [ { "path": "/home/epochal/out/result.csv", "type": "file", "size": 18432, "mode": 420, "mtime": "2026-03-01T00:02:13Z" } ], "next_cursor": null } ``` ### 400 The request is invalid. The message names the field. Fix it before retrying. ```json { "error": { "type": "invalid_request", "message": "The request body is invalid.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 401 The x-api-key header is missing, or the key is unknown, revoked or expired. ```json { "error": { "type": "invalid_api_key", "message": "No key matches that token. Check the x-api-key header.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 402 One of: free_quota_exhausted, trial_only, insufficient_credits. ```json { "error": { "type": "free_quota_exhausted", "message": "Your organization has used all its free requests for this API, so retrying will not help. To keep using it, contact sales at https://epochal.com/contact.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 403 One of: organization_suspended, spend_limit_reached. ```json { "error": { "type": "organization_suspended", "message": "The organization's billing is suspended. Contact us at https://epochal.com/contact to continue.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 404 No matching resource was found, or the resource belongs to another organization. ```json { "error": { "type": "not_found", "message": "Nothing is served at that path.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 409 The sandbox is not `live`: it is still starting (wait until its state is `live` before retrying), or it has already ended (it cannot be restarted). ```json { "error": { "type": "conflict", "message": "The sandbox is still starting.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 429 Rate limit exceeded for this organization. Wait for the Retry-After interval before retrying. ```json { "error": { "type": "rate_limit_exceeded", "message": "Over the organization's rate limit. Retry after a pause.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 500 Something failed on our side. Not billed. Retry with backoff. ```json { "error": { "type": "internal_error", "message": "Something failed on our side. The request was not billed.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 503 Temporarily unavailable. Not billed. Retry with backoff, waiting for Retry-After when present. ```json { "error": { "type": "service_unavailable", "message": "The service is temporarily unavailable. The request was not billed.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` ### 504 The request did not finish in time. Not billed. Retry with backoff. ```json { "error": { "type": "timeout", "message": "The request did not finish in time. The request was not billed.", "request_id": "7c2e5f0a-93b4-4d1e-a6f8-2b0c9e4d7a15" } } ``` --- # Changelog Product updates and announcements from Epochal. ## November 2026 **Epochal Time Portal APIs released.** We are launching the Time Portal APIs — Search, Fetch, and Sandbox — giving agents a point-in-time environment across the historical web. Read the launch posts: [Introducing Epochal](https://epochal.com/blog/introducing-epochal) and [Introducing the Time Portal](https://epochal.com/blog/introducing-time-portal).