Search API

Search

Rank the live web for a query and get back results with snippets.

POST/v1/search
curl https://api.epochal.com/v1/search \
  -H "x-api-key: $EPOCHAL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "query": "european battery gigafactory delays 2026",
  "num_results": 5,
  "domains": [
    "example.com",
    "example.org"
  ],
  "exclude_domains": [
    "example.net"
  ],
  "languages": [
    "en"
  ],
  "location": "DE",
  "categories": [
    "news"
  ],
  "include_text": false
}'

Ranked results, best first, and the id of this request.

{
  "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-08-19T06:12:00Z",
      "domain": "example.com",
      "language": "en",
      "entity": null
    }
  ],
  "entities": []
}

Read the Search API guide

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

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_…"

Body

application/json

querystringRequired

What to search the web for.

  • Minimum length: 1

  • Maximum length: 1000

Example

"european battery gigafactory delays 2026"
num_resultsinteger

The most results to return. You may get fewer.

  • Range: 1 to 20

  • Default: 10

domainsstring[]

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.

  • At most 200 entries across domains and exclude_domains together

Example

["example.com","example.org/blog"]
exclude_domainsstring[]

Never return pages from these sites, subdomains included. Entries take the same forms as domains. An entry can't also be in domains.

Example

["example.net"]
languagesstring[]

Languages you want results in, most preferred first, such as en or pt-BR. Leave it out to get results in the query's language.

Example

["pt-BR","en"]
locationunknown | null

Where your user is, so results are localized: a country code such as US, or coordinates for a more precise location.

Example

"US"
published_afterstring (date-time) | null

Only return pages published on or after this time.

Example

"2026-01-01T00:00:00Z"
published_beforestring (date-time) | null

Only return pages published before this time. Must be later than published_after.

Example

"2026-09-01T00:00:00Z"
categoriesstring[]

Only return pages in these categories.

  • News: latest news articles

  • Finance: financial reports such as SEC filings

  • Legal: court opinions, statutes, regulations and sanctions

  • Publications: academic articles and research papers

  • Companies: company profiles

  • People: people profiles

  • Maps: places and locations

Example

["news","finance"]
include_textboolean

Return each page's full text in addition to the most relevant snippets.

  • Default: false

  • Makes responses much larger. Leave it off unless you need the text

Response

200

request_idstringRequired

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

resultsobject[]Required

Ranked results, best first.

titlestringRequired

The page's title.

urlstringRequired

The page's canonical URL. A person shows its LinkedIn profile; Fetch reads the entity from that URL.

snippetstringRequired

A short passage from the page that matches the query.

textstring | null

The page's extracted text. Only present when include_text is true and text is available.

published_atstring (date-time) | null

When the page was published. null when unknown.

domainstring | null

The page's registrable domain, such as example.com. null when unknown.

languagestring | null

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

entityobject | nulloneOf · type

The entity when the result is an Epochal World page, as Fetch returns it for url. null for every other result.

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

entitiesobject[]oneOf · typeRequired

Reserved; entities come on results[].entity.

  • Default: []

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.