Fetch API

Fetch

Read one URL and get back its main content as markdown.

POST/v1/fetch
curl https://api.epochal.com/v1/fetch \
  -H "x-api-key: $EPOCHAL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "url": "https://news.example.com/energy/battery-plant-delay",
  "max_characters": 2000
}'

The page's content and metadata, and the id of this request. A page that could not be read is also a 200: status is error and page_error says why.

{
  "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-08-19T06:12:00Z",
  "language": "en",
  "content": "# Battery plant start pushed back to late 2027\n\nThe cell maker said…",
  "truncated": true,
  "entity": null
}

Read the Fetch API guide

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

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

Cache-Controlstring

How old a cached copy may be, as max-age=<seconds>. Without it a cached copy may be served; max-age=0 or no-cache reads the page fresh. Cached copies are shared by every caller of the same exact URL; send URLs that carry credentials or one-time tokens only with zero data retention.

Example

"max-age=86400"

Body

application/json

urlstringRequired

The page to read: a full http or https URL on the public web.

  • Minimum length: 1

Example

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

The most characters of content to return. Longer pages are cut off.

  • Range: 1 to 1000000

  • Default: 100000

Response

200

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 stock, crypto asset, city's weather, sports league, person, organization or place when the URL is an Epochal World page or a LinkedIn profile linked to one. null for ordinary web pages.

  • Known values (open): organization, person, stock, crypto, weather, place, sports

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.