Time Portal Fetch API

Time Portal fetch

Retrieve an archived URL as it existed at Accept-Datetime, either as markdown with metadata (format: structured) or as the raw document (format: page).

POST/v1/time-portal/fetch
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
}'

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).

{
  "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
}

Read the Time Portal Fetch API guide

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

Authorizations

x-api-key

x-api-keystringRequired

Send your API key in the x-api-key header. Create keys in the console; each belongs to one organization.

Example

"ek_…"

Headers

Accept-DatetimestringRequired

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.

Example

"2026-03-01T00:00:00Z"

Body

application/json

urlstringRequired

The page to read: a full http or https URL.

  • Minimum length: 1

Example

"https://example.com/post"
max_charactersinteger

Maximum number of characters of content to return; longer pages are truncated. Ignored for format: "page".

  • Range: 1 to 1000000

  • Default: 100000

formatstring

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 headers

200

x-fetch-status-codeinteger

format: page only. The page's HTTP status as the site answered it, the code you would get reading the page yourself: 200 when read, 404, 403, 429, 500... when the site failed it. 0 when no site answered: the host could not be reached, or there is no copy at or before Accept-Datetime.

  • Range: 0 to 599

x-fetch-status-messagestring

format: page only. A few words on the page's outcome, for people (Page not found., No copy at or before Accept-Datetime.). Branch on x-fetch-status-code.

Response

200

as_ofstring (date-time)Required

Resolved point-in-time cutoff from Accept-Datetime.

request_idstringRequired

Identifies this request in our logs; quote it when reporting a problem.

statusstring

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_errorobject | null

Why the page could not be read. Absent when status is success.

http_status_codeinteger (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

messagestringRequired

A short reason, for people; branch on http_status_code.

idstring | null

Identifies the exact stored version served. null when unknown.

urlstringRequired

The URL as requested.

final_urlstringRequired

The URL the content was read from, after redirects and normalization.

titlestringRequired

The page's title.

descriptionstring | null

The page's own summary, from its metadata. null when it declares none.

authorstring | null

The page's authors, comma-separated. null when it names none.

published_atstring (date-time) | null

When the page says it was first published. null when it declares no trusted date.

languagestring | null

The page's language as a BCP 47 tag. null when not detected.

contentstringRequired

The page's extracted text as markdown, at most max_characters long.

truncatedbooleanRequired

Whether max_characters cut content short.

entityobject | nulloneOf · typeRequired

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

oneOf (type)

An entity whose type is organization.

idstringRequired

The entity's stable URL, https://world.epochal.com/<type>/<key>.

schema_versioninteger (int64)Required

Schema version for this entity type's properties layout (1 for all types).

  • Minimum: 0

updated_atstring (date-time)Required

When the properties were last refreshed.

typestringRequired

The entity's type. It sets the shape of properties.

  • Constant: organization

propertiesobjectRequired

The properties of a company.