Time Portal · Search

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.

HeaderRequiredValue
x-api-keyYesYour API key. See Authentication.
Accept-DatetimeYesThe 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.
Content-TypeYesapplication/json
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"
  }'

Body fields

FieldTypeDefaultDescription
querystring, 1 to 1,000 charactersrequiredSearch query string.
num_resultsinteger, 1 to 1010Maximum number of results to return.
domainsarray of strings (up to 2,048 chars each; max 200 combined with exclude_domains)noneRestrict results to these hosts, paths, or public suffixes (subdomains included), e.g. example.com, example.com/blog, gov.uk.
exclude_domainsarray of strings (same syntax and shared 200 limit)noneExclude pages from these sites (subdomains included). Cannot overlap with domains.
languagesarray of up to 8 BCP 47 tagsnonePreferred result languages in priority order, e.g. en, pt-BR.
published_afterRFC 3339 timestampnoneReturn only pages published on or after this timestamp. Must be earlier than Accept-Datetime.
categoriesarray of category namesnoneFilter 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_textbooleanfalseInclude 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
    }
  ]
}
FieldMeaning
as_ofThe instant the search was set to, from Accept-Datetime.
request_idIdentifies this request in Epochal's logs; quote it when reporting a problem.
resultsRanked results, best first. An empty list is still a 200.
results[].titleThe page's title.
results[].urlThe page's canonical URL.
results[].snippetA short passage from the page that matches the query.
results[].textThe page's extracted text. Only present when include_text is true and text is available.
results[].published_atWhen the page was published. null when unknown.
results[].domainThe page's registrable domain, such as example.com. null when unknown.
results[].languageThe page's language as a BCP 47 tag. null when not detected.
results[].entityThe entity when the result is from an Epochal World page. It's the entity Fetch returns for url, built from the copy of the page the result came from. null for every other result. See World Entities.

To read a result in full, send its url to 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 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.

Errors

Errors use the same JSON shape as every other endpoint. Check type, not message. No error counts against your free requests.

StatustypeWhat to do
400invalid_requestA body field is invalid, or Accept-Datetime is missing, invalid, not in the past, or before 1970. See error.message for details.
401invalid_api_keyThe x-api-key header is missing, or the key is unknown, revoked, or expired. Fix the key.
402free_quota_exhaustedYour organization has exhausted its free trial requests. Contact us for more.
422query_refusedThe query falls under the usage policy and was not billed. Do not retry the same query.
429rate_limit_exceededRate limit exceeded. Wait for Retry-After before retrying.
500, 503, 504internal_error, service_unavailable, timeoutSomething failed on Epochal's side. Retry with backoff.

For the cause and fix of each, see Errors.

Next steps

Fetch

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

How the Instant Works

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

Rate Limits

Organization and per-IP rate limits, retry behavior, and pacing guidance.

Errors

Standard JSON error envelope, HTTP status codes, sandbox failure types, and retry rules.