Cormorant API v1
Base URL: https://api.cormorant.ch. All endpoints below are
under /v1 except health and metrics. The contract is versioned: fields are
only ever added within v1; nothing is renamed or removed. Guides, the
interactive reference and llms.txt are served at /docs (see the
changelog for what changed).
Authentication#
Every /v1 request needs a project API key (except the public
service status, /v1/status*):
Authorization: Bearer cmr_...
Keys belong to exactly one project and are stored only as HMAC-SHA256 hashes.
Your first key comes with your account; after that you create, rotate and
revoke keys yourself, in the control center or with an account admin key
(see Managing keys). Missing or invalid
keys get 401.
There are two kinds of keys, and the prefix tells them apart:
| Prefix | Role (X-Cormorant-Key-Role) |
Sees |
|---|---|---|
cma_… |
account_admin — the account admin key |
everything of the customer account where an endpoint offers it: all its keys, projects, usage and invoices |
cmr_… |
standard — an additional key |
its own usage only |
Both authenticate every /v1 endpoint the same way. A key's role is fixed when
it is created; to change it, create a new key and revoke the old one.
Keys issued before roles existed are standard keys. Every authenticated /v1
response carries the header X-Cormorant-Key-Role: account_admin or
X-Cormorant-Key-Role: standard. Each project has a
request-rate limit (default 200 requests/s, fixed one-second window); excess
requests get 429 with Retry-After: 1. A batch call counts as one request.
Every authenticated response carries RateLimit-Policy and RateLimit
(IETF draft; "project";q=200;w=1 and, for a key with its own limit,
"key";q=10;w=1).
Debug requests (available on request). When you report a problem with a
specific request, Cormorant support can enable debugging for one of your keys.
Send that key's synchronous POST /v1/search or POST /v1/fetch request with
the header X-Cormorant-Debug: 1: the request is recorded in full detail for
support, and the answer carries debug_url, a link to that record (it opens in
the operator console, not with an API key). Quote it in your report. Without
debugging enabled for the key, the header is ignored and the answer is the
usual one. Debug requests are billed like any other request.
Per-key limits. The operator can set, per key, a monthly spend cap (in the
customer's invoice currency; provider cost in USD for projects without a
customer), monthly request quotas per category (search, fetch,
fetch_premium, company; SEC EDGAR requests count as fetch), requests per
second and the
allowed categories. They are
enforced on every request and batch item: 403 key_category_not_allowed,
429 key_quota_exhausted / key_budget_exhausted (Retry-After until the
month resets, UTC) and 429 key_rate_limited. A key without fetch_premium
(not allowed, or its quota used up) still fetches, without the premium routes.
Keys with limits get X-Cormorant-Key-Budget-Remaining: 12.40 USD and
X-Cormorant-Quota-Remaining: fetch=18766, search=900 on every response.
Request counts are exact; spend is the aggregates (5 minutes) plus an
estimate since then.
Keys of a suspended customer get 403 with
{"detail": {"error": "customer_suspended", "message": "…"}}.
Every response carries a request_id (req_…; batch items use
<job_id>:<index>). Quote it when debugging: the full attempt history of
every request id is kept.
cost_usd is Cormorant's provider spend caused by this request in USD
(search fallback and premium routes); cache hits and standard routes cause no provider cost. Spend is attributed only to
the project whose request made the provider call; the caches are shared. Keys of
an external customer get cost_usd: null: customers see what they are
charged — per request in GET /v1/requests (charge), aggregated in
GET /v1/usage — never Cormorant's provider cost. Every search, fetch and
SEC result (also batch items) carries billing_category
(search, search_fallback, search_cached, search_empty, fetch_own, fetch_premium,
fetch_cached, fetch_robots, sec, sec_cached; company data requests count as
company / company_cached; new categories may be added): the category,
and so the plan meters, the request counts toward. SEC EDGAR requests (/v1/sec/… and fetches of
SEC hosts) are sec / sec_cached: no provider cost, billed at your plan's
price for them, and counted against a key's fetch quota.
POST /v1/search#
{
"query": "Nestlé sustainability report 2025",
"language": "en", // optional, BCP 47 (`de-CH`, `zh-Hans`, `zh-Hant-TW`) or a name (`taiwanese`)
"country": "CH", // optional, ISO 3166-1 alpha-2 (the market; the tag's own region wins)
"max_results": 20, // 1..50, default 20
"freshness": "month", // optional: day | week | month | year (pd/pw/pm/py accepted)
"cache_ttl_s": 604800, // optional: max acceptable cache age; 0 = bypass the cache
"project_ref": "company:4711", // optional your own text, stored with usage
"safesearch": "moderate", // optional: off | moderate (default) | strict
"group_or": true, // optional, default true: group OR alternatives (see below)
"entity": { // optional: the company the search is about
"id": "cmp_01JA2B3C4D5E6F7G8H9J0KMNPQ", // register id, and/or
"domains": ["grainger.com"], // websites or domains, and/or
"names": ["W.W. Grainger"] // names (legal-form words ignored)
}, // a plain string is a `cmp_` id or a domain
"entity_filter": false // optional, with entity: drop results not about it
}
Response 200:
{
"query": "Nestlé sustainability report 2025",
"results": [
{
"url": "https://www.nestle.com/sustainability/...",
"title": "Creating Shared Value and Sustainability Report 2025",
"snippets": ["Our 2025 report covers ...", "Download the full report ..."],
"engines": ["google", "bing", "brave_api"],
"published_at": "2026-03-02T00:00:00",
"rank": 1,
"entity_match": null, // with `entity`: domain | name | weak_name | none
"lang": "en", // language of title and snippets (BCP 47), null if too short
"lang_confidence": 0.89
}
],
"engine_query": "Nestlé sustainability report 2025", // the query as searched
"safesearch": "moderate",
"entity": null, // with `entity`: {"id","found","names","domains"}
"filtered": {"adult": 0, "entity": 0}, // results removed after the search
"provider": "searxng", // "searxng" | "partner_index" | "brave"
"fallback_reason": null, // why a fallback was used (see below), else null
"unresponsive_engines": [], // SearXNG engines that failed for this query
"cached": false,
"empty": false, // true: answered, nothing found (charged at the cached rate)
"cost_usd": 0.0, // null for keys of an external customer
"billing_category": "search", // search | search_fallback | search_cached | search_empty
"error": null,
"request_id": "req_6b1f..."
}
Order of operations: shared search cache (key = normalised engine_query and
its operators + language, country, freshness, safesearch; up to 7 days, shorter with freshness) → our SearXNG instances (least-loaded
across all hosts, a second instance on transport failure) → the partner search
index (where activated; its own web index, queries processed outside
Switzerland and the EU; a query over 128 characters is sent to it with fewer
OR alternatives) → Brave Search API. Brave is asked only when the
partner index's answer fails the same test as SearXNG's (fewer than 3 usable
results, operators ignored) or it fails. A screening query (a quoted name with
site: or OR terms) keeps the partner index's answer even with fewer than 3
results: such checks usually find nothing. exclude_providers
(partner_index, brave) leaves a fallback out of one search.
site: and quoted phrases are checked on every answer: off-site results and
(with strict_operators, the default) results lacking a phrase are removed
(filtered.site, filtered.phrase, filtered_out, filter_reason,
empty_reason); an engine answer that ignored them, or matched at most one
term of a longer query, goes to Brave (operators_ignored). A phrase counts as
honoured when at least 3 of the top 10 results (or half, when there are fewer)
contain it; a quoted company name also matches without its legal form or
generic words ("Roche Holding AG" matches "Roche", "ASML Holding N.V."
matches "ASML Holding NV") or on the company's own site. Before falling back to Brave,
a second SearXNG instance is asked, and when at least 3 of SearXNG's results
do match the query those are served instead (provider searxng,
operators_ignored listing what the engines missed). A quoted name that
Brave found no page for in the last 7 days is not sent to Brave again while
SearXNG finds no page naming it either. A search answered without error and
with no result has empty: true: it is charged at the cached rate whatever
route it took (billing_category search_empty, no fallback cost passed
through) and cached for the normal lifetime, so a repeat is a cache hit
(search_cached). answered_by
names the engines behind the served results and degraded is true when
SearXNG did not answer well. Without language, country sets the
language (US: English). See Search in depth.
Brave is used when SearXNG errors or times out (searxng_error,
searxng_timeout, no_searxng_instance), reports unresponsive engines
(unresponsive_engines, or captcha_engines when any reason mentions a
CAPTCHA), or returns fewer than MIN_RESULTS (3) usable results
(too_few_results), or ignores the query's operators (operators_ignored). By
default unresponsive engines (Wikipedia not counted as an answering engine) trigger the fallback only
when fewer than two engines returned results (SEARCH_FALLBACK_ON_UNRESPONSIVE= quorum, SEARCH_QUORUM_ENGINES=2); majority (as many engines failed as
answered) and any are stricter. A Brave rate limit (429) is retried after the
indicated wait; batch items that still fail with it are retried later.
Results are deduplicated by normalised URL (scheme, www., trailing slash and
tracking parameters ignored). No snippet is lost: every distinct snippet
and engine seen for a URL is kept, in order of first appearance. When a
fallback is used, its results come first (Brave's, then the partner index's
when both were asked), followed by any SearXNG-only results.
If Brave is unavailable or the project budget is exhausted, whatever SearXNG
returned is served (not cached) with fallback_reason set. A genuinely
empty search — the engines (and Brave, when consulted) answered and found
nothing — returns results: [] with error: null. Only when the providers
could not answer is error set (e.g. budget_exhausted, brave_http_429,
searxng_timeout).
News (category)#
category: "news" searches news engines instead of the web (default
"web"): results are news articles with published_at where the engine
dates them, and freshness narrows them to the last day, week, month or
year. News answers are cached apart from web answers of the same words and
never use the extra web index of the fallback route, so a news search that
finds nothing answers with no results rather than web pages.
Several languages (languages)#
{
"query": "Tencent annual report",
"languages": ["en", "zh-Hans", "zh-Hant-TW"], // 1..6 tags or names (`chinese`, `taiwanese`)
"query_language": "en", // optional: the language of `query` (default: detected)
"queries": {"zh-Hans": "腾讯 年报 2025"}, // optional: your own query for a language
"regions": {"en": "US"}, // optional: market per language
"per_language_limit": 10, // optional: results taken from each language
"translate_to": "en", // optional: translate titles and snippets
"entity": "cmp_01JA2B3C4D5E6F7G8H9J0KMNPQ"
}
Each language is searched in its own market: the tag's region
(zh-Hant-TW → Taiwan), the regions entry, or the language's main market
(zh-Hans → CN, ja → JP, ko → KR, de → DE; none for en, fr,
es, pt). The query for each language (queries_used, and
languages[].query_method):
query_method |
when |
|---|---|
given |
your queries entry |
original |
query is already in that language |
script |
Chinese in the other script, converted (no machine translation) |
names |
query only names the entity company: its own name in that language (the entity.names you give in Chinese, Japanese or Korean script, else the register's) |
translated |
machine translated (fast tier); the company's register names are kept as the glossary; operators (site:, filetype:, OR), domains and identifiers are kept as written |
untranslated |
translation unavailable: the original query, in that market (warnings) |
The answers are merged: a URL found by several languages counts once
(found_in, every snippet kept), and the languages take turns so one cannot
crowd out the others; max_results caps the merged list. Results are not
filtered by language: within each language's list, results whose title and
snippets are in that language come first (after those about the entity),
and languages[].in_language counts them. languages[]
reports each language's search (provider, fallback, cached, results, error)
and the request_id it is recorded under: the first language under the
response's request_id, the others as <request_id>.<tag>. Each language
counts as one search (cached, SearXNG or fallback as usual); billing sums
them.
With translate_to, titles and snippets of results in other languages get
translation: {target, title, snippets, status} (fast tier); the
response's translation gives the characters translated (chars_billed)
and taken from the cache (chars_cached). Billed as machine translation
under <request_id>.translate. language and country cannot be combined
with languages.
Safe search#
safesearch (off | moderate | strict, default moderate; true/
false and 0/1/2 are accepted) is passed to every engine and to the
fallback search service. Unless it is off, results on a short list of
well-known adult sites are also removed, because not every engine honours the
level; filtered.adult counts them. Moderate is the default because it
removes explicit content while strict filtering also hides legitimate
reporting (court cases on harassment or trafficking, sexual-health products)
that research queries ask for. Send "safesearch": "off" for the earlier
behaviour.
OR alternatives (group_or)#
Engines differ in how loosely OR binds: some read
"W.W. Grainger" animal testing OR "animal welfare" as
("W.W. Grainger" animal testing) OR "animal welfare" and return pages that
never name the company. By default each chain of OR alternatives is put in
parentheses so the terms around it stay required; engine_query shows the
query as searched:
query |
engine_query |
|---|---|
"W.W. Grainger" animal testing OR "animal welfare" |
"W.W. Grainger" (animal testing OR "animal welfare") |
"Holcim" "child labour" OR "forced labour" 2025 |
"Holcim" ("child labour" OR "forced labour") 2025 |
acme lawsuit OR litigation |
acme (lawsuit OR litigation) |
site:example.com a b OR c |
site:example.com (a b OR c) |
"X" a OR b "Y" c OR d |
"X" (a OR b) "Y" (c OR d) |
Rules: only upper-case OR between two terms is an operator; a quoted
phrase (also -"…", intitle:"…") is one term and never split. The
alternatives at the edges of a chain take the run of plain words up to the
nearest quoted phrase or operator term (site:, -x, …); when that run
reaches the start or end of the query, only the one adjacent word is taken
(Nestlé animal testing OR welfare → Nestlé animal (testing OR welfare)).
The query is sent unchanged when it already contains parentheses, has an
unbalanced quote, an OR at its start or end or two in a row, an excluded
term next to OR, or when nothing would stay outside the group (a OR b).
Engines that ignore parentheses read the grouped query like the original
one, so grouping never narrows their results further. "group_or": false
sends the query exactly as written.
Entity hint#
entity names the company a search is about: a register id — cmp_… or
an identifier such as isin:US02079K3059, lei:… or ticker:XNAS:GOOGL
(its names, web domains, tickers and ISINs are read from the company
register, cached for 10 minutes) — domains and/or names. Each result gets
entity_match: domain (on one of the company's registrable domains,
subdomains included), name (the title or a snippet names the company —
names compared without case, accents and legal-form words, as whole words —
or mentions its domain, a ticker of 3+ characters or an ISIN), weak_name
(only a one-word name that is also an ordinary word, such as "Alphabet",
"Shell" or "Target", or a short acronym such as "OMV", with nothing that says
it is the company: no legal form, ticker or company word such as "shares",
"CEO" or "annual report") or none. Results with domain or name come
first, then weak_name, then none, engine order kept within each group,
and rank is renumbered. With "entity_filter": true the weak_name and
none results are dropped (filtered.entity); nothing is dropped when there
is nothing to match against (an unknown id without domains or names,
entity.found: false). An id that is neither a well-formed cmp_ id nor
an isin:/lei:/ticker: identifier, or an empty entity, is 422. The hint does not change the search itself or its cache key, and
costs nothing extra.
POST /v1/fetch#
{
"url": "https://www.example.com/annual-report-2025.pdf",
"render": "auto", // auto | never | always
"max_bytes": 15728640, // default 15 MB, max 100 MB (above 50 MB: HTML and PDF only; batch items left at the default: PDFs up to 200 MB; SEC filing documents: HTML up to 100 MB)
"accept_pdf": true,
"cache_ttl_s": 604800, // optional max acceptable cache age; 0 = bypass
"min_text_chars": 500, // below this, HTML main text counts as "thin" (Latin-equivalent characters, see below)
"allow_archive": true, // allow an archived copy when the live site blocks us, is gone or 404s
"include_html": true, // default true here, false for batch items
"include_markdown": false, // true: the main content as Markdown in `markdown`
"allow_premium": true, // false: never use proxy / proxy_browser / proxy_render / unblocker
"tiers": ["direct", "browser", "archive"], // optional allowlist of tiers
"timeout_s": 60, // optional overall deadline, 5–150 s (default 60 s)
"country": "CH", // optional geotargeting (premium routes)
"user_agent": "Example Research contact@example.org", // must be on the project allowlist
"accept_language": "de-CH,de;q=0.9",
"language": "zh-Hant-TW", // optional: sets accept_language and, with a region, country
"translate_to": "en", // optional: machine translation of text and title (`translation`)
"translation_tier": "quality", // quality (default) | fast
"bilingual": false, // with translate_to: also the aligned segments with their offsets
"mode": "page", // page (default) | raw: the file as it is, any type, no text (see Raw downloads)
"project_ref": "company:4711"
}
Response 200 (also for unsuccessful fetches — check error):
{
"url": "https://www.example.com/annual-report-2025.pdf",
"final_url": "https://www.example.com/annual-report-2025.pdf", // null when unknown (proxy_render, unblocker)
"redirects": [ // one entry per redirect before final_url
{"url": "http://example.com/ar25", "status": 301, "location": "https://www.example.com/annual-report-2025.pdf"}
],
"status": 200,
"content_type": "application/pdf", // what the body is (rendered pages: text/html)
"origin_content_type": "application/pdf", // what the origin sent; null when unknown
"headers": {"content-type": "application/pdf", "last-modified": "Tue, 03 Mar 2026 09:00:00 GMT"},
"tier": "direct", // direct | browser | archive | proxy | proxy_browser | proxy_render | unblocker
"attempts": [
{"tier": "direct", "status": 200, "reason": "ok", "ms": 412}
],
"html": null, // decoded HTML for HTML pages
"text": "Annual Report 2025\n\n...",
"pdf_text_pages": [{"page": 1, "text": "Annual Report 2025"}, {"page": 2, "text": "..."}],
"pdf_page_count": 148, // PDFs: number of pages; null otherwise
"text_truncated": false, // PDF text stopped at the extraction limits
"title": "Annual Report 2025",
"meta": null, // article metadata for HTML pages (see below)
"sha256": "a3f1...", // of the retrieved bytes
"bytes": 2483112,
"cached": false,
"revalidated": false, // true: expired cache entry confirmed by the origin (304)
"insecure_transport": false, // true: fetched over plain http:// although https:// was asked
"retrieved_at": "2026-10-19T08:12:44.120Z",
"etag": "\"5f2-1a\"",
"last_modified": "Tue, 03 Mar 2026 09:00:00 GMT",
"archived_at": null, // snapshot time (tier = archive) or common_crawl capture time
"served_from_archive_because": null, // domain_dead | not_found when the archive stands in
"body_url": "https://api.cormorant.ch/v1/bodies/a3f1...", // exact retrieved bytes
"body_kind": "origin", // origin | rendered_dom (what sha256 covers)
"content_kind": "pdf", // html | pdf | text | json | xml | binary; raw downloads also dataset | spreadsheet | archive
"mode": "page", // page | raw
"encoding": null, // raw downloads of text formats: utf-8, utf-16-le, iso8859-1…; null when unknown
"bom": null, // raw downloads of text formats: byte order mark present
"members": null, // raw download of a ZIP archive: its files [{name, bytes, sha256, content_type, content_kind, encoding, bom, body_url, skipped}]
"members_truncated": null, // raw download of a ZIP archive: the listing stopped early
"lang": "en", // language of text (BCP 47; Chinese with its script: zh-Hans, zh-Hant-TW)
"lang_confidence": 0.95, // 0-1
"lang_source": "declared", // declared (the page's tag, matching the text) | detected
"paywall": null, // HTML only: none | metered | hard | unknown
"paywall_evidence": [], // e.g. ["jsonld_not_free", "vendor_piano"]
"text_complete": null, // false: paywall teaser, thin_content or pdf_no_text
"thin_content": false, // true: no tier reached min_text_chars (best capture returned)
"pdf_no_text": false, // true: PDF without extractable text (scans)
"content_flags": [], // HTML served as a success: challenge | navigation_only | consent_wall | login_wall | error_page
"alternate_of": null, // set when text comes from a verified copy elsewhere
"alternate_source": null, // publisher_feed | guardian_api | europe_pmc | ncbi_pmc | pmc_abstract | ncbi_pubmed | pubchem | courtlistener | open_access | syndication | common_crawl
"match_score": null,
"primary_sources": [], // [{url, kind, text}] for paywalled/unavailable pages
"archive_snapshot": null, // 404/410: {url, archived_at} of the closest Wayback snapshot
"cost_usd": 0.0, // null for keys of an external customer
"billing_category": "fetch_own", // fetch_own | fetch_premium | fetch_cached | fetch_robots | sec | sec_cached
"error": null,
"request_id": "req_91c2..."
}
text is exactly the retained text Cormorant stores and serves again on cache
hits (main text via trafilatura, readability fallback, then visible body text;
whitespace normalised). Anchor quotes against it. For PDFs, text is the pages
joined with blank lines and pdf_text_pages has the per-page text.
Large PDFs. max_bytes applies to every response of /v1/fetch. In batch
fetches whose items leave max_bytes unset, a PDF (by
Content-Type: application/pdf or the %PDF- signature) may be up to
200 MB; other content keeps the default 15 MB. An item that sets
max_bytes gets exactly that limit, for PDFs too. Such a PDF is fetched by
the direct or proxy tier (the browser, archive and rendering tiers keep
max_bytes); its exact bytes are available from body_url. Downloading it
may take at most 5 minutes in total (or the item's timeout_s, when
shorter); a slower download ends with error: timeout and an attempt with
reason pdf_download_timeout. Text extraction stops after 5,000 pages or
5,000,000 characters of page text: then text_truncated is true,
pdf_text_pages covers the pages read so far (the last one possibly cut)
and pdf_page_count still counts every page. To skip PDFs entirely, set
accept_pdf: false.
Non-HTML content. content_kind classifies the response (content type,
sniffed when missing or generic). json: text is the decoded document
(still valid JSON). xml (feeds, sitemaps, XBRL…): text is the text content,
one node per line, title from the first <title>; external entities are
never resolved. text (plain, CSV, Markdown): decoded text. binary
(spreadsheets, archives, images…): text is empty — the bytes are in
body_url. All of these are successful fetches (error: null).
Raw downloads (mode: "raw"). Fetches any public file and keeps it as a
body, whatever its type: CSV, XLSX, ZIP, JSON, XML, PDF. Nothing is
extracted, so text is empty, thin_content and pdf_no_text stay false
and min_text_chars, render, accept_pdf, allow_archive and
include_html do not apply. The stored bytes are exactly what the origin
sent (body_kind: origin); read them from body_url, with Range for
large files.
{"url": "https://www.priminfo.admin.ch/downloads/praemienregionen-2027.xlsx",
"mode": "raw", "project_ref": "steward-packs"}
| Field | In raw mode |
|---|---|
max_bytes |
Default and maximum 250 MB (batch items: default 250 MB, up to 1 GB; on opendata.astra.admin.ch a batch item that leaves it unset may be up to 2 GB and take up to 30 minutes). Larger files answer too_large. Above 16 MB the body is streamed to disk, never held in memory. |
timeout_s |
Default 120 s (batch items 600 s). A download that is still running then answers error: timeout; fetch files that need longer as a batch item. |
content_kind |
dataset (CSV, TSV, JSON, NDJSON, XML data files), spreadsheet (XLSX, XLS, ODS), archive (ZIP, gzip, tar, 7z…), pdf, html, text or binary, from the first bytes, the content type and the file name (Content-Disposition, else the URL). |
encoding, bom |
For text formats: the encoding found (the byte order mark's, else the charset the origin declared, else utf-8 when the bytes are valid UTF-8, else null) and whether a byte order mark is present. Nothing is transcoded: the mark is part of the bytes and of sha256. null for other kinds. |
members, members_truncated |
For a ZIP archive: every file in archive order as {name, bytes, sha256, content_type, content_kind, encoding, bom, body_url, skipped} (kind, encoding and byte order mark as for a raw download of that file). Each file is stored as a body of its own, so one file is read by body_url without downloading the archive (X-Body-Kind: archive_member). content_type is guessed from the name. Limits: 2,000 files and 2 GB unpacked in all (members_truncated: true when the listing stopped there), 1 GB per file. A file that is not unpacked has sha256: null, body_url: null and skipped: encrypted, too_large, compression_ratio (above 200:1) or unreadable. Nested archives are listed as files, not unpacked. null for other kinds, for other archive formats (gzip, tar, 7z) and for a ZIP that cannot be read. |
etag, last_modified |
As the origin sent them; null when it sends none. Never invented. |
sha256, bytes, content_type, final_url, redirects, retrieved_at, headers |
As for every fetch. |
| Routes | direct from Cormorant's own addresses, then proxy when the site blocks them (403, 429, 451, 5xx, a network error) and the request allows premium routes. No browser, archive or rendering route: a rendered document is not the origin's bytes. tiers may narrow this to one of the two. |
| Cache | Not used: every raw fetch downloads the file again, and nothing it retrieves answers mode: "page" requests. Two downloads of an unchanged file give the same sha256. |
| Errors | too_large, timeout, http_<status>, robots_disallowed, all_tiers_failed, no_tier_allowed, domain_busy, dns_error, blocked_destination, as for every fetch. |
Billing is that of a fetch (fetch_own, or fetch_premium when the proxy
route answered, plus its bytes).
Paywalls. HTML pages carry a paywall verdict. Cormorant detects
paywalls and never circumvents them (no crawler User-Agents, cookie clearing,
script blocking or referer tricks).
paywall |
Meaning | text_complete |
|---|---|---|
hard |
text is only the teaser: the publisher declares the article subscriber-only (isAccessibleForFree: false) and the text is cut short, or a subscription call to action follows a teaser together with paywall markup, vendor scripts or truncation |
false |
metered |
a meter ("2 articles left this month") or a declared paywall, but the full text came through | true |
unknown |
weak signals only (a paywall vendor's script, paywall-like markup) | true |
none |
no paywall signal | true |
paywall_evidence lists the signals: jsonld_not_free, vendor_<name>
(piano, poool, zephr, pelcro, laterpay, steady, blendle, …),
paywall_markup, truncation_markup, phrase_<lang>, metered_<lang> (en,
de, fr, it, es, pt, zh-Hans, zh-Hant, ja, ko) and length_mismatch (declared
word count far above the extracted text; Chinese and Japanese text counts
characters, as their publishers declare it). A hard teaser is a successful fetch (error: null)
returned at once — other tiers see the same paywall — and is not cached.
Domains whose articles are repeatedly hard-paywalled skip the premium routes
(paywall_skip_premium attempts). Wayback copies of articles the publisher marks
as subscriber-only are not served (archive_blocked_paywall); the operator can allow
them per project (archive_paywalled).
Alternative sources. When the page is a hard-paywall teaser,
disallowed by robots.txt, gone (404/410, domain_dead) or blocked on every tier
(all_tiers_failed, domain_unavailable), Cormorant looks for a verified
open copy elsewhere (allow_alternates, default true):
alternate_source |
How it is found and verified |
|---|---|
publisher_feed |
tried first, for paywall teasers and blocked pages only: the article's item in the publisher's own full-text RSS/Atom feed (feeds Cormorant found linked from the publisher's pages or the operator added, and detected to carry whole articles). The item must link to the requested URL (tracking parameters ignored; match_score 1.0) or have the same title and contain ≥ 50 % of the teaser's opening word 5-grams; items that are themselves teasers (short, or ending in a subscribe call-to-action) are never used. final_url is the feed |
guardian_api |
theguardian.com URLs via the Guardian Content API (when the operator configured a key) |
europe_pmc |
PubMed Central articles (whose robots.txt keeps crawlers out): the full text from Europe PMC by PMCID (open-access subset) |
ncbi_pmc |
PubMed Central articles Europe PMC has no full text for: the full text from PubMed Central's own E-utilities (e.g. author manuscripts) |
pmc_abstract |
PubMed Central articles whose full text is open nowhere: the title and abstract only, with text_complete: false |
ncbi_pubmed |
PubMed record pages (pubmed.ncbi.nlm.nih.gov/<PMID>): title, journal, authors and abstract from NCBI's E-utilities |
pubchem |
PubChem compound pages (pubchem.ncbi.nlm.nih.gov/compound/<CID or name>): properties and descriptions from PubChem's PUG REST API |
courtlistener |
CourtListener opinion and docket pages (courtlistener.com/opinion/<id>/…, /docket/<id>/…): the case record and the opinion text from CourtListener's REST API, when the operator has set the CourtListener API token |
arxiv |
arXiv pages (arxiv.org/abs, /pdf, /html): the record from the arXiv API (same id; the version, when the URL names one), then the PDF from export.arxiv.org |
biorxiv |
bioRxiv and medRxiv pages (/content/10.1101/…): the version's JATS full text listed by api.biorxiv.org for the same DOI |
plos |
PLOS article pages (?id=10.1371/…): the article's JATS full text (CC BY 4.0) |
hal |
HAL pages (hal-…): the HAL API record for the same halId, then its main file |
zenodo |
Zenodo records (zenodo.org/records/<id>): the REST record, then its first PDF |
openreview |
OpenReview forum and PDF pages: the API note with the same id, then its PDF |
acl_anthology |
ACL Anthology pages (aclanthology.org/<id>): the paper's PDF |
open_access |
a DOI in the URL or the page's citation metadata → the best open-access location OpenAlex knows (repository, arXiv, Europe PMC, publisher OA), fetched with the standard direct route; match_score 1.0 |
syndication |
the headline is searched; copies on other sites (wire services first) are fetched with direct and accepted only if ≥ 50 % of the teaser's opening word 5-grams appear in them and they are not paywalled themselves; match_score is that share |
common_crawl |
batch fetches only (too slow for synchronous calls), for pages that are gone (404/410, domain_dead) or blocked on every tier — never for paywall teasers or robots-disallowed pages: the newest HTTP 200 capture of the exact URL in the last three Common Crawl crawls (CDX index, then the single WARC record by HTTP Range request). Domains known to be paywalled are skipped, and a capture whose markup declares the article subscriber-only (isAccessibleForFree: false) or that is itself a paywall teaser is not served. archived_at is the capture time, final_url the captured URL, html the captured page; match_score 1.0 |
A fetch of a paper page (any of the above, SSRN, a DOI link) also answers
paper: id (arxiv:…, doi:…, hal:… …), and licence and reuse
when a paper alternate served the copy (see Research papers below; the text
of an NC, ND or arXiv-licensed copy is yours to read under that licence).
The result then has tier: "source", alternate_of (the URL asked for),
final_url (the copy), text_complete: true (false for pmc_abstract) and paywall still describing
the original page. Without a verified copy the original answer stands (the
flagged teaser or the error) and attempts show what was tried.
primary_sources lists links from the page to court decisions,
government/regulator pages, press releases, DOIs and PDFs. Searching for
copies may use the Brave fallback (billed like a search). The operator can
turn alternates off per project (set-option <project> alternates off).
Provenance. redirects, headers (an allowlist of the origin's final
response headers: content type/length/language/disposition, ETag,
Last-Modified, Cache-Control, Expires, Date, Link, X-Robots-Tag — never
cookies) and origin_content_type are kept with cache entries and returned on
hits. For tier = archive, final_url is the archived copy's URL
(https://web.archive.org/web/<timestamp>id_/<url>) and archived_at the
snapshot time. The rendering tier (proxy_render) does not report the post-redirect
URL or origin headers: final_url, origin_content_type are null and
headers is empty rather than guessed.
Per-request controls. allow_premium=false removes the premium routes;
tiers restricts the ladder to the listed tiers (an empty intersection is
error: no_tier_allowed; cache hits from other tiers are not used). A premium
route listed here is tried even on a domain that refused the premium routes on
recent fetches.
timeout_s is a deadline for the whole fetch across tiers — when it runs out
the result is error: timeout with a request_timeout attempt (or the best
page so far). Without timeout_s a fetch has 60 s; a batch item with
max_wait_s has its item deadline instead, which may be much longer: set
timeout_s on such items too to bound each fetch run.
Within the deadline, one attempt on the proxy tier takes at most 90 s and
on proxy_browser at most 120 s (attempt reason attempt_timeout); the next
tier then gets its turn. country geotargets the premium routes (proxy, proxy_browser,
proxy_render). Without it, hosts in China (names under .cn, and websites of
companies registered in China) go through exits in China (CN): many of
those sites cannot be reached from elsewhere.
user_agent replaces our browser User-Agent for direct, browser, proxy
and proxy_browser (not proxy_render); it must be on the project's allowlist, which the
operator sets (set-option <project> allowed_user_agents '["…"]') — services
such as SEC EDGAR and Wikimedia require a contact User-Agent. Otherwise
403 user_agent_not_allowed. accept_language sets the Accept-Language
header / browser locale header.
Languages. language (a BCP 47 tag or a name such as taiwanese) asks
for the page in that language: it sets accept_language (zh-Hant-TW →
zh-TW,zh;q=0.9,en;q=0.5) and, when the tag names a region (zh-Hant-TW,
de-CH), the premium routes' exit country, unless the request sets them.
meta.language_versions lists the page's own versions in other languages
(<link rel="alternate" hreflang>): fetching the version you need beats
translating.
Translation. translate_to adds translation next to the original
text and title (which never change), as POST /v1/translate returns it
plus translation_id, error and reason. A page already in the target
language comes back as it is, at no charge (same_language). Up to 20,000
characters are translated in the answer; longer texts (up to 400,000) and
batch items are translated in the background: translation.status is
pending with a translation_id, and GET /v1/translations/{id} returns
pending, running, done (with translation and its billing) or
failed. Translation is billed per 1,000 source characters on
translation_quality / translation_fast, recorded as its own request
<request_id>.translate; in the answer, billing includes it. When it
cannot run, the fetch answers normally with translation.status: failed,
error: translation_unavailable and a reason, or error: too_large.
Cache hits are used only when they satisfy the request: render=always
needs a rendered copy, render=never an origin copy; HTML text must reach
min_text_chars; a cached body larger than max_bytes answers too_large
(as a fresh fetch would). Otherwise the page is fetched again. Thin pages
(thin_content: true) of blocked fetches are never cached; pages that are
simply short (the standard routes gave thin text, nothing blocked) are cached
for a day and answer flagged thin_content: true when shorter than the
request's min_text_chars. A short page a premium route rendered that reads like a missing
page, a refusal or a maintenance notice (attempt thin_content with detail
dead_page) is cached for a day the same way, so it is not rendered again.
Size limits. One table for every endpoint that fetches (POST /v1/fetch,
batch items, POST /v1/sec/documents/fetch):
| Body | max_bytes left unset |
max_bytes set |
|---|---|---|
| HTML, XHTML (ESEF reports) | 50 MB, spooled to disk above 15 MB | max_bytes |
SEC filing documents (/Archives/edgar/) |
100 MB | max_bytes |
| 50 MB synchronous, 200 MB batch items | max_bytes |
|
| JSON, XML, text, other | 15 MB (/v1/sec/documents/fetch: 50 MB) |
max_bytes, at most 50 MB |
Larger bodies answer too_large. Text is never cut except PDF text beyond
5,000 pages or 5 million characters (text_truncated); text_chars gives
the length of text.
Bot checks and shells. A page whose short text reads like a bot check or
block page ("verify you are human", "making sure you're not a bot", a
CAPTCHA) is a block even when no vendor marker names it: the attempt is
challenge_soft, the next tier and alternative sources (for PubMed Central:
Europe PMC) are tried, and such a page is never served. Vendor markers also
cover Anubis, DDoS-Guard and Vercel's checkpoint. content_flags marks what
is still suspect on a success: challenge (from a cache filled before API
1.2.0) and navigation_only (menus and links, almost no sentences: a
script-built page whose content did not render; a heuristic, so the page is
served). Where an additional content check is switched on, a page it finds to
be something other than the content is marked as well: consent_wall (a
cookie or privacy consent screen and little else), login_wall (the content
needs a sign-in), error_page (the site answered with a not-found,
unavailable or maintenance page) and navigation_only (the content did not
render). Such pages have text_complete: false; other routes are tried
first, and a consent or login wall is never cached.
Revalidation. An expired entry (or one older than cache_ttl_s) that
would otherwise satisfy the request and has an ETag or Last-Modified is
revalidated: the direct tier sends If-None-Match / If-Modified-Since.
304 Not Modified returns the cached copy with cached: true,
revalidated: true, a single direct attempt with reason not_modified,
cost_usd: 0, a new retrieved_at, and renews the entry's freshness (new
validators from the 304 are kept). Any other answer takes the normal path (a
200 replaces the entry). cache_ttl_s: 0 never revalidates. Other tiers
never send conditional requests.
Article metadata: meta#
For HTML pages meta describes the article; it is null for other content
kinds and on errors. It is kept with cache entries (identical on hits) and
included in batch results.
"meta": {
"author": "Anna Muster; Beat Beispiel",
"published_at": "2026-03-19T08:30:00Z",
"modified_at": "2026-03-19T10:05:12Z",
"language": "de-CH",
"canonical_url": "https://www.example.com/news/central-bank-cuts-rates",
"publisher": "Example Media AG",
"site_name": "Example News",
"description": "The central bank cut its policy rate by 0.25 percentage points.",
"section": "Economy",
"word_count": 1240,
"language_versions": [
{"lang": "fr-CH", "url": "https://www.example.com/fr/news/central-bank-cuts-rates"}
]
}
| Field | Meaning |
|---|---|
author |
Author name(s); several are separated by ; |
published_at |
Publication date, ISO 8601 (format below) |
modified_at |
Last modification date, ISO 8601 |
language |
Language tag (BCP 47), e.g. de-CH |
canonical_url |
Canonical URL the page declares, absolute |
publisher |
Publishing organisation |
site_name |
Name of the site or periodical |
description |
The page's own summary (at most 2,000 characters) |
section |
Section or category (the first one) |
word_count |
Words in text — what was retrieved, not what the page declares; Chinese, Japanese and Thai count each character |
language_versions |
The page's versions in other languages (<link rel="alternate" hreflang>), one per language; [] when it declares none |
Every field is null when the page does not say. Sources, in order of
preference: JSON-LD (the NewsArticle, Article, BlogPosting,
ScholarlyArticle or Report node, also inside @graph or arrays;
malformed JSON-LD is skipped or repaired, never an error), OpenGraph and
article:* meta tags, Highwire citation_* meta tags (scholarly pages),
<html lang> and <link rel=canonical> (which wins for canonical_url),
then trafilatura's metadata detection. Dates are
YYYY-MM-DDTHH:MM:SSZ (converted to UTC) when the page gives a time zone,
YYYY-MM-DDTHH:MM:SS when it gives a time without zone, and YYYY-MM-DD
(or YYYY-MM, YYYY) when it gives only a date — no time or zone is
invented.
Exact bytes: GET /v1/bodies/{sha256}#
Every fetch stores the exact bytes it retrieved, content-addressed by
sha256, and returns body_url (null when object storage is unavailable).
body_kind says what the hash covers:
origin: the HTTP entity body the origin (or the archive, fortier = archive) sent, after content-encoding (gzip/br) is removed — the bytes a plain HTTP client would hand you;rendered_dom: the document serialized by a browser (browser,proxy_render) after scripts ran — use it for text, not as proof of the origin's bytes. Non-HTML documents a browser downloads (PDFs) areorigin.
GET /v1/bodies/{sha256} (same Bearer key) streams the bytes with the origin
Content-Type, Content-Length, ETag: "<sha256>", X-Body-Kind and
Cache-Control: immutable; If-None-Match gives 304; HEAD returns the
headers only. Range: bytes=start-end (one range; bytes=start- to the
end, bytes=-n the last n bytes) answers 206 with that part and
Content-Range: bytes start-end/total, so a large body (an annual report,
an ESEF report) can be read in pages; a range starting past the end answers
416. Accept-Ranges: bytes says so on every answer. A project can download
only bodies it has retrieved itself
(fresh or from the shared cache); anything else is 404. Bodies are kept
while a cache entry points to them, a project retrieved them within the
last 30 days, or a project pins them. While storage is unavailable the
answer is 503 with Retry-After: 30; retry after that many seconds.
Pins keep a body you cite (a published report's sources) beyond that retention:
POST /v1/bodies/{sha256}/pinwith{"reference": "factsheet:US7802871084:V1", "until": null}pins a body your project may download;until(ISO 8601) ends the pin by itself,nullkeeps it until removed. Pinning again with the samereferenceupdatesuntil. Answer:sha256,reference,until,created_at,created,pins(your active pins on the body). A body you cannot download answers404witherror: body_not_found.DELETE /v1/bodies/{sha256}/pin?reference=…removes that pin (removed,pinsleft). Without an active pin the body may expire as usual.GET /v1/pins?reference_prefix=factsheet:lists your pins by reference (limitup to 1000,cursor), each withsha256,reference,until,created_at,active,bytes,content_type,body_url.GET/HEAD /v1/bodies/{sha256}addX-Pinned(true/false) andX-Pin-Count.
Pins with different references count separately. Pinned storage is not charged at present.
Tiers and escalation#
| Tier | What | Route |
|---|---|---|
direct |
HTTP with Chrome's TLS/HTTP2 fingerprint and headers, redirects, compression | standard |
browser |
Chromium (new headless) with per-site cookies; waits out JS interstitials | standard |
archive |
recent Wayback Machine snapshot (≤ 365 days), only when blocked | standard |
proxy |
residential network (several networks, failover between them) | premium (also per GB) |
proxy_browser |
Chromium on the residential network (same exit for a site's pages, locale and time zone of the exit country); waits out JS interstitials | premium (per GB) |
proxy_render |
rendering service behind residential addresses | premium |
unblocker |
unblocking service for sites behind bot protection; last resort, see below | premium |
The ladder starts at direct (or at a tier learned for the domain, see
architecture). When an https:// URL fails on direct at the connection
level (TLS error, refused connection, timeout), direct tries the same URL
once over http:// before escalating: many sites, Chinese company sites in
particular, serve no HTTPS at all. Such an answer has insecure_transport: true
(the content was not protected in transit), final_url starting with http://
and the attempt detail http_fallback. The operator can switch the fallback off
for a project (then cached pages fetched that way are not served to it either).
It escalates on network errors, HTTP 403/429/451/5xx and
bot-challenge pages (Cloudflare, Akamai, DataDome, PerimeterX, Imperva,
Kasada, generic interstitials). Thin main text escalates direct → browser
only. archive and the premium routes are used only when the other standard routes were
blocked — never for a page that is simply short. A thin answer far below an
earlier capture of the same URL (less than a quarter of its text) counts as
blocked: it is a degraded answer, not a short page, and the ladder goes on
(attempt thin_content with detail earlier_capture_<n>_chars). Definitive answers (404,
410, a 401 that asks for a login, …) are returned without escalation — a 404/410 on direct never
reaches a premium route (at most the archived copy, see below). A 418, and a
401 or 412 on a page that asks for no login (no WWW-Authenticate, no login wording, no
password field), are a web application firewall refusing the exit: they
escalate like a 403. No CAPTCHA is
solved unless the operator enabled it for the project.
The unblocker route is the last rung and runs only when every other
route failed and a bot protection — DataDome, PerimeterX, Imperva, Akamai or
AWS WAF — refused an attempt of this request (attempt reason
challenge_<vendor>), or when the domain needed it on earlier fetches. Sites
behind other protections or plain blocks never reach it. Like every premium
route it needs allow_premium (and unblocker in tiers when given) and
budget; it bills per successful call. With an explicit tiers list that
names it, a request that did not qualify shows the attempt reason
unblocker_not_needed. When the site refuses it too, the attempt reason is
unblocker_blocked. A site known to sit behind one of these protections from
earlier fetches (or whose standard routes were blocked within the hour while
the other premium routes are skipped for it) reaches the unblocker route even
when this request saw no block itself. Other unblocker failures:
unblocker_timeout (the page did not load in time; retryable),
unblocker_unreachable, unblocker_rate_limited, unblocker_unavailable,
unblocker_error:<code>, with the code in detail; a URL refused because an
expected page element never appeared is not sent to the route again for a day
(unblocker_recent_refusal). Batch items wait up to 3 minutes for this route;
synchronous calls at most 60 s (or less with timeout_s) — use a batch for
sites that need it. Government hosts stay bound by robots.txt on this route
too. A domain where the unblocker route got the page after
the other premium routes were refused skips those routes on the next fetches
(premium_skipped_domain_refuses) and goes to unblocker directly after the
standard routes.
Domains that refuse the premium routes too. When a fetch fails on every tier
and every premium route it tried was refused by the site (403/429/451, a
challenge, a rendering-tier captcha or "cannot render", the provider's
content policy —
not provider errors or timeouts) in 2 fetches in a row, the domain is
premium-blocked for 1 hour (then 4 h, then 12 h on repeats): its fetches
still try direct, browser and the archive, but skip proxy,
proxy_browser and proxy_render (attempt reason premium_skipped_domain_refuses, no premium bytes)
and go straight to the alternative sources, or fail with all_tiers_failed.
15 % of these fetches re-probe the premium routes anyway; one premium success ends
the block.
Timing. Each attempt's ms splits into wait_ms (waiting for a polite
per-domain slot) and upstream_ms (the site, browser, archive or
premium route). timing sums them for the request and adds queue_ms, the time
in Cormorant's queues before a worker ran it (synchronous: from the API to a
worker; batch: since admission, politeness requeues included; plus the render
queue after a browser handoff): {"queue_ms": 35, "politeness_wait_ms": 0, "upstream_ms": 412}. The same three components are stored per request in the
request log and summarised in GET /v1/usage.
Every attempt carries premium_bytes (what the residential network billed for it,
for proxy and proxy_browser; 0 for standard routes, proxy_render and
unblocker, which bill per call). The proxy
route can show more than one attempt: when the site refuses a residential
exit, or the network fails, the request is retried at once through another
residential network, each attempt with its own status, reason and premium
bytes. Prices are per route and do not depend on which network served the
page. A failed fetch says
which premium routes were tried in premium_routes_tried and summarises every attempt
in error_detail, e.g. "all_tiers_failed: direct (http_403, block: hard_block), browser (challenge_akamai, block: challenge), proxy (http_403, 16211 premium bytes, block: hard_block), proxy_render (http_403, block: hard_block); premium routes tried: proxy, proxy_render (16211 premium bytes)".
Block types. Attempts that reached a site (or failed talking to it) carry a
neutral block_type: ok, rate_limit, challenge (a JavaScript or CAPTCHA
check), hard_block, geo_block, login_wall, paywall, soft_404 (a
"not found" page answered with 200), empty_shell (a JavaScript application
without content), fingerprint_refusal (the site refused the client's TLS or
browser fingerprint), upstream_error or not_found. Skipped tiers have none.
It is derived from the status, headers and the page and never changes how a
fetch escalates.
Dead domains and missing pages. A host whose name does not exist
(NXDOMAIN — not a temporary DNS failure such as SERVFAIL or a timeout, which
answer error: "dns_error", retryable) twice within 6 hours is
remembered as dead for 6 hours: fetches answer error: "domain_dead" at once,
with a single {"tier": "dns", "reason": "domain_dead"} attempt and no tier
work. When a fetch ends in domain_dead or a 404/410 and allow_archive is
true (and tiers, if given, includes archive), Cormorant looks for a Wayback
snapshot (≤ 365 days) and, if there is one, returns it instead: tier: "archive", archived_at, and served_from_archive_because: "domain_dead" or
"not_found"; attempts still shows the 404 or the dead host. These stand-in
copies are not cached. The archive's paywall rules apply (no copies for known
paywalled domains or of articles marked subscriber-only, archive_blocked_paywall).
Without a snapshot the answer stays domain_dead or http_404/http_410
(with an archive_not_found attempt), and only then are alternative sources
looked for. Other definitive statuses (401, …) never use the archive.
When an http_404/http_410 answer stands (no copy was served) and
allow_alternates is true, it says where the page can still be read:
archive_snapshot is the closest Wayback Machine snapshot of the URL, of
any age — {"url": "https://web.archive.org/web/<timestamp>/<url>", "archived_at": "<ISO 8601>"} — and its url is added to
alternative_urls. The snapshot is only looked up, not fetched or checked
(older than 365 days, or with allow_archive: false, it is not served as
the page; fetch it yourself if it helps: a Wayback replay URL is fetched
as the archived document itself, its id_ form without the Wayback toolbar,
and the answer keeps the URL you asked for). No suggestion for articles whose
archived copies are not served (archive_blocked_paywall); null when the
archive has none or does not answer within a few seconds.
{
"url": "https://www.example.com/old-report",
"status": 404,
"error": "http_404",
"attempts": [
{"tier": "direct", "status": 404, "reason": "http_404", "ms": 180},
{"tier": "archive", "status": null, "reason": "archive_not_found", "ms": 420}
],
"archive_snapshot": {
"url": "https://web.archive.org/web/20230914081522/https://www.example.com/old-report",
"archived_at": "2023-09-14T08:15:22+00:00"
},
"alternative_urls": [
"https://web.archive.org/web/20230914081522/https://www.example.com/old-report"
]
}
render=never uses direct → archive → proxy; render=always uses
browser → proxy_browser → proxy_render.
Verification checks on premium routes. When proxy_browser passes a
site's verification check, later proxy fetches of that site may reuse it
for a while (attempt detail: clearance_reused); when the site checks again,
the next route takes over. A check that is still showing after waiting can be
solved by a solving service when the operator has enabled one (attempt
detail: captcha_solver, captcha_solver_http when the page came through a
plain connection with the solved check, or captcha_solver_failed); the solve is part of
the attempt's cost. A project can switch solving off (ask us).
Known hard domains. For sites on Cormorant's list of hard domains
(nestle.com, nestleusa.com, beyondmeat.com, apnews.com, nytimes.com,
researchgate.net, … — see Fetching → Known hard
domains) tiers that do not work for the
site are skipped (hard_domain_skip attempts), the residential exit country is
pinned (unless the request sets country) and proxy_render starts at the
site's difficulty. Errors — and archive or alternative copies standing in —
carry hint (the recommended route) and, on errors, alternative_urls. An
explicit tiers list overrides the route. The proxy tier sends GET requests
with Chrome's TLS/HTTP2 fingerprint, like direct.
attempts[].reason values include ok, thin_content, not_modified,
challenge_<vendor> (challenge_soft: a bot check found in the text), http_<status>, timeout, tls_error, dns_error,
dns_nxdomain, domain_dead, network_*, not_configured, budget_exhausted,
hard_domain_skip, learned_skip_browser (the browser met a bot challenge on
this site repeatedly, or could not reach a site in China that direct could not
reach either; skipped for a day, a small share of requests still tries it), unreachable (a premium route's exit could not reach the site — common for
sites in China from elsewhere: the route is tried once more through China for a
Chinese host, and the residential browser is then skipped with
unreachable_skip), own_egress_busy, unblocker_not_needed, unblocker_blocked,
archive_not_found, archive_unavailable / archive_rate_limited /
archive_timeout (the Wayback Machine could not be asked or was too slow;
the ladder goes on), archive_busy / archive_breaker_open (Cormorant held
the archive back to stay within its request budget, or while it is failing;
the tier was skipped, the ladder goes on), premium-route reasons (…_captcha_rejected,
…_no_credits, …_render_503, …_render_403, scraper_api_<status>), …_render_busy
(the rendering route was at its limit of pages in flight; the tier was skipped),
pmc_api_first (a PubMed Central article: the premium routes are skipped, the
article comes from the PMC API), paywall (teaser
of a hard paywall, returned as is), paywall_skip_premium, premium_skipped_domain_refuses,
archive_blocked_paywall, and
for the alternative-source steps (tier: source) alternate_<source> (with the copy's
URL in detail), syndication_candidates_<n>, open_access_none,
open_access_miss, guardian_api_miss, publisher_feed_miss,
publisher_feed_teaser, common_crawl_none, common_crawl_not_free,
common_crawl_paywalled_domain, common_crawl_index_error (the Common Crawl
index could not be read; detail says what failed, e.g. CC-MAIN-2026-43: http_504 — Common Crawl is then skipped for all requests for a while, without
an attempt row), common_crawl_record_error, source_timeout. proxy_render attempts carry
detail with the difficulty used (low, medium, high); proxy_browser
attempts captcha_solver / captcha_solver_http / captcha_solver_failed when a check was solved or
solving failed; proxy attempts clearance_reused (see above); other attempts
omit detail. Busy rendering-tier answers (…_render_503) are retried
once and appear as two attempts.
Large HTML. HTML bodies above 15 MB (allowed by a larger max_bytes, up
to 100 MB, or the SEC filing default) are read from disk, never held in memory:
text is the document's visible text in reading order (scripts, styles and
hidden inline XBRL headers left out; no main-text heuristics; at most
5,000,000 characters, then text_truncated: true), html is null and the
document itself is at body_url.
Errors#
error |
Meaning |
|---|---|
invalid_url |
not an http(s) URL |
blocked_destination |
Cormorant's address safety check refused the host: it resolves to a private, loopback, link-local or metadata address (also after redirects), or is not a public host name. Not a policy about the site |
dns_error |
the host name did not resolve right now (SERVFAIL, a resolver timeout, a name without addresses; asked twice): retry after retry_after_s (60). Before API 1.2.0 this was blocked_destination with reason dns_error |
robots_disallowed |
robots.txt disallows the path for CormorantBot/* and premium routes are not allowed for this request (allow_premium: false, or the key has no premium requests left). By default robots.txt binds Cormorant's own addresses only (the operator can make it binding on every route): with premium routes allowed, a disallowed page skips direct and browser (attempts with reason robots_skip_own) and is fetched through the premium routes; the answer then has robots_disallowed: true, so you can filter such pages. Search, cart, login, account and similar URLs (reason: robots_low_value_path) are not fetched that way. Government hosts: robots.txt binds every route, the premium routes included — a page it disallows answers robots_disallowed whatever allow_premium says (see robots.txt and government hosts below). A project can keep robots.txt binding on every route for all hosts (project option respect_robots: strict, set by the operator). Wikimedia's APIs (/w/api.php, the Wikidata query service /sparql, /api/rest_v1/, Special:EntityData) are interfaces for programs: robots.txt does not apply to them, they are fetched directly with Cormorant's declared User-Agent |
source_terms |
the site's terms forbid automated access (Google Scholar, SSRN), so Cormorant never contacts it on any route and serves no cached copy, whatever tiers or the robots options say. For a paper with a DOI (SSRN papers have 10.2139/ssrn.<id>) Cormorant looks for an open copy elsewhere first (alternate_source: open_access). hint and alternative_urls say where else to look. |
too_large |
body exceeds its limit (see Size limits) |
pdf_not_accepted |
PDF with accept_pdf=false |
http_<status> |
definitive upstream status (e.g. http_404) |
all_tiers_failed |
every allowed tier failed or was blocked (status = last HTTP status; error_detail and premium_routes_tried say what was tried) |
domain_unavailable |
every tier failed for this domain in 3 consecutive fetches: it is skipped for a while (10 min, then 30 min, 2 h, 6 h; 5 min when a provider's own error was among the failures); retry_after_s says when to try again. Any success ends the skip |
domain_dead |
the host name does not exist (NXDOMAIN twice within 6 h); answered at once for 6 h, without trying. With allow_archive, a snapshot is returned instead when one exists (served_from_archive_because: "domain_dead") |
deadline |
batch fetch: the item's max_wait_s ran out before any page was fetched (attempts lists what was tried; reason says what it was waiting for) |
timeout |
timeout_s ran out (see per-request controls), or a large PDF took longer than 5 minutes to download (attempt reason pdf_download_timeout) |
no_tier_allowed |
tiers/allow_premium left no tier to try |
politeness_timeout |
could not get a per-domain slot in time (transient; batch items are requeued) |
domain_busy |
synchronous calls only, with HTTP 503 and Retry-After: the expected wait for one of the domain's polite slots exceeds the 15 s a synchronous call waits; retry_after_s is that expected wait. When the site already blocked Cormorant's own addresses in this request, the premium routes are tried first (the skipped own routes show as attempts with reason own_egress_busy), and domain_busy is answered only when they fail too. Lower the parallelism per domain or use a batch (whose items wait instead) |
sec_not_configured |
SEC EDGAR URL, but the operator has not configured Cormorant's SEC identity: SEC is disabled |
rate_limited |
SEC EDGAR URL: the cluster-wide SEC rate limit (at most 10 requests/s for all clients) had no slot within 10 s; retry after retry_after_s (transient) |
sec_unavailable |
SEC EDGAR throttled (403/429/503: all SEC requests back off), failed (5xx) or could not be reached; retry after retry_after_s (transient) |
redirect_not_allowed |
SEC EDGAR URL that redirected to a host outside SEC (not followed) |
premium_route_required |
a host fetched only through premium routes with allow_premium: false or a tiers list without proxy/proxy_render |
budget_exhausted |
such a host, and the project's budget leaves nothing for the premium routes |
Recent failures. A URL that answered http_404 or http_410 is answered
with that error for 24 hours, and one that ended in all_tiers_failed after
the premium routes were tried for 6 hours, without fetching it again: the
answer has cached: true, one attempt with tier recent and the
recorded reason, and retry_after_s says when it is
fetched again. Pass cache_ttl_s: 0 to fetch it now; a
success then clears the record. A request narrowed to some tiers (tiers)
is never recorded, but it is answered from a full-ladder failure.
robots.txt and government hosts
Since 2026-10-23, robots.txt is binding on every route for government
hosts: Cormorant's own addresses and the premium routes alike. A page such a
host's robots.txt disallows for CormorantBot/* answers
error: "robots_disallowed" and is not fetched; such hosts never answer with
robots_disallowed: true. A host is a government host when
- its top-level domain is
.gov,.milor.int; - it is under a government second-level domain of a country code:
gov.<cc>(.gov.uk,.gov.au,.gov.cn,.gov.in,.gov.br,.gov.it…),govt.<cc>(.govt.nz),gouv.<cc>(.gouv.fr,.gouv.qc.ca),gob.<cc>(.gob.mx,.gob.es),gv.<cc>(.gv.at),gub.<cc>,mil.<cc>, andgo.<cc>forjp,kr,id,th,ke,tz,ug,cr,ci,bw,zm(.go.jp,.go.kr…); - or it is, or is under, one of:
admin.ch,ch.ch, the Swiss cantons' domains (zh.ch,be.ch,vd.ch… all 26),llv.li,bund.de,bundesregierung.de,bundestag.de,europa.eu,gc.ca,canada.ca,fgov.be,belgium.be,overheid.nl,rijksoverheid.nl,parliament.uk,police.uk,nhs.uk.
The operator can exempt single hosts from robots.txt (hosts that serve
published open data files for download). Such a host is fetched from
Cormorant's own addresses, and access reports name the exemption instead of
calling the path allowed. A project with respect_robots: strict keeps
robots.txt binding for these hosts too.
The operator can exempt a project (project option respect_robots: own_addresses: robots.txt then binds Cormorant's own addresses only, also for
government hosts). Allowed paths of government hosts are fetched as before.
When no tier reaches min_text_chars, the best capture is returned with
error: null, thin_content: true and text_complete: false: a live capture
always before an archived (tier: archive) one, then the one with the most
text. It is never a plain success — check thin_content (or text_complete)
before relying on the text. A PDF without extractable text (a scan without
a text layer) is returned with pdf_no_text: true, text: "" and
text_complete: false; its bytes are in body_url (Cormorant does no OCR).
Both flags are additive fields: existing clients see the same error and
tier as before.
min_text_chars counts Latin-script characters of the same content: a
Chinese or Japanese character counts as three, a Korean one as two, a Thai
one as 1.3, so the default 500 fits pages in every language (a whole Chinese
news story is often under 500 characters).
lang is the language of text: the page's own tag (<html lang>, JSON-LD
inLanguage, og:locale; lang_source: declared) when the text agrees with
it or is too short to tell, else the language detected from the text
(detected, e.g. a translated page that kept its template's lang="en").
Chinese always carries its script (zh-Hans, zh-Hant), told apart by the
characters only one of them uses; a declared region is kept (zh-Hant-TW).
meta.language stays the page's declaration as written. Pages in GBK/GB2312,
Big5, Shift_JIS, EUC-JP and EUC-KR decode correctly also when the charset is
undeclared or labelled with the narrower legacy name.
Batch: POST /v1/batch/search and POST /v1/batch/fetch#
{
"items": [{"query": "..."}, {"query": "..."}], // same objects as the single endpoints
"idempotency_key": "acme-run-2026-10-20-search-0001",
"callback_url": "https://acme.example/hooks/cormorant" // optional
}
Response 202 {"job_id": "…", "created": true}. Re-posting the same
idempotency_key returns the existing job (200, created: false); the same
key with a different kind or item count is 409. Up to 50,000 items per job.
Search items take the same safesearch, group_or, entity and
entity_filter fields as POST /v1/search. Fetch items may set
"include_html": true to keep the HTML in stored results
(default: text only). Batch fetch items that leave max_bytes unset accept
PDFs up to 200 MB (see Large PDFs above).
Items are admitted to the queues gradually (fair share across running jobs), executed with the same logic as the single endpoints, and retried with backoff only for transient problems. A batch fetch item blocked on our own tiers is retried once after a cool-down before a premium route is used.
Per-item deadline (max_wait_s, batch fetch only). A fetch item may set
"max_wait_s": 300 (10–86,400 s), and the batch body may set max_wait_s as
the default for items without their own. It counts from when the job admits
the item to the queues and covers everything after that: polite waits for a
busy site, requeues, the cool-down retry, slow routes. When it runs out the
item stops escalating — no further tier, requeue or premium route — and
answers with the best page so far (a success, flagged thin_content when
short), else error: "deadline" with the attempts made (earlier runs'
included). The cool-down retry is skipped when it would end after the
deadline; the premium routes are then tried at once. Without max_wait_s an
item takes as long as polite fetching needs (most items finish in minutes; a
few on busy or blocking sites can take 20 minutes or more).
{"items": [{"url": "https://example.com/a"}, {"url": "https://example.com/b", "max_wait_s": 120}],
"idempotency_key": "run-0001", "max_wait_s": 300}
When the job completes, callback_url receives a POST with
{"job_id","kind","status","total","succeeded","failed","finished_at"} (3
attempts; private addresses are refused). The host is resolved once, checked,
and the connection goes to that checked address (Host header and TLS name
stay the callback's host name), so a DNS answer that changes in between cannot
redirect it; redirects are not followed.
GET /v1/jobs/{job_id}#
{
"job_id": "1d0c...",
"kind": "fetch",
"status": "running", // queued | running | completed | cancelled
"counts": {"total": 3000, "pending": 1200, "queued": 380, "done": 1390, "failed": 30, "cancelled": 0},
"created_at": "...", "updated_at": "...", "finished_at": null,
"callback_url": null, "callback_status": null,
"items_url": "/v1/jobs/1d0c...?include=items&offset=0&limit=100"
}
Add ?include=items&offset=0&limit=1000 (max 1000) to page through item
results, optionally &status=failed:
"items": [
{"index": 0, "status": "done", "input": {"url": "..."}, "result": { ...fetch response... }, "error": null}
]
Retention: jobs and their item results are kept for 30 days after the job
finishes, then deleted (JOB_RETENTION_DAYS). Download results you need to
keep before that. If a stored result cannot be read (object storage
unavailable), the item has "result": null and "error": "result_unavailable";
retry the request later.
DELETE /v1/jobs/{job_id}#
Cancels the job: no new items are admitted (the admission pump runs every
3 s, well within 60 s), pending items become cancelled, queued items skip
themselves. Returns the job status. Jobs are only visible to their project.
Data catalogues: GET /v1/catalogs/opendata-swiss/datasets/{dataset_id}#
Resolves a dataset of opendata.swiss into its
files. dataset_id is the dataset's name on the portal (the last part of
its page address, e.g. health-insurance-premiums) or its catalogue id.
{
"catalog": "opendata-swiss",
"dataset_id": "health-insurance-premiums",
"url": "https://opendata.swiss/de/dataset/health-insurance-premiums",
"title": {"en": "Health insurance premiums"}, // per language that has text: de, fr, it, en
"description": {"en": "…"},
"publisher": {"name": "Bundesamt für Gesundheit BAG", "url": "https://www.bag.admin.ch"},
"organization": {"id": "…", "name": "bundesamt-fur-gesundheit-bag", "title": {"en": "…"}},
"contact_points": [{"name": "…", "email": "…"}],
"issued": "2016-09-26T00:00:00", // dates as the catalogue states them
"modified": "2026-09-23T00:00:00",
"metadata_modified": "2026-09-23T09:14:02.123456",
"temporal": [{"start": "2027-01-01T00:00:00", "end": "2027-12-31T00:00:00"}],
"accrual_periodicity": "http://publications.europa.eu/resource/authority/frequency/ANNUAL",
"keywords": {"en": ["premiums"]},
"terms": null, // the dataset's own terms: usually none
"resource_terms": [{"code": "terms_by", "…": "…"}], // distinct terms of the resources
"terms_url": "https://opendata.swiss/de/terms-of-use",
"resources": [
{
"resource_id": "…",
"title": {"en": "Prämien_CH.csv"},
"description": {},
"format": "CSV",
"media_type": "text/csv",
"download_url": "https://…", // fetch with POST /v1/fetch, mode raw
"access_url": "https://…",
"bytes_declared": 204515, // as declared: often wrong
"issued": "2026-09-23T00:00:00",
"modified": "2026-09-23T00:00:00",
"terms": {
"code": "terms_by", // terms_open | terms_by | terms_ask | terms_by_ask | null
"url": "https://opendata.swiss/de/terms-of-use#terms_by",
"attribution": "required", // required | recommended
"commercial_use": "allowed", // allowed | permission_required
"as_stated": "https://opendata.swiss/terms-of-use#terms_by"
}
}
],
"source_url": "https://opendata.swiss/api/3/action/package_show?id=health-insurance-premiums",
"retrieved_at": "2026-11-13T09:00:00Z",
"cached": false,
"request_id": "…"
}
- Terms of use are per resource. opendata.swiss states them on each
file, and files of one dataset can differ; the dataset's own
termsis usuallynull. A statement Cormorant does not know is passed on inas_statedwithcode: null; nothing is inferred. bytes_declaredis not the file's size. The catalogue's figure is often wrong. Usebytesandsha256of the fetch, andmodifiedas the sign that a file changed.- Texts are returned in the languages the catalogue fills in, which is often one only. Dates are passed on as stated.
- The answer is cached for five minutes. Each call is charged as one fetch.
- Errors:
404dataset_not_found,502catalog_unavailable(the portal did not answer usably; try again later), both as{"detail": {"error", "message", "request_id"}}.
File directory: GET /v1/catalogs/astra-ivz/files#
The open vehicle data of the Federal Roads Office (ASTRA) at
https://opendata.astra.admin.ch/ivzod/ is a plain file index, not a
catalogue: nothing but the listing describes a file. This route returns one
folder of it as entries.
| Parameter | Meaning |
|---|---|
path |
The folder under /ivzod/, e.g. 3000-eDatenblatt/. Left out: the root. It is the path of a folder entry. |
offset |
Position of the first entry returned (default 0). |
limit |
Most entries returned (default 200, at most 1000). |
{
"catalog": "astra-ivz",
"path": "3000-eDatenblatt/",
"url": "https://opendata.astra.admin.ch/ivzod/3000-eDatenblatt/",
"parent": "", // the folder above; null at the root
"entries": [
{
"name": "eDatenblatt.csv",
"type": "file", // directory | file
"path": null, // a folder: the path to list it with
"url": "https://opendata.astra.admin.ch/ivzod/3000-eDatenblatt/eDatenblatt.csv",
"size_text": "831M", // as the index shows it; null for a folder
"bytes_approx": 871366656, // size_text in bytes (binary units), not the exact size
"modified": "2026-11-04T07:59+01:00",
"modified_text": "2026-11-04 07:59",
"format_guess": "CSV" // from the file name; null when unknown
}
],
"total": 2, // entries the folder has
"offset": 0,
"limit": 200,
"truncated": false, // true: more than 300,000 entries, total stops there
"terms": {"code": null, "url": "https://www.admin.ch/de/rechtliches",
"attribution": "not_stated", "commercial_use": "not_stated",
"as_stated": "none stated by the directory"},
"source_url": "https://opendata.astra.admin.ch/ivzod/3000-eDatenblatt/",
"retrieved_at": "2026-11-13T12:00:00Z",
"cached": false,
"request_id": "…"
}
- Sizes are rounded. The index shows
831Mfor a file of 871,362,543 bytes.bytes_approxis computed from that text. The exact size isbytesof the download. - Times are Swiss local time. The index states no zone;
modifiedadds the offset.modified_textis the text as shown. - Entries come in the index's order (by name). One folder,
4100-json-Files/, holds over 100,000 files: read it in pages withoffsetandlimit. - Terms. The directory states no terms of its own.
termspoints to the federal administration's legal notice and saysnot_statedwhere it is silent. Nothing is inferred. - A listing is used for 15 minutes, and for 6 hours when the folder has
more than 5,000 entries. Reading the index is charged as one fetch; an
answer with
cached: trueis not charged. - Downloading a file. Pass an entry's
urltoPOST /v1/fetchwithmode: "raw"(files up to 250 MB), or as a batch item. On this host a batch item that leavesmax_bytesandtimeout_sunset may be up to 2 GB and take up to 30 minutes, which covers the two files of more than 800 MB. - Errors:
422invalid_path,404path_not_found,413listing_too_large(an index page over 64 MB),502catalog_unavailable,503storage_unavailable, all as{"detail": {"error", "message", "request_id"}}.
The directory is also the source astra.ivz of GET /v1/sources (kind
file_directory, no editions).
Source catalogue: GET /v1/sources#
Named public sources with their yearly editions. A source is a file or page
a publisher keeps at a known place, such as the approved Swiss health
insurance premiums (bag.okp.premiums) or the premium regions
(priminfo.regions). An edition is that file for one year.
GET /v1/sourceslists the catalogue (items). Not charged.GET /v1/sources/{source_id}returns one source and, inlatest, the newest edition Cormorant holds. Nothing is downloaded; not charged.GET /v1/sources/{source_id}/editions/{year}returns the file for that year.
A source:
{
"source_id": "bag.okp.premiums",
"title": "Approved premiums of the compulsory health insurance",
"publisher": "Bundesamt für Gesundheit BAG",
"kind": "catalog_resource", // catalog_dataset | catalog_resource | yearly_url | page | file_directory | stac_collection | geo_file
"format": "CSV",
"url": null, // page, dataset or yearly pattern; null for a catalogue file
"url_pattern": null, // yearly_url: the address with {year}
"catalog": "opendata-swiss",
"dataset_id": "health-insurance-premiums",
"resource_id": "0b9f074d-d457-4ec0-807d-bcf5596ac60a",
"file_name": "Prämien_CH.csv",
"has_editions": true, // false for pages
"check": "with bag.okp.dataset",
"terms": null, // catalogue files: stated per edition; others: a reviewed entry
"note": null,
"canton": null, // cantonal sources: the canton, e.g. "ZH"
"language": null // cantonal sources: the language of the address
}
The catalogue holds one source per canton for the office in charge of the
premium subsidy: canton.<xx>.subsidies (canton.zh.subsidies), with the
office as publisher, the canton and the language of the address. They
are the offices and addresses of the BAG's list "Für die
Prämienverbilligung zuständige Stellen" (September 2026). Several
addresses are the office's or the canton's home page. Their terms of use
are not reviewed (terms: null); GET /v1/sources/{source_id}/access
reports what the office's robots.txt says. Watch one with
{"source_id": "canton.zh.subsidies"}, or search the office's site for
its documents with POST /v1/discover.
An edition (GET /v1/sources/bag.okp.premiums/editions/2027):
{
"source_id": "bag.okp.premiums",
"year": 2027,
"file_name": "Prämien_CH.csv",
"url": "https://…", // where the file was downloaded
"sha256": "957fef82…",
"bytes": 25832930,
"content_type": "application/octet-stream",
"content_kind": "dataset",
"encoding": "utf-8",
"bom": true,
"body_url": "https://…/v1/bodies/957fef82…",
"etag": null, // as the origin sends them; this host sends none
"last_modified": null,
"origin_modified": "2026-09-29T00:00:00", // the file's date in the catalogue
"retrieved_at": "2026-11-13T09:00:00Z",
"checked_at": "2026-11-13T09:00:00Z",
"cached": false, // true: the kept version answered, nothing downloaded
"stale": false, // true: a new download was due and could not be made
"blocked_until": null,
"archive": null, // {url, sha256, member, body_url} when read from a yearly archive
"terms": {"code": "terms_open", "url": "https://opendata.swiss/de/terms-of-use#terms_open",
"attribution": "recommended", "commercial_use": "allowed", "as_stated": "…"},
"request_id": "…"
}
Which file is the edition.
- A file of an opendata.swiss dataset (
catalog_resource): the edition of the year the dataset covers is the file itself. An earlier year is the same file inside the dataset's yearly archive;archivethen names the archive and the file's path in it, andfile_nameis the name as the archive writes it. A later year answers404 edition_not_published, a year without an archive404 edition_not_available. - A file whose address carries the year (
yearly_url): that address. A year that is not out answers404 edition_not_published. Publishers often remove the previous year's file; Cormorant then has it only if it was retrieved while it was online. - Pages (
page) have no editions:404 source_has_no_editions.
When the publisher is asked. The kept version answers (cached: true)
while it is current: for a catalogue file while the catalogue's date of the
file is unchanged and the last download is less than a week old, for a
yearly address for one day. Otherwise the file is downloaded once and the
new version is kept beside the earlier ones; an unchanged file gives the
same sha256. A yearly archive is downloaded once for all files of that
year. A download is charged as one fetch (fetch_own, or fetch_premium
when the premium route was needed); an answer from the kept version
downloads nothing. For a catalogue file every call also reads the
catalogue, which is recorded as one fetch (answered from the cache within
five minutes).
When the publisher's host refuses. The download runs from Cormorant's
own addresses and, when those are refused and your key allows premium
routes, once through the premium route with a Swiss exit. A host that
refuses is then left alone: for 24 hours after the first refusal, 3 days
after the second, 7 days after later ones. Meanwhile the kept version is
returned with stale: true and blocked_until; without a kept version the
answer is 503 source_blocked. Data already retrieved is never removed.
Terms of use travel with every edition: for catalogue files as opendata.swiss states them for that file, for other sources an entry reviewed by a person with the publisher's own wording and the date it was read. Cormorant reports them and does not judge whether your use is covered.
Errors, as {"detail": {"error", "message", …}}: 404 source_not_found,
source_has_no_editions, edition_not_published, edition_not_available;
502 source_unavailable (the download failed and nothing is kept;
fetch_error names why), 502 catalog_unavailable; 503 source_blocked.
Geodata: GET /v1/geodata/...#
An index of public Swiss geodata files: swisstopo's STAC collections (terrain, orthophotos, buildings, landscape model, names, addresses), the federal building register's public export and an OpenStreetMap extract of Switzerland. For each file the index keeps where the publisher serves it, its checksum, its edition and its box, and it records what changed. A builder of 3D scenes, maps or analyses reads which files cover an area and asks only for the tiles that changed since its last run.
Coordinates are Swiss LV95 (EPSG:2056) metres throughout. A bbox
parameter is minE,minN,maxE,maxN; with bbox_crs=4326 it is
minLon,minLat,maxLon,maxLat in WGS84 degrees. It answers
422 invalid_bbox unless it is four finite numbers (no inf or nan)
with each minimum at most its maximum, longitudes within ±180 and
latitudes within ±90, and the box overlaps the index's box (Switzerland,
Liechtenstein and the bands across the border: LV95
2440000,1040000,2880000,1340000); nothing outside is indexed. With
bbox_crs=2154 (Lambert-93) or 25832 (ETRS89 / UTM 32N) the box is in
that grid's metres (see "Across the border" below).
GET /v1/geodata/sourceslists the geodata sources with their freshness and how many files the index holds.GET /v1/geodata/tiles?source_id=&bbox=&status=current&cursor=&limit=500lists the files of a source, optionally those whose tile overlapsbbox.statusiscurrent(default),superseded,withdrawnorall. Paged bynext_cursor.format=geojsonreturns the page as a GeoJSON FeatureCollection (application/geo+json): one Polygon per file (itsbox_lv95), the other fields asproperties,next_cursorbesidefeatures;crs=4326gives WGS84 coordinates, otherwise LV95 metres (crs_epsg: 2056).GET /v1/geodata/tiles/{source_id}/{tile_key}returns every edition of one tile, newest first._is the tile of a source with one file for the whole country.GET /v1/geodata/changes?after=&source_id=&bbox=&limit=500is the change feed, in order. Keep the lastidyou read and pass it asafter.
Index reads ask no publisher. Each call is recorded as one geodata
request in usage and is not charged. The geodata sources are also listed by
GET /v1/sources (kinds stac_collection and geo_file).
The sources (generated from the catalogue; "Whole country" is the measured size of the current edition of every tile, about ±20 %):
<!-- generated: sources-geodata -->
source_id |
What it is | Format | Files by | Whole country | Publisher |
|---|---|---|---|---|---|
swisstopo.buildings3d |
swissBUILDINGS3D 3.0: buildings with roof shapes (LOD2), per map sheet | FileGDB (ZIP) | map sheet | 14 GB | swisstopo |
swisstopo.buildings3d.national |
swissBUILDINGS3D 3.0: buildings of the whole country, one file per year | FileGDB (ZIP) | one file | 14 GB | swisstopo |
swisstopo.alti3d.2m |
swissALTI3D: terrain model, 2 m grid, per km tile | GeoTIFF (COG) | 1 km tile | 45 GB | swisstopo |
swisstopo.alti3d.05m |
swissALTI3D: terrain model, 0.5 m grid, per km tile | GeoTIFF (COG) | 1 km tile | 684 GB | swisstopo |
swisstopo.swissimage.2m |
SWISSIMAGE 10 cm, resampled to 2 m: aerial images per km tile | GeoTIFF (COG) | 1 km tile | 7 GB | swisstopo |
swisstopo.swissimage.10cm |
SWISSIMAGE 10 cm: aerial images per km tile | GeoTIFF (COG) | 1 km tile | 2.36 TB | swisstopo |
swisstopo.surface3d.raster |
swissSURFACE3D Raster: surface model (trees, bridges, buildings), 0.5 m, per km tile | GeoTIFF (COG) | 1 km tile | 636 GB | swisstopo |
swisstopo.surface3d |
swissSURFACE3D: LiDAR point cloud per km tile | COPC LAZ or LAS (ZIP) | 1 km tile | 10 TB | swisstopo |
swisstopo.tlm3d |
swissTLM3D: roads, rail, water, land cover, single trees | GeoPackage (ZIP) | one file | 4.8 GB | swisstopo |
swisstopo.names3d |
swissNAMES3D: place and feature names | GeoPackage | one file | 460 MB | swisstopo |
swisstopo.boundaries3d |
swissBOUNDARIES3D: borders of the country, cantons, districts and municipalities | Shapefile (ZIP) | one file | 36 MB | swisstopo |
swisstopo.address_directory |
Official building address directory: EGID and address | FileGDB (ZIP) | canton | 150 MB | swisstopo |
bafu.vhm |
Vegetation height model of the national forest inventory (stereo), per year | GeoTIFF | one file | 18 GB | BAFU |
bafu.vhm.lidar |
Vegetation height model of the national forest inventory (LiDAR), per year | GeoTIFF | one file | 27 GB | BAFU |
bfe.solar.roofs |
Solar suitability of roofs (generalized) | GeoPackage (ZIP) | one file | 1.1 GB | BFE |
bafu.noise.road.day |
Road traffic noise, day | GeoTIFF | one file | 550 MB | BAFU |
bafu.noise.road.night |
Road traffic noise, night | GeoTIFF | one file | 550 MB | BAFU |
bfs.gwr.heating |
Building register: heat sources of buildings | CSV (ZIP) | one file | 60 MB | BFS |
bfs.gwr |
Federal register of buildings and dwellings (GWR), public export | CSV (ZIP) | one file | 950 MB | BFS |
osm.switzerland |
OpenStreetMap extract of Switzerland (Geofabrik) | OSM PBF | one file | OpenStreetMap | |
swisstopo.buildings3d.tiles3d |
swisstopo's 3D Tiles of all buildings (reference, streamed by apps) | 3D Tiles (JSON) | reference, not a file | swisstopo | |
swisstopo.wmts |
swisstopo WMTS capabilities (maps, incl. the Zeitreise historic maps) | WMTS capabilities (XML) | reference, not a file | swisstopo | |
ign.rgealti.1m |
RGE ALTI®: terrain model of France (bare ground), 1 m grid, per km tile | GeoTIFF | 1 km tile, Lambert-93 | IGN | |
ign.rgealti.5m |
RGE ALTI®: terrain model of France (bare ground), 5 m grid, per 5 km tile | GeoTIFF | 5 km tile, Lambert-93 | IGN | |
ign.bdortho.20cm |
BD ORTHO®: aerial photos of France (natural colour), 20 cm, per 5 km tile | JPEG2000 | 5 km tile, Lambert-93 | IGN | |
ign.bdtopo.batiment |
BD TOPO® V3, buildings (bâti / batiment): footprints with heights, per km tile | GeoPackage | 1 km tile, Lambert-93 | IGN | |
ban.adresses |
Base Adresse Nationale: every address of the département, with its position | CSV | one file | Base Adresse Nationale (IGN, DINUM, ANCT) | |
lgl-bw.dgm1 |
DGM1: terrain model of Baden-Württemberg (bare ground), 1 m grid, per 2 km tile | GeoTIFF | 2 km tile, ETRS89 / UTM 32N | LGL | |
lgl-bw.lod2 |
LoD2: 3D buildings of Baden-Württemberg with roof shapes (CityGML), per 2 km tile | CityGML 1.0 (ZIP) | 2 km tile, ETRS89 / UTM 32N | LGL | |
lgl-bw.dop20 |
DOP20: aerial photos of Baden-Württemberg (natural colour), 20 cm, per 2 km tile | GeoTIFF (ZIP) | 2 km tile, ETRS89 / UTM 32N | LGL | |
bs.baumkataster |
Basel-Stadt tree register (Baumkataster): trees of the city and of Riehen | GeoJSON | one file | Kanton Basel-Stadt | |
| <!-- /generated --> |
swisstopo.buildings3d.tiles3d and swisstopo.wmts are references: the
index follows when swisstopo publishes a new 3D Tiles build or new map
layers, and apps read those from swisstopo directly.
A source:
{
"source_id": "swisstopo.alti3d.2m",
"title": "swissALTI3D: terrain model, 2 m grid",
"publisher": "Bundesamt für Landestopografie swisstopo",
"kind": "stac_collection", // stac_collection | geo_file
"format": "GeoTIFF (COG)",
"stac_collection": "ch.swisstopo.swissalti3d",
"tile_scheme": "km", // km | sheet | canton | single
"default_mirror": "none",
"share_alike": false, // true for ODbL data (OpenStreetMap)
"terms": {"code": null, "url": "https://www.swisstopo.admin.ch/en/…", "attribution": "required", "quote": "© swisstopo", "checked_at": null},
"attribution": "© swisstopo",
"note": null,
"current_bytes_estimate": 45000000000,
"files": {"current": 43590, "superseded": 1210, "withdrawn": 0, "mirrored": 0, "mirrored_bytes": 0},
"state": "fresh", // fresh | seeding | stale | failing | blocked
"last_check_at": "2026-11-17T06:00:00Z",
"last_full_sync_at": "2026-11-15T02:10:00Z",
"origin_newest_updated": "2026-09-26T03:45:05Z",
"indexed_newest_updated": "2026-09-26T03:45:05Z",
"lag_s": 0, // how far the index is behind the publisher's newest change
"last_error": null
}
A file (GET /v1/geodata/tiles):
{
"id": 81234,
"source_id": "swisstopo.alti3d.2m",
"tile_key": "2670-1254",
"edition": "2026",
"edition_year": 2026,
"stac_item_id": "swissalti3d_2026_2670-1254",
"asset_key": "swissalti3d_2026_2670-1254_2_2056_5728.tif",
"origin_href": "https://data.geo.admin.ch/ch.swisstopo.swissalti3d/swissalti3d_2026_2670-1254/swissalti3d_2026_2670-1254_2_2056_5728.tif",
"media_type": "image/tiff; application=geotiff; profile=cloud-optimized",
"gsd": 2.0,
"checksum_sha256": "6f1c…",
"etag": null,
"bytes": null, // STAC states no size; files outside STAC have it
"asset_updated": "2026-09-26T03:45:03Z",
"item_updated": "2026-09-26T03:45:03Z",
"status": "current", // current | superseded | withdrawn
"superseded_by": null,
"mirrored": false,
"mirrored_at": null,
"download_url": null, // a short-lived link to Cormorant's copy, when one is kept
"box_lv95": [2670000, 1254000, 2671000, 1255000]
}
A change (GET /v1/geodata/changes):
{
"id": 912,
"source_id": "swisstopo.alti3d.2m",
"tile_key": "2670-1254",
"edition": "2019",
"asset_id": 1022,
"change": "superseded", // added | changed | superseded | withdrawn
"old_sha256": "0a9e…",
"new_sha256": null,
"box_lv95": [2670000, 1254000, 2671000, 1255000],
"at": "2026-11-17T06:00:12Z"
}
added: a file the index did not hold, such as a new edition of a tile. An older edition that the publisher lists only after a newer one (a back-filled year) is history: it is stored assuperseded(seeGET /v1/geodata/tiles/{source_id}/{tile_key}) and nothing is added to the feed, since the tile's current file did not change. The same holds for awithdrawnfile that the publisher lists again: when a newer edition of its tile is current, it comes back assupersededwith nothing in the feed; otherwise it isaddedagain (and older editions of the tile aresuperseded).changed: a file's content changed: its checksum differs. Only for a file without a published checksum (on either side) does a new date or ETag count instead. swisstopo sometimes re-dates many items at once without changing them; such files are updated in the index (theirasset_updatedmoves) but raise nochanged. For swisstopo's 3D Tiles tileset, the build it points at changed (editionis the new build,old_sha256the old one).superseded: a newer edition of the same tile was added.withdrawn: a weekly full pass no longer found the file, either because its item is gone or because the item no longer lists that file.
The first pass over a source is not in the feed: read its current files
with GET /v1/geodata/tiles, then follow the feed from
GET /v1/geodata/changes with the highest id at that time.
How current the index is: swisstopo's newest item is checked every 6
hours, and when it is newer than what the index holds, the items changed
since then are read. Every 7 days a full pass reads every item and
withdraws what is gone. The building register and OpenStreetMap files are
checked daily by their dates (they are not downloaded). state: stale
means the publisher's newest change is more than 48 hours old and not yet
indexed.
Errors: 404 geodata_source_not_found, 404 tile_not_found,
422 invalid_bbox, 422 invalid_parameter, 503 geodata_disabled.
Across the border: files Cormorant makes and holds#
Around Basel the index also holds terrain, buildings and trees of France
and Germany. These publishers serve département packages, XYZ points or
zips per tile, not a tile index, so Cormorant makes the files itself for
its coverage windows (the first is basel: LV95 2602000,1253500 to
2621800,1276400, the Basel tri-border) and holds them (default_mirror: held). Every current file of these sources has a download_url.
source_id |
Data | File | Tile key | Grid, heights | Edition |
|---|---|---|---|---|---|
ign.rgealti.1m |
RGE ALTI® terrain (DTM, bare ground), 1 m, the départements along the Swiss border (68, 90, 25, 39, 01, 74) | .tif (float32 GeoTIFF, no data -99999) |
1037-6735: IGN's 1 km tile, north-west corner in km |
Lambert-93 (EPSG:2154), NGF-IGN69 | IGN's package date (2021-11-02) |
ign.rgealti.5m |
the same at 5 m, the same départements | .tif |
1035-6740: 5 km tile, north-west corner |
Lambert-93, NGF-IGN69 | package date |
ign.bdtopo.batiment |
BD TOPO® V3 buildings (bâti / batiment), every attribute and the 3D footprint |
.gpkg (layer batiment) |
IGN's 1 km tile | Lambert-93, NGF-IGN69 | the quarterly edition (2026-09-15) |
lgl-bw.dgm1 |
DGM1 terrain (DTM), 1 m, Landkreis Lörrach and around | .tif (float32 GeoTIFF, no data -9999) |
389-5276: LGL's 2 km tile, south-west corner in km |
ETRS89 / UTM 32N (EPSG:25832), DHHN2016 | newest survey year (2019) |
lgl-bw.lod2 |
LoD2 3D buildings, CityGML 1.0 | .zip (the four 1 km .gml files and the licence) |
LGL's 2 km tile | UTM 32N, DHHN2016 | the ALKIS date (2025-04-01) |
lgl-bw.dop20 |
DOP20 aerial photos, natural colour, 20 cm | .zip as LGL publishes it (up to four 1 km RGB GeoTIFFs with world files, metadata CSVs, the licence; 120 to 250 MB) |
LGL's 2 km tile | UTM 32N | the newest flight date (2025-08-26) |
bs.baumkataster |
Basel-Stadt tree register (city and Riehen) | .geojson (WGS84 points; e, n in LV95 added) |
bs |
WGS84 (EPSG:4326) | the dataset's processing date |
ban.adresses |
Base Adresse Nationale: every address of département 68, as published | .csv.gz (semicolon CSV; x, y Lambert-93 and lon, lat) |
D068 |
WGS84 and Lambert-93 | the newest date_der_maj (2026-11-25) |
How they are made: an RGE ALTI tile is IGN's ESRI ASCII grid written as a
GeoTIFF with the same heights and georeference; a BD TOPO tile holds the
buildings whose box centre lies in it (each building is in exactly one
file), copied unchanged from IGN's GeoPackage; a DGM1 tile is LGL's XYZ
points (cell centres) gridded with the same heights; a LoD2 zip holds LGL's
CityGML files unchanged; the BAN file is held byte for byte as published;
the tree register is the dataset's GeoJSON export,
sorted by tree number. origin of each file says what it was made from
(the publisher's package or file, its MD5 or address, the edition date).
The bytes depend only on the data, so a file's checksum_sha256 changes
only when the publisher's data did, and only then is there a new edition
(or a changed of the same edition) in the feed. Basel-Stadt keeps no
older editions: Cormorant's superseded copies stay downloadable for 30
days.
bbox_crs=2154or25832givesbboxin Lambert-93 or UTM 32N metres; it is turned into LV95 for the query. A tile is listed when its outline in LV95 (footprint_lv95, slightly rotated) touches the box;box_lv95is that outline's envelope andbox_nativethe tile in its own grid (crs).format=geojsondraws those outlines.GET /v1/geodata/sourcesaddsid(the same assource_id),country,native_crs,native_crs_name,vertical_datum,tile_size_m,licence({"id", "name", "url"}),credit(the exact credit line),held,windows,update_rhythm,max_lag_s(the freshness target of the source) andfresh(truewhenstateisfresh). For these sourcesorigin_newest_updatedis the publisher's newest edition andindexed_newest_updatedthe newest one made, so a new edition still to be made shows aslag_sand, beyondmax_lag_s,state: stale.GET /v1/geodata/sources/{source_id}/licencereturns the licence, the credit line, the reviewed terms and how Cormorant's files differ from the publisher's.
A file of a held source:
{
"id": 990412,
"source_id": "ign.rgealti.1m",
"tile_key": "1045-6725",
"edition": "2021-11-02",
"file_name": "RGEALTI_FXX_1045_6725_MNT_LAMB93_IGN69.tif",
"checksum_sha256": "3f0c…",
"bytes": 2811904,
"status": "current",
"superseded_by": null,
"held": true,
"mirrored": true,
"download_url": "https://…", // short-lived; ask the list again for a fresh one
"crs": 2154,
"box_native": [1044999.5, 6724000.5, 1045999.5, 6725000.5],
"box_lv95": [2611262, 1264882, 2612332, 1265950],
"footprint_lv95": [[2611269.4, 1264944.9], [2612268.6, 1264888.6], [2612324.9, 1265887.9], [2611325.6, 1265944.1], [2611269.4, 1264944.9]],
"origin_href": "https://data.geopf.fr/telechargement/download/RGEALTI/RGEALTI_2-0_1M_ASC_LAMB93-IGN69_D068_2021-11-02/RGEALTI_2-0_1M_ASC_LAMB93-IGN69_D068_2021-11-02.7z",
"origin": {"package": "RGEALTI_2-0_1M_ASC_LAMB93-IGN69_D068_2021-11-02", "member": "…/RGEALTI_FXX_1045_6725_MNT_LAMB93_IGN69.asc", "edition_date": "2021-11-02", "volumes": [{"url": "…", "md5": "930926b964ebb58277e5df83ba81d605", "bytes": 3638669605}], "made": "ESRI ASCII grid written as GeoTIFF (float32, DEFLATE), heights unchanged"},
"credit": "IGN – RGE ALTI®"
}
How current: IGN's download list is read weekly for RGE ALTI (frozen since
2024) and daily for BD TOPO (quarterly editions); LGL's tiles weekly; the
tree register daily. The licences: IGN's data is under the Licence Ouverte
2.0 (credit IGN – RGE ALTI® or IGN – BD TOPO® with the edition date);
LGL's under the Datenlizenz Deutschland – Namensnennung 2.0 (credit
Datenquelle: LGL, www.lgl-bw.de, dl-de/by-2-0, and for DGM1 the note that
the XYZ points were converted to GeoTIFF); the tree register under CC BY
4.0 (credit Geodaten Kanton Basel-Stadt). Show the credit with anything
made from the files.
Copies of an area: /v1/geodata/aois#
Cormorant can keep its own copies of the files of an area, so a builder
does not depend on the publisher being reachable. Only sources the
operator switched on for mirroring are accepted (409 geodata_mirror_off
otherwise; see default_mirror). No file over 6 GB is copied.
POST /v1/geodata/aois
{"source_ids": ["swisstopo.alti3d.05m"], "bbox": [2662000, 1208000, 2670000, 1215000], "name": "Lucerne"}
Or by a canton or municipality instead of a box (GET /v1/geodata/regions
finds the id): the files on the region's 1 km tiles are copied, following
its border rather than the rectangle around it.
POST /v1/geodata/aois
{"source_ids": ["swisstopo.buildings3d", "swisstopo.alti3d.05m"], "region": "canton:LU"}
The answer (201) is the area: id, name, source_ids, box_lv95,
estimate_bytes, files (current files inside the box), mirrored
(files copied so far) and mirrored_bytes. Copies are made in the
background and kept while the area exists; newer editions are copied as
they appear. Once a file is copied, its download_url in
GET /v1/geodata/tiles is a link to the copy, valid for 15 minutes, which
serves range requests (Range: bytes=…).
GET /v1/geodata/aoislists the project's areas,GET /v1/geodata/aois/{id}returns one,DELETE /v1/geodata/aois/{id}removes it (204); copies no other area needs are deleted within a week.- At most 50 areas per project. Errors:
422 geodata_area_too_large(the estimate is over the size allowed per area),409 geodata_storage_full,409 aoi_limit_reached,404 aoi_not_found.
Creating an area is one geodata request. The sizes of the files whose
links an answer of GET /v1/geodata/tiles gives count as delivered geodata
(bytes of the request in GET /v1/requests).
Collections: a goal and a place in one request#
Instead of choosing sources and boxes, order a recipe (what you want to build) at a level of detail for one or more regions (cantons or municipalities). Cormorant works out the files, keeps copies of the large tiled ones and lists every file with a stable link.
GET /v1/geodata/recipes: the recipes (flyover,terrain,aerial,buildings,solar,roads,nature), each with itslevels(light,standard,max) and thelayers(sources) of each level.GET /v1/geodata/regions?q=Lucerne&kind=&limit=: cantons and municipalities by name in German, French, Italian or English; withoutqthe 26 cantons.GET /v1/geodata/regions/{id}(canton:LU,municipality:1061) addscells, the 1 km tiles the region touches as runs[north_km, first_east_km, last_east_km].geometry=outlineadds the region as a GeoJSON MultiPolygon ingeometry(crs=2056, LV95 metres, default;crs=4326, WGS84): a canton's border simplified to about 300 m, with enclaves as holes (geometry_source: border), or for a municipality its 1 km tiles (cells);geometry=cellsgives the tiles for a canton too. Borders: swisstopo swissBOUNDARIES3D; showattributionwith them.GET /v1/geodata/ask?q=3D buildings for a fly-over app in Luzern: reads a sentence intogoal,levelandregionsby word rules in four languages (no language model). Check the answer before ordering with it.
POST /v1/geodata/collections
Idempotency-Key: flyover-luzern-1
{"recipe": "flyover", "level": "standard", "regions": ["canton:LU"],
"name": "Fly-over Luzern", "callback_url": "https://example.com/hooks/geodata"}
The answer is {"plan": …, "collection": …}:
plangives per layerfiles,bytes(estimated) andcopies(true: Cormorant keeps copies;false: the links lead to the publisher), plusareas,files,bytesandcopy_bytes. With"dry_run": trueonly the plan comes back (200) and nothing is ordered.collectionhasstate:copying,ready(every copy is there,ready_at),failed(copies failed for now; they are retried),links(nothing to copy) orempty(the index has no file in its regions right now, because they are not indexed yet or were withdrawn; it moves on tocopyingby itself when files appear, and the ready webhook waits until then).copiescountsfiles,copied,failedandcopied_bytes;progressruns from 0 to 1.
A region's files are those whose box overlaps one of its 1 km tiles, so a
canton gets its own files and not the rectangle around it. A region over
the size allowed per area is split into bands of km rows (areas > 1).
The same Idempotency-Key with the same body returns the first collection
(200); with another body, 409 idempotency_conflict. Give bbox
([minE, minN, maxE, maxN], bbox_crs as above) instead of regions for a
box.
Orders abroad. country (CH, FR, DE) on
POST /v1/geodata/collections orders in France or Germany: give bbox, at
most 60 km a side, in the country's grid (bbox_crs defaults to 2154 in
France and 25832 in Germany; 2056 and 4326 work too), inside the bands
along the Swiss border that Cormorant indexes. The recipe's layers are the
country's (GET /v1/geodata/recipes?country=FR: buildings from BD TOPO®
or LoD2, terrain from RGE ALTI® or DGM1); a level lists the layers it has
no source for there under missing, and a recipe whose main layer has no
source there (solar, noise, roads) is not offered. Cormorant makes these
files itself (made: true in the plan), so they follow the order in the
background rather than being there at once. The collection carries
country.
Instead of a box, regions can name places there:
GET /v1/geodata/regions?q=Huningue&country=FR finds the communes of the
départements along the Swiss border (fr-commune:68149, the INSEE code;
IGN ADMIN EXPRESS COG CARTO), country=DE the Gemeinden of
Baden-Württemberg (de-gemeinde:08336091, the AGS; BKG VG250). Each
result has code, parent (département or Kreis), km2, box in the
country's grid (crs) and box_lv95. An order for places is the box
around them, at most 60 km a side.
GET /v1/geodata/collectionslists the project's collections;GET /v1/geodata/collections/{id}returns one;DELETE /v1/geodata/collections/{id}removes it with its areas (204).GET /v1/geodata/collections/{id}/filesreturns the files in pages (after,limitup to 1,000,next_cursor), each withurl, a link that needs no key and lasts 7 days (links_expire_at),origin_url,sha256,bytesandcopied.format=geojsonreturns the same page as GeoJSON footprints, as forGET /v1/geodata/tiles(crstoo).format=aria2(an aria2c input file:aria2c -i list.txt -cresumes and checks each SHA-256),csvorurlsreturn the whole list as a download.callback_urlreceives aPOSTwithevent: geodata.collection.ready,delivery_idand the collection once every copy is there, within about 5 minutes, also when you read the collection first. Private addresses are refused. Each round tries 3 times; a round that fails is tried again after 1 hour and after 6 hours, always with the samedelivery_id, so drop a delivery you already handled. A2xxanswer ends it.- The delivery is signed like the usage alerts:
X-Cormorant-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of "<t>.<raw body>">under the account's webhook secret, withX-Cormorant-Event: geodata.collection.readyandX-Cormorant-Delivery(thedelivery_id).GET /v1/geodata/webhook-secret(account admin key) shows the secret once, the first time (it is made then; the control center's Geodata page shows it too);POST /v1/geodata/webhook-secret/rotatemakes a new one and shows it once, and the next delivery is signed with it. Check the signature over the raw body before acting, and refuse atmore than 5 minutes from your clock:
import hashlib, hmac, time
def verify(secret: str, body: bytes, header: str, tolerance_s: int = 300) -> bool:
parts = dict(p.split("=", 1) for p in header.split(","))
t = int(parts["t"])
if abs(time.time() - t) > tolerance_s:
return False
mac = hmac.new(secret.encode(), f"{t}.".encode() + body, hashlib.sha256).hexdigest()
return hmac.compare_digest(mac, parts["v1"])
During the beta, collections are opened account by account
(403 geodata_not_enabled until then), and the copies an account's
collections keep are limited by its quota, 50 GB unless agreed otherwise
(409 geodata_quota_exceeded). Other errors: 404 recipe_not_found,
404 region_not_found, 404 collection_not_found, 422 level_not_found,
422 invalid_area, 422 invalid_bbox, 422 invalid_callback_url,
422 webhook_needs_account (a callback_url on a project without a
customer account: it has no webhook secret, and webhooks are never sent
unsigned),
422 geodata_area_too_large, 409 geodata_storage_full,
409 aoi_limit_reached. An area that belongs to a collection cannot be
deleted on its own (409 aoi_in_collection).
Each call is one geodata request. The sizes of the copies handed out
through a collection's links count as delivered geodata for its project:
a file is counted once per download list, however many requests the
downloader makes (aria2c's segments, retries and resumes). A new list (its
links have a new expiry) counts its files again.
Download lists: GET /v1/geodata/files/{id}/download#
The links of a download list (a collection's /files) look like
/v1/geodata/files/{id}/download?exp=…&p=…&sig=… (p: the project of a
collection's list). They are
signed, need no API key and stay valid for 7 days. Each request answers
302 to a fresh link to Cormorant's copy of the file, or to the
publisher's address while there is no copy; range requests work on both.
The links of a collection's list keep working until they expire, also
after the collection is deleted (its copies go with the weekly sweep, then
the links lead to the publisher). Requests are limited per client address
(50 per second on average over 10 seconds, 100 within one second; aria2c's
-j 8 with its default 5 connections per file stays well below).
Errors: 404 invalid_link, 404 file_not_found, 410 link_expired,
429 download_rate_limited (wait Retry-After seconds).
swisstopo STAC: GET /v1/catalogs/geoadmin-stac/collections/{collection_id}#
Reads swisstopo's STAC API directly (https://data.geo.admin.ch/api/stac/v1/),
normalised: the collection, or with
GET /v1/catalogs/geoadmin-stac/collections/{collection_id}/items?bbox=&cursor=&limit=100 a page
of its items with their files and checksums and each item's box in LV95.
Each call is charged as one fetch (cached for five minutes). Use it for a
collection the index does not hold; for the indexed ones the index answers
without asking swisstopo. Errors: 404 collection_not_found,
502 catalog_unavailable, 422 invalid_bbox.
3D sessions: POST /v1/geo3d/sessions#
A 3D viewer (buildings, terrain) opens a session, then streams the tiles from the links it got and never calls the API per tile.
POST /v1/geo3d/sessions
{"style": "pencil", "layers": ["buildings", "terrain"]}
style is pencil (default) or plain; layers defaults to every live
layer. The answer (201):
{
"session_id": "g3s_k2Jx9aQm1PzW",
"style": "pencil",
"tilesets": [
{"layer": "buildings", "version_id": 7, "version": "2026-11-24",
"url": "https://…/buildings/2026-11-24/tileset.json", "attribution": "© swisstopo"}
],
"token": "g3t_…",
"signed": false,
"expires_at": "2026-11-17T07:00:00Z",
"attribution": "© swisstopo"
}
Each layer is pinned to its newest build for the session's life (one
hour), so a viewer never mixes two builds. signed: false: the links are
public as they are; once they are signed, the links carry the signature
and token goes with tile requests. Open a new session when one ends.
GET /v1/geo3d/versionslists the live layers with their newest build (version_id,layer,version,tileset_url,attribution,built_from,created_at). Not charged.- A partner's site opens sessions with its embed key at
POST /v1/embed/geo3d/sessions(same body and answer). - Errors:
404 geo3d_layer_not_found,422 invalid_parameter(an unknown style),503 geo3d_no_versions(nothing published yet).
Each session is one geo3d request (billing category geo3d_session).
Access reports: GET /v1/access, GET /v1/sources/{source_id}/access#
What a fetch of an address would meet, before you build on it: what the site's robots.txt says for Cormorant's agent, where that binds, which routes may be used, and whether the project's last fetch of the host needed a premium route. The address itself is not fetched; robots.txt is read at most once a day per site. Not charged.
GET /v1/access?url=https://www.bag.admin.ch/de/praemien:
{
"url": "https://www.bag.admin.ch/de/praemien",
"host": "www.bag.admin.ch",
"robots": {
"robots_url": "https://www.bag.admin.ch/robots.txt",
"found": true,
"user_agent": "Cormorant",
"says": "allowed", // allowed | disallowed
"rule": null, // the line that decides, e.g. "Disallow: /api/"
"group": "*", // the User-agent group it stands in
"crawl_delay": null,
"applies": "every_route", // every_route | own_addresses | not_applied
"reason": "government_host" // government_host | project_or_operator_policy | operator_exemption | null
},
"routes": "all", // all | premium_only | none
"last_fetch": {"at": "2026-11-13T06:00:04Z", "ok": true, "route": "direct", "premium": false, "error": null},
"checked_at": "2026-11-13T08:00:00Z"
}
| Field | Meaning |
|---|---|
robots.says, rule, group |
What robots.txt says about this address, the line that decides and the group it stands in. found: false: the site has no robots.txt, nothing is disallowed. |
robots.applies |
every_route: robots.txt binds every route (government hosts, or the project's or operator's policy). own_addresses: it binds Cormorant's own addresses; a disallowed page is fetched through premium routes only. not_applied: the operator decided to fetch this host regardless of its robots.txt (reason: operator_exemption); says still reports what the file states. |
routes |
What follows for a fetch: all, premium_only, or none (the fetch answers robots_disallowed). |
last_fetch |
The project's most recent fetch of the host in the past 30 days that reached the network: premium: true means a premium route was needed. null: no such fetch. |
GET /v1/sources/{source_id}/access reports every address a source is
read from, with the terms of use known for it:
{
"source_id": "bag.okp.premiums",
"allowed": true,
"addresses": [],
"terms": {"code": "terms_open", "attribution": "recommended", "commercial_use": "allowed"},
"terms_url": "https://opendata.swiss/de/terms-of-use"
}
addresses holds one report as above per address, each with a role:
catalog (the catalogue entry on opendata.swiss), download (the file) or
page. allowed is true when none of them has routes: none. terms
are, for a file of an opendata.swiss dataset, the terms the catalogue
states for that file (attribution: required or recommended;
commercial_use: allowed or permission_required), and for other
sources an entry reviewed by a person. For a catalogue file the download
address and the terms are those of the newest edition held; before the
first edition was retrieved only the catalogue entry is reported and
terms is null.
Tables: POST /v1/tables/extract#
Reads a CSV file, an XLSX workbook or a PDF into rows. A CSV is one table,
a workbook one table per sheet; for a PDF see Tables of a PDF. Rows are stored once and read in pages from
GET /v1/tables/{table_id}/rows.
{"sha256": "957fef82…", "project_ref": "steward-packs"}
| Field | Meaning |
|---|---|
sha256 |
A body your project has retrieved: the sha256 of a fetch, of an archive member or of a source edition. Give this or url. |
url |
A file to fetch first, as POST /v1/fetch with mode: "raw" does. The fetch is charged as usual. |
sheet |
XLSX: only the sheet of this name. Default: every sheet. |
header_row |
CSV: the header's 1-based line in the file (default: detected; 0: no header). XLSX: the header's row number in the sheet, with sheet (default: no header, every row is returned). |
skip_rows |
CSV: lines to leave out at the start before the header is looked for. |
delimiter, quote_char |
CSV: default detected. |
encoding |
CSV: for a file that is not UTF-8 and has no byte order mark, e.g. cp1252. |
{
"sha256": "957fef82…",
"bytes": 25832930,
"format": "csv", // csv | xlsx
"extractor": "csv-rows/1", // name and version; xlsx-rows/1 for workbooks
"cached": false, // true: these tables existed already
"request_id": null, // the fetch, when url was given
"tables": [
{
"table_id": "tbl_3f1c…",
"sha256": "957fef82…",
"format": "csv",
"extractor": "csv-rows/1",
"sheet": null, // XLSX: the sheet's name
"sheet_state": null, // XLSX: visible | hidden | veryHidden
"columns": ["Versicherer", "Kanton", "…"], // the header's cells; null without a header
"row_count": 219916, // data rows
"column_count": 17, // cells of the widest row
"encoding": "utf-8",
"bom": true,
"delimiter": ",",
"quote_char": "\"",
"line_ending": "lf", // lf | crlf | cr | mixed | none
"header_row": 1,
"skipped_rows": [], // CSV: the lines before the header, as in the file
"skipped_row_count": 0,
"ragged_rows": 0, // CSV: rows whose number of cells is not the header's
"merged_cells": null, // XLSX: merged ranges, e.g. ["A1:D1"]
"merged_cell_count": null,
"text_exact": null, // XLSX: false when some cell's text could not be computed
"rows_url": "https://…/v1/tables/tbl_3f1c…/rows"
}
]
}
Deterministic. table_id is derived from the body's hash, the
extractor's name and version and the options. The same request returns the
same id and the same rows, and a repeated call answers at once with
cached: true. Other options give another table of the same body.
Cells are what the file holds. Nothing is rounded, retyped, trimmed or filled in, and no row is dropped.
- CSV: every cell is the string in the file.
313.0stays313.0and0.00stays0.00. The encoding, byte order mark, delimiter, quote character and line ending are detected and reported. The delimiter is the one of,;tab|that splits the most lines into the same number of fields (;before,when both do, as in files with decimal commas). The header is the first line with the usual number of fields and a name in each; the lines before it are a preamble, reported verbatim inskipped_rows. A row whose number of cells differs from the header's is returned as it is withragged: true: a total row or a footnote after the data comes back flagged, not hidden. - XLSX: every cell has
value, what the file stores (a number exactly as written, a date as ISO 8601 with the stored serial number inserial), andtext, what the cell displays.textis computed for formats that do not depend on the reader's locale: General, fixed decimals, percent, text, and numeric date and time patterns. For other formats (thousands separators, month names, the locale's short date)textisnulland the table saystext_exact: false; it is never a guess. A formula cell has its cached result andformula: true; nothing is evaluated. Merged ranges are listed, not filled. Rows keep their row number in the sheet.
Limits. CSV up to 100 MB, XLSX up to 50 MB (413 too_large). Old
binary .xls files and PDFs answer unsupported_format. Extraction is not
charged at present.
Errors, as {"detail": {"error", "message"}}: 404 body_not_found,
404 table_not_found (no such sheet; the message names the sheets),
413 too_large, 422 unsupported_format, 422 extraction_failed (for
example a file that is not UTF-8 and names no encoding),
422 invalid_parameter, 502 fetch_failed (with fetch_error),
503 storage_unavailable.
GET /v1/tables/{table_id}/rows?offset=0&limit=1000#
The rows as NDJSON (application/x-ndjson), one JSON object a line, in
the file's order. limit up to 10,000. X-Total-Rows is the table's
size; X-Next-Offset is the offset of the next page and is absent on
the last one. The 219,916 rows of the premium file are 22 pages.
A CSV row:
{"row": 1, "line": 2, "cells": ["0008", "ZH", "313.0"]}
row counts the data rows from 1, line is the line of the file the row
starts on, and ragged: true is added when the number of cells is not the
header's.
An XLSX row:
{"row": 6, "cells": [{"value": "261", "text": "261", "type": "number"}, null,
{"value": "2026-10-31", "text": "31.10.2026", "type": "date", "serial": "46326"}]}
row is the row number in the sheet. cells has one entry per column up
to the row's last value, null for an empty cell. type is string,
number, date, boolean or error.
A PDF row:
{"row": 32, "page": 2, "cells": ["Insurer", "A1", "A2", "B1"], "repeated_header": true}
row counts the table's rows from 1, header rows included; page is the
page the row is on; header: true marks a header row and
repeated_header: true the header repeated on a later page.
Tables of a PDF#
POST /v1/tables/extract on a PDF returns every table found, in reading
order ("tables": [] when there is none). Options:
| Field | Meaning |
|---|---|
pages |
The pages to read, e.g. 1-3,7. Default: every page (at most 500). |
header_rows |
Rows at the top of each table that are its header (default 1; 0: none). A header of several rows is joined per column. |
columns |
Names for the columns, used for every table with that many columns in place of its header's text. |
ocr |
Not available: true answers 422 ocr_unavailable. |
Each table has, besides the common fields, page_from, page_to,
continued, header_rows, repeated_header_rows, detection,
confidence and ocr:
- Tables are read from the PDF's text layer, never from pixels. A PDF
without a text layer answers
422 pdf_no_text. detection: lines: the table was found by its ruling lines.detection: text: the page has no ruled table and one was found by the alignment of its text; only a grid of at least three columns and three rows is accepted, and lines without text are left out.- A table that runs over a page break is joined when the first table of a
page has the same columns at the same positions as the last table of the
page before:
continued: true,page_fromandpage_tosay so, and every row carries itspage. A header repeated on the later page stays among the rows, markedrepeated_header: true(repeated_header_rowscounts them). - Cell text is the text found in the cell, unchanged; an empty cell is
null. A mark such asXorX*is returned as it stands. confidenceis a heuristic from 0 to 1, not a probability: a ruled table, filled rows and a header that names every column once score higher. Treat a table below 0.7 as a candidate to check.- Limits: 50 MB and 500 pages per call.
GET /v1/tables/{table_id} returns the table's description again. A table
is visible to the projects that may download the body it was read from.
Watches: /v1/watches#
A watch checks a file, a catalogue dataset or a catalogue source on a
schedule and raises one event per change. Events are read in order from
GET /v1/watches/events and, for a watch with a webhook_url, also POSTed
there. Both carry the same bodies, so a client can run on the pull route
alone.
POST /v1/watches#
{
"target": {"source_id": "bag.okp.premiums"},
"schedule": {
"interval": "P7D",
"seasons": [{"from": "09-15", "to": "12-31", "interval": "P1D"}]
},
"detect": "bytes",
"webhook_url": "https://example.org/hooks/cormorant",
"reference": "premiums",
"project_ref": "steward"
}
target is exactly one of:
target |
What is watched | detect |
|---|---|---|
{"url": …} |
One file or page (http, https) | bytes (default), text, metadata |
{"catalog": "opendata-swiss", "dataset_id": …} |
The dataset's resources on opendata.swiss | metadata |
{"source_id": …} |
A source of GET /v1/sources; a yearly source also reports the edition of a new year |
bytes for a file, text (default), bytes or metadata for a page, metadata for a dataset |
{"site": …} |
The documents of a site, found by a discovery | bytes |
{"source_id": …, "bbox": [minE, minN, maxE, maxN]} |
The changes of a geodata source (GET /v1/geodata/changes), only within the LV95 box when bbox is given |
metadata |
{"law": …, "article": …} |
An act of GET /v1/law/acts (ch:sr:220, de:hgb), or one of its articles with article (Art. 663b, § 15a) |
text |
{"paper": …} |
A paper by any identifier of GET /v1/papers/{id} (filed under its pap_… id): events new_version (with versions), published (a journal DOI or a conference decision appears), retracted, withdrawn, review_added (an OpenReview note, with review) |
metadata |
{"papers_query": …} |
Words to search papers for (2-300 characters): paper_added (with paper) for each matching paper that enters Cormorant's paper store, at most 100 a check |
metadata |
Paper watches need Research papers on for the account (403 feature_disabled); paper_not_found (404) and invalid_paper_target (422)
refuse a target. They read the paper store and are not charged as fetches.
A site target takes the options of POST /v1/discover beside it:
path_prefixes, file_types and max_pages. Each check is a discovery of
the site, so it takes minutes: the watch shows last_outcome: running
until the discovery is done.
detect says what counts as a change: bytes is the SHA-256 of the file;
text is the hash of the page's text, whitespace aside, so markup and
banners raise nothing; metadata is the origin's ETag and Last-Modified
(the bytes decide when the origin sends neither), and for a catalogue
dataset the catalogue's dates and addresses per resource.
schedule.interval is an ISO 8601 duration from PT1H to P90D
(PT6H, P1D, P7D, P2W). seasons (at most 6) give parts of the year
a tighter interval: from and to are days as MM-DD in Europe/Zurich,
both inclusive, and a season may cross the year end. The shortest interval
in force applies, and a season's first day is always checked: the example
is checked weekly, and daily from 15 September to 31 December.
reference (any text) and project_ref come back in every event.
At most 500 watches per project (409 watch_limit_reached).
The answer (201) is the watch, with its secret when a webhook_url
was given. The secret is returned only by the call that sets the webhook.
{
"id": "wch_12",
"target": {"source_id": "bag.okp.premiums"},
"detect": "bytes",
"schedule": {"interval": "P7D", "seasons": [{"from": "09-15", "to": "12-31", "interval": "P1D"}]},
"reference": "premiums",
"project_ref": "steward",
"webhook_url": "https://example.org/hooks/cormorant",
"paused": false,
"created_at": "2026-11-13T08:00:00Z",
"checks": 0,
"last_check_at": null,
"last_outcome": null,
"last_event_at": null,
"next_check_at": "2026-11-13T08:00:00Z",
"current": null,
"secret": "whsec_…"
}
A new watch is checked within a minute; the first capture raises new.
last_outcome is what the last check found: new, changed, unchanged,
moved, resource_added, resource_removed, the paper events above,
running (a site's
discovery is under way), limit_reached (the key was
over its limits, nothing was fetched) or the error the check met.
current is the version held, the old of the next changed event.
GET /v1/watches lists the project's watches, GET /v1/watches/{id}
returns one. PATCH /v1/watches/{id} changes schedule, detect,
webhook_url, reference, project_ref or paused; a new schedule and
the end of a pause check the watch at once, and "webhook_url": null
removes the webhook. DELETE /v1/watches/{id} removes the watch; its
events stay readable.
How a watch is checked#
- A URL is requested from Cormorant's own addresses only, with
If-None-MatchandIf-Modified-Sincewhen the origin gave validators: an unchanged file answers 304 and nothing is downloaded. - A catalogue dataset is read from the catalogue (cached for five minutes).
- A source's file is found and downloaded as
GET /v1/sources/{source_id}/editions/{year}does it: a file from the catalogue is downloaded again when the catalogue's date changed, a file found by its address at most once a day. From 1 September a yearly file is also looked for under next year's address; when it is there, the watch raisesresource_addedand follows the new year. - A site is crawled as
POST /v1/discoverdoes it, from Cormorant's own addresses. The first discovery raises onenewevent with the number of documents and thediscovery_idto list them with; every later one raisesresource_added,changedandresource_removedper document (at most 1,000 events per check). A document counts as removed when two complete discoveries in a row did not find it. - A geodata source reads the index's change feed, without asking the
publisher. The first check raises
new; later checks raise onechangedevent per 1,000 new entries of the feed, with the entries inchanges. - An act or article is read from the legislation store, filled once a day
from the publishers (see National law below):
newholds the version in force (valid_from,sha256of the text,source_url);changedcomes when a version in force has another text. For a whole act the event lists the articles that differ inarticles(num,change:added,removedorchanged). Nothing is fetched and the check is not charged. - Each request of a check is one
fetchrequest of the project (reasonwatchin the request log). A check is skipped while the key is over its limits.
Events#
event |
Raised when |
|---|---|
new |
The first capture. |
changed |
The bytes, the text or the validators differ (detect); for a dataset, a resource's date, address, format or size. |
moved |
A permanent redirect (301, 308); new.url is the new address. Raised once per new address. |
gone |
404 or 410 on three checks in a row. |
blocked |
The host refused the request (403, 429, a bot check, robots.txt). |
error |
Three failed checks in a row. |
resource_added |
A dataset has a new resource; a yearly source has the edition of a new year; a site has a new document. |
resource_removed |
A dataset lost a resource; a site's document is gone. |
An unchanged target raises nothing. gone, blocked and error are
raised once and not again until the target has answered in between.
{
"event_id": "evt_5c0d3c9c4be14b0c9f6f7f5e7a1f0f11",
"watch_id": "wch_12",
"reference": "premiums",
"project_ref": "steward",
"event": "changed",
"detected_at": "2026-10-22T06:00:04Z",
"target": {"source_id": "bag.okp.premiums"},
"old": {"sha256": "957fef82…", "bytes": 25832930, "etag": null, "last_modified": null, "retrieved_at": "2026-09-29T06:00:11Z", "body_url": "/v1/bodies/957fef82…"},
"new": {"sha256": "1c7a90e4…", "bytes": 25833412, "etag": null, "last_modified": null, "retrieved_at": "2026-10-22T06:00:04Z", "body_url": "/v1/bodies/1c7a90e4…"}
}
old and new are versions with sha256, bytes, etag,
last_modified, retrieved_at and body_url (download it with the
watching project's key), plus url, final_url and content_type; a
source's version also has source_id, year, file_name and
origin_modified (the catalogue's date), a text watch text_sha256.
old is null for new; new is null for gone, blocked and
error, which carry error and status instead. Events of a dataset
carry the resource concerned as the catalogue route returns it, with the
compared values (modified, download_url, access_url, format,
bytes_declared) in old and new; its new event lists all
resources.
Events of a site carry the document concerned (url, file_type,
found_on, link_text, title, kind_guess, guessed_from,
first_seen) with its versions in old and new; its new event has
new.discovery_id, new.documents and new.pages.
GET /v1/watches/events?after=<cursor>&limit=100#
Every event of the project's watches, oldest first.
{"events": [], "cursor": "41", "more": false}
Pass the cursor of the last answer as after: each event is then read
exactly once. Without after the answer starts at the oldest event kept.
more: true means more events are waiting. watch_id limits the answer
to one watch; limit is 1 to 1000. Events are kept for 90 days, also
after their watch is deleted. Not charged.
Webhooks#
Each event is POSTed to the watch's webhook_url (HTTPS, a public
address) with the event as JSON body and these headers:
| Header | Value |
|---|---|
X-Cormorant-Event |
watch. and the event, e.g. watch.changed |
X-Cormorant-Delivery |
The event_id |
X-Cormorant-Signature |
t=<unix>,v1=<hex>: HMAC-SHA256 of <t>.<raw body> with the watch's secret |
Answer with 2xx. Anything else is retried after 1, 5, 15, 60 and 180
minutes and then hourly until the event is 24 hours old; after that the
event is only on the pull route. Every attempt carries the same body and
event_id, so an event applied twice is detectable. Redirects are not
followed.
Versions and diffs: GET /v1/versions, GET /v1/diff#
Cormorant keeps every version it retrieves of a file or page: one version
per address and body. Versions are recorded for raw downloads
(mode: "raw"), for the checks of watches and for the editions of
sources. A version, with its body, is kept for 24 months after it was last
found at its address, and without a time limit while your project pins the
body (POST /v1/bodies/{sha256}/pin).
GET /v1/versions#
Give exactly one of:
| Parameter | Lists |
|---|---|
url |
The versions of that address. |
source_id (and year) |
The kept versions of a source's editions; each carries year, url and origin_modified. |
catalog=opendata-swiss with dataset_id and resource_id |
The versions of that resource's download address. Reading the catalogue is one fetch. |
{
"url": "https://example.org/data/premiums.csv",
"source_id": null,
"retention_days": 730,
"versions": [
{
"sha256": "9f2c…",
"bytes": 25832930,
"content_type": "text/csv",
"etag": "\"v2\"",
"last_modified": null,
"text_sha256": null,
"retrieved_at": "2026-11-13T06:00:02Z",
"last_seen_at": "2026-11-13T09:00:01Z",
"pinned": false,
"body_url": "https://api.cormorant.ch/v1/bodies/9f2c…"
}
]
}
Newest first, at most 1,000. retrieved_at is when these bytes were first
retrieved, last_seen_at when they were last found at the address (a
"not modified" answer to a watch counts). text_sha256 is set for pages
read by a watch. Only versions whose body your project may download are
listed: the ones your project retrieved itself or through its watches.
Not charged, apart from the catalogue read.
GET /v1/diff?from=<sha256>&to=<sha256>#
Compares two bodies your project may download, up to 100 MB each.
Text (PDF, HTML, plain text). Each body becomes its normalised text: one line per line of the document, runs of whitespace as one space, empty lines left out; for HTML the main text as a fetch returns it. Neighbouring lines that differ form one passage.
{
"kind": "text",
"format": "pdf",
"identical": false,
"region_count": 1,
"regions": [
{
"change": "changed",
"old": {"text": "Selbstbehalt 10 Prozent", "start": 28, "end": 51, "page": 2},
"new": {"text": "Selbstbehalt 15 Prozent", "start": 28, "end": 51, "page": 2}
}
],
"table": null,
"truncated": false,
"old": {"sha256": "1b7e…", "bytes": 48211, "chars": 51, "rows": null},
"new": {"sha256": "c04a…", "bytes": 48230, "chars": 51, "rows": null}
}
change is added, removed or changed; old is null for added,
new for removed. start and end are character offsets in that side's
normalised text, page is the PDF page the passage starts on. A passage's
text is cut at 2,000 characters; end still tells its length.
Tables (CSV, XLSX). Rows are matched by the columns named in key
(header names, comma separated: key=Versicherer,Kanton). For XLSX,
sheet names the sheet (default: the first) and header_row the header's
row (default 1).
{
"kind": "table",
"format": "csv",
"identical": false,
"regions": null,
"region_count": null,
"table": {
"key": ["Versicherer", "Kanton"],
"rows_old": 3,
"rows_new": 3,
"columns_added": ["Modell"],
"columns_removed": [],
"added": 1,
"removed": 1,
"changed": 1,
"unchanged": 1,
"rows_added": [{"key": ["0062", "VD"], "old": null, "new": {"Versicherer": "0062", "Kanton": "VD"}}],
"rows_removed": [{"key": ["0032", "AG"], "old": {"Versicherer": "0032", "Kanton": "AG"}, "new": null}],
"rows_changed": [{"key": ["0008", "ZH"], "old": {"Prämie": "313.0"}, "new": {"Prämie": "313.00"}}],
"truncated": false
},
"truncated": false,
"old": {"sha256": "1b7e…", "bytes": 81, "chars": null, "rows": 3},
"new": {"sha256": "c04a…", "bytes": 97, "chars": null, "rows": 3}
}
A changed row lists only the cells that changed. Cells are compared as the
file holds them: 313.0 and 313.00 differ. A column that exists on one
side only is reported in columns_added or columns_removed and does not
make a row changed. limit (default 200, at most 5,000) caps the passages,
or the rows per list; the counts are always complete and truncated says
when more differs than is listed.
| Error | Status | Meaning |
|---|---|---|
body_not_found |
404 | A body is not stored, or not your project's. |
too_large |
413 | A body is over 100 MB. |
unsupported_format |
422 | One body is a table and the other is not, or a body is binary. |
key_required |
422 | Tables need key; or the table has no header row. |
key_not_found |
422 | A table has no such column; columns lists the ones it has. |
key_not_unique |
422 | Two rows of a table share the key; key names it. |
pdf_no_text |
422 | A PDF has no text layer. |
Not charged.
National law: /v1/law#
Federal acts of Switzerland (Fedlex, the consolidated text in German), Germany (gesetze-im-internet.de) and the French codes (Légifrance, from DILA's LEGI open data under the Licence Ouverte 2.0), copied once a day. Every version is kept with the days it applies, so an article is answered as it applied on any day since the store began. A version is kept only when the text changed. Official texts are not protected by copyright in Switzerland or Germany (art. 5 URG, § 5 UrhG), and the French data is reused under the Licence Ouverte (source: Légifrance, DILA). The official publication remains the binding one. These routes are not charged.
An act is named by ref: ch:sr:<SR number> (ch:sr:220, the Code of
Obligations; ch:sr:641.20), de:<slug> (de:hgb, de:gmbhg) or
fr:<code> (fr:code-civil, fr:code-de-commerce,
fr:code-monetaire-et-financier). An article is named by num:
Art. 663b, 663b, § 15a, 15a, or for a French code L110-1,
L. 110-1, R123-45 or 2284-1.
| Route | Answer |
|---|---|
GET /v1/law/acts |
Every act held: ref, jurisdiction, abbreviation, title, lang, checked_at, versions, latest |
GET /v1/law/acts/{ref}?on=YYYY-MM-DD |
The version in force that day and its articles in order (num, heading, path), without text |
GET /v1/law/acts/{ref}/versions |
Every version, newest first: valid_from, valid_to, valid_from_basis, units, fetched_at |
GET /v1/law/acts/{ref}/changes?a=…&b=… |
The articles added, removed or reworded between the versions in force on a and b |
GET /v1/law/article?ref=…&num=…&on=… |
The article's text that day, with heading, path, the act and the version it was read from |
GET /v1/law/diff?ref=…&num=…&a=…&b=… |
The article on both days (a, b), changed, and a unified diff |
on and b default to today (UTC). valid_from_basis says where
valid_from comes from: consolidation is the publisher's date of the
consolidated text (Fedlex); first_seen is the day the store first saw the
text, for a publisher that gives no date (gesetze-im-internet.de). A
French code's version starts on the latest day one of its articles came
into force.
{
"act": {"ref": "ch:sr:220", "title": "Bundesgesetz betreffend die Ergänzung des Schweizerischen Zivilgesetzbuches (Fünfter Teil: Obligationenrecht)", "abbreviation": "OR", "jurisdiction": "CH", "lang": "de"},
"version": {"valid_from": "2026-01-01", "valid_to": null, "valid_from_basis": "consolidation", "source_url": "https://fedlex.data.admin.ch/…"},
"num": "Art. 663b",
"heading": "…",
"path": ["Dritte Abteilung: …"],
"text": "…"
}
Errors: 422 invalid_ref, 422 invalid_num, 404 not_found (no such act,
or nothing in force that day).
French administrative court decisions: GET /v1/law/decisions#
Decisions of the Conseil d'État, the cours administratives d'appel and the tribunaux administratifs since 1 January 2025, from DILA's JADE open data (Licence Ouverte 2.0; source: Légifrance, DILA), updated daily. Not charged.
| Route | Answer |
|---|---|
GET /v1/law/decisions?q=…&court=…&from=…&to=…&limit=20&offset=0 |
Matching decisions, newest first, without text: id, ecli, court, formation, decided_on, number, solution, kind, publication, title, url; and more |
GET /v1/law/decisions/{id} |
One decision with its text |
q is a French full-text search in web syntax: "société TDF" for a
phrase, -mot to leave a word out; words match their inflections.
publication is the decision's place in the Recueil Lebon: A published,
B mentioned in the tables, C not published.
The names of the judges, the rapporteur, the rapporteur public and the
lawyers are not kept (art. 33 of loi 2019-222 forbids reusing them to
evaluate or predict judges' practice): the text stops before the
signatures, the lines naming the bench are left out and those names are
cut wherever else they appear. Parties who are natural persons are
pseudonymised by DILA. Decisions are never joined to persons. To follow an act or an article, create a
watch with target: {"law": "ch:sr:220", "article": "Art. 663b"}
(POST /v1/watches).
Research papers: /v1/papers#
Scholarly papers from arXiv, PubMed Central and Europe PMC, PLOS, DOAJ, HAL, Zenodo, Crossref and OpenAlex, one record per paper (guide: Research papers). SSRN and Google Scholar are link-only: their terms forbid automated access, so Cormorant never contacts them.
| Route | Answer |
|---|---|
GET /v1/papers/search?q=… |
Papers matching the words, best first, from every source at once (Semantic Scholar and CORE too when your account holds its own key for them; naming one in sources without a key answers 403 provider_key_required): results, sources_status (per source: state ok, empty, timeout, busy, budget, error or off; results; ms), partial, cached. Filters sources, from_year, to_year, type, oa, fulltext, max_results (1-100) |
GET /v1/papers/{id} |
One paper by DOI, arXiv id, PMCID, PMID:…, HAL id, Zenodo record, OpenAlex id, page address or pap_…; cached when the paper store answered |
POST /v1/papers/resolve |
{"items": [...]}, up to 500 identifiers, addresses or citation strings: per item match (id, url, citation), paper, error |
POST /v1/papers/batch |
{"ids": [...], "fulltext", "format", "max_chars", "idempotency_key", "callback_url"}, up to 50,000 papers as a job of kind papers: job_id, created, status_url, export_url |
GET /v1/papers/batch/{job_id}/export |
The job's items as JSON Lines, in order: index, status, input, paper, error, cached, billing; with fulltext, fulltext (content up to max_chars, truncated, total_chars, outline, figures, references, source_url, licence, reuse) or fulltext_error (licence_restricted, fulltext_unavailable); status filter |
GET /v1/papers/sources |
Every source: mode (live, store, link_only), enabled, search, lookup schemes, licence and terms; store counts |
GET /v1/papers/journals/{issn} |
DOAJ's record of an open-access journal |
GET /v1/papers/{id}/fulltext |
The full text by section from the best copy whose licence allows reuse (JATS, then HTML, then PDF): content (format=text or markdown, paged with offset, max_chars up to 200,000 and next_offset), outline (title, level, offset of each section), figures (label, caption, kind), references (label, text, doi), source_url, source_format, licence, cached |
GET /v1/papers/{id}/versions |
versions (v, date, url), latest, published (journal doi, journal_ref, url; or conference venue, venue_name, year, decision, presentation), copies that state their version |
GET /v1/papers/{id}/files |
files: every copy and, for a Zenodo record, each file it holds, with name, url, size, checksum, format, licence, reuse, source, fulltext |
GET /v1/papers/{id}/reviews |
OpenReview's public notes: reviews (kind review, meta_review, decision, rebuttal, comment, public_comment; by; date; reply_to; scores; content, null when the licence does not allow reuse; licence; url), decision, openreview_id (absent when the paper is not on OpenReview: reviews is empty) |
GET /v1/papers/{id}/references |
The papers it cites, in its order: papers, total, next_cursor, source (openalex; opencitations by DOI, identifiers only, when OpenAlex does not link it; semantic_scholar with source=semantic_scholar on your own key), sources_status; cursor, max_results (1-200) |
GET /v1/papers/{id}/citations |
The papers citing it, newest first, paged like references |
GET /v1/papers/{id}/related |
Papers OpenAlex finds related, best first |
GET /v1/papers/venues/{venue}/{year} |
Papers of a conference in a year (iclr, neurips, tmlr, acl, emnlp, naacl, findings …), by title: results, total, years (papers per year), next_offset; decision, limit (up to 1,000), offset |
GET /v1/papers/authors/{orcid}/works |
An ORCID iD's works from the paper store and OpenAlex, newest first: results, sources_status. A bibliography only |
GET /v1/papers/changes |
Papers added or changed in the paper store, oldest change first: changes (changed_at, paper), next_cursor (null: nothing more now, ask again later with the last cursor); since, source, limit (up to 1,000) |
A paper: id (pap_…, stable; a merged paper's other ids keep working),
ids (doi, arxiv, pmcid, pmid, hal, zenodo, openalex …),
title, abstract, type, year, published, venue, published_in
(the journal version of a preprint), authors (name, orcid,
affiliation, ror), versions, locations, fulltext_available,
retracted, withdrawn, cited_by_count, sources, attribution. Each
location has url, format, version, licence (SPDX), reuse
(commercial, non_commercial, no_derivatives, link_only) and
fulltext: Cormorant serves full text only for CC0, CC BY and CC BY-SA.
Errors: 422 invalid_paper_id, 404 paper_not_found, 410 paper_removed
(with reason and notice), 403 feature_disabled (the account switched
Research papers off); for full text 403 licence_restricted (no copy's
licence allows reuse) and 404 fulltext_unavailable (no reusable copy could
be read now), both with links to every copy; 422 invalid_orcid,
422 invalid_cursor, 404 venue_not_found, 503 source_error (OpenReview
did not answer). Charges: papers_search, papers_lookup (one per paper
found in a resolve; versions, files, reviews and author works are lookups),
papers_fulltext and papers_cached (answered from the paper store or a
cache; one per page of venues and changes). A refused full text is not
charged.
Site discovery: POST /v1/discover#
Finds the documents of a site: a crawl of one host that downloads every linked file of the wanted types and keeps, per document, where it is linked, when your project first saw it and when it last changed.
{
"site": "https://www.example-insurer.ch/de/downloads",
"path_prefixes": ["/de/downloads", "/de/produkte"],
"file_types": ["pdf"],
"max_pages": 200,
"allow_premium": false,
"project_ref": "steward"
}
| Field | Meaning |
|---|---|
site |
Where the crawl starts. It stays on this host (www. or not is the same host). |
path_prefixes |
Pages are read under these paths only. Default: the whole host. A document linked from such a page is collected wherever on the host it lies. |
file_types |
pdf (default), doc, docx, xls, xlsx, csv, ppt, pptx, odt, ods, rtf, zip, xml, json, txt. A file is recognised by the ending of its address, or by its Content-Type when the address has no ending. |
max_pages |
Pages read at most: 1 to 2,000, default 200. |
allow_premium |
true: a page or file that Cormorant's own addresses are refused may be fetched through a premium route, within your key's limits. |
The answer (202) is the discovery; it runs in the background.
{
"id": "dsc_7",
"site": "https://www.example-insurer.ch/de/downloads",
"path_prefixes": ["/de/downloads", "/de/produkte"],
"file_types": ["pdf"],
"max_pages": 200,
"allow_premium": false,
"project_ref": "steward",
"status": "queued",
"error": null,
"pages": 0,
"pages_failed": 0,
"truncated": false,
"documents": {"found": 0, "new": 0, "changed": 0, "unchanged": 0, "failed": 0, "removed": 0},
"created_at": "2026-11-13T08:00:00Z",
"started_at": null,
"finished_at": null
}
How the crawl works:
- It starts at
site, at each path prefix and at the addresses named by/sitemap.xml(a sitemap index is followed), and follows links breadth first. - One request every two seconds. A discovery of 200 pages and 100 documents takes about ten minutes.
- robots.txt binds it on every route: a disallowed address is neither read
nor downloaded, and counts in
pages_failedor as afaileddocument witherror: robots_disallowed. - Pages are read from Cormorant's own addresses, with a browser where a page needs scripts.
- Every document is a raw download (
mode: "raw"): its exact bytes are kept, it is a version of its address (GET /v1/versions), and a document your project already holds is asked for conditionally. - Each request is one
fetchof your project. At most five discoveries of a project run at a time (409 discover_limit_reached); one that is not done after 24 hours ends asfailed.
GET /v1/discover/{id} returns the discovery with its progress. status
is queued, running, done or failed. truncated: true means the
site has more pages than max_pages (or more than 2,000 documents): the
listing is incomplete.
GET /v1/discover/{id}/documents?offset=0&limit=100#
{
"id": "dsc_7",
"status": "done",
"total": 1,
"offset": 0,
"more": false,
"documents": [
{
"url": "https://www.example-insurer.ch/dam/avb-2026.pdf",
"status": "new",
"error": null,
"file_type": "pdf",
"found_on": "https://www.example-insurer.ch/de/downloads",
"link_text": "AVB Krankenpflege 2026",
"title": "Allgemeine Versicherungsbedingungen",
"kind_guess": "general_conditions",
"guessed_from": ["avb", "allgemeine versicherungsbedingungen"],
"first_seen": "2026-11-13T08:03:10Z",
"last_seen": "2026-11-13T08:03:10Z",
"last_changed": "2026-11-13T08:03:10Z",
"version": {
"sha256": "9f2c…",
"bytes": 412338,
"content_type": "application/pdf",
"etag": null,
"last_modified": "Tue, 03 Nov 2026 09:12:00 GMT",
"retrieved_at": "2026-11-13T08:03:10Z",
"body_url": "https://api.cormorant.ch/v1/bodies/9f2c…"
},
"old": null
}
]
}
| Field | Meaning |
|---|---|
status |
What this discovery found: new (your project sees it for the first time), changed (other bytes than at your project's last discovery; old is the version before), unchanged, failed (error says why; no version). The filter status=removed lists the documents this discovery found removed: known before and missing from two complete discoveries of the same paths in a row. |
found_on |
The page that links the document, or the sitemap that names it. |
link_text, title |
The text of the link and its title attribute. A document named by the sitemap only has neither. |
kind_guess, guessed_from |
See below. |
first_seen, last_seen, last_changed |
Kept per project and address across discoveries. |
The documents are listed in the order found and can be read while the discovery runs. Discoveries are kept for 90 days; the documents stay known to your project. Not charged.
kind_guess#
A guess of what kind of document a link leads to, from words in the link
text, the link's title and the file name. No model is involved: the same
link always gives the same guess, and guessed_from lists the words that
decided. Words match as whole words, without regard to case.
kind_guess |
Words (German, French, Italian, English) |
|---|---|
general_conditions |
AVB, Allgemeine Versicherungsbedingungen, Versicherungsbedingungen, CGA, conditions générales, condizioni generali, general conditions |
supplementary_conditions |
Zusatzbedingungen, ZB, besondere Bedingungen, conditions complémentaires, conditions particulières, condizioni complementari, condizioni particolari |
product_information |
Produktinformationsblatt, Produktinformation, Kundeninformation, information sur le produit, informazioni sul prodotto, factsheet |
tariff |
Tarifblatt, Tarif, Prämientarif, tarifs, tariffa, tariffe |
regulations |
Reglement, règlement, regolamento, Statuten, statuts |
form |
Formular, Antrag, Antragsformular, formulaire, modulo |
annual_report |
Geschäftsbericht, Jahresbericht, rapport de gestion, rapport annuel, rapporto di gestione |
The kind with the most matching words wins; null when no word matches.
It is a hint for sorting, not a classification of the document's content.
Page watches: POST, GET, DELETE /v1/pages/watches#
POST /v1/pages/watches with {page, url, interval_minutes} registers a
webhook for one web page (page: http or https; url: your HTTPS endpoint;
interval_minutes: 60 to 10080, default 1440). It returns the watch
(pgw_…) with its secret once; at most 50 watches per project. Every
interval the page is read with Cormorant's own fetchers (no proxy or render
service, no archive copy, never from the cache) and its text, whitespace
aside, is compared with the last check. The first check only records the
text. A different text is POSTed as page.changed with the added and
removed lines (at most 50 each) and both SHA-256 hashes, signed like company
watches (X-Cormorant-Signature: t=<unix>,v1=<hex>). Failed deliveries are
retried after 1, 5, 15, 60 and 180 minutes, then hourly; the page is not
checked again until the change is delivered. Each check is one fetch
request of the project and is skipped
(last_check_status: limit_reached) while the key is over its limits.
GET /v1/pages/watches lists the watches with their last check and delivery;
DELETE /v1/pages/watches/{id} removes one.
SEC EDGAR: /v1/sec/...#
Company and filing data from SEC EDGAR. Cormorant sends its own declared
identity to SEC ("<Org name> <contact email>", set by the operator) and
keeps all clients together under SEC's fair-access limit: one cluster-wide
rate limit per egress IP (default 8 requests/s, never more than 10), queued
for up to 10 s, and a shared backoff when SEC throttles (403/429/503). Only
the direct tier is used — never the browser, archived copies, the residential network or
alternative sources. Do not send your own User-Agent for SEC: a
user_agent/accept_language in POST /v1/fetch is ignored for SEC hosts.
The same policy applies to POST /v1/fetch and batch items for URLs on
www.sec.gov, data.sec.gov and efts.sec.gov.
All endpoints need an API key, count towards the project's rate limit and
are metered as kind sec (no provider cost). Answers are HTTP 200 also when
they failed; check error:
error |
Meaning |
|---|---|
unknown_identifier |
neither SEC nor Cormorant knows this ticker, CIK, name or ISIN (a home-market ticker of a non-US company: use its ADR ticker or the ISIN). An ISIN is resolved through its listings (a US ticker is looked up in SEC's own ticker list), then the company register and GLEIF |
not_sec_filer |
the company is known (a non-US listing such as NESN.SW / XSWX:NESN, the company register, GLEIF for an ISIN) but Cormorant knows no single SEC filer for it; hint: company, listing, sec_candidates (SEC filers with its name, when there are several) |
not_found |
SEC has no such filing or document (also: no filing of the requested forms) |
invalid_identifier |
a CIK, accession number, document name, form type, date or query is malformed (message says which); nothing was requested from SEC |
rate_limited |
no slot in the shared SEC rate limit within 10 s; retry after retry_after_s |
sec_unavailable |
SEC throttles (all SEC requests back off) or failed; retry after retry_after_s |
source_unavailable |
a resolve by ISIN could not ask the listing or company sources right now (not an unknown ISIN); retry after retry_after_s. Batch items wait and are retried |
sec_not_configured |
SEC is not enabled on this deployment |
timeout, too_large, robots_disallowed, … |
the fetch errors |
One CIK per company. GET /v1/sec/companies/resolve accepts a US ticker,
a CIK, a name, an ISIN, or a listing outside the US (NOVO-B.CO,
XCSE:NOVO-B, a bare home-market ticker such as NOVO-B). A company listed
outside the US resolves to its own SEC filer — the ADR of a foreign private
issuer — when exactly one is known: the CIK a company source reported, an
earlier resolution of the same company or ISIN (kept 30 days), or the one SEC
filer with the company's name (OpenFIGI's abbreviated issuer names such as
"TEVA PHARMACEUTICAL IND LTD" are written out first). matched_via says how
(ticker, cik, name, isin_listing, remembered, company_name), and
every identifier of the company then answers with the same CIK.
Identifiers: CIKs as a number or 10 digits (100493, 0000100493);
accession numbers with or without dashes (0000100493-25-000070,
000010049325000070); form types comma-separated (10-K,20-F,40-F,10-K/A).
Only the SEC URL patterns behind each endpoint can be requested.
Every answer has error, message, retry_after_s, cached (true when
all SEC documents came from Cormorant's cache), retrieved_at (oldest
document), source_url (the main SEC document), body_url and sha256
(its exact bytes, e.g. the raw submissions JSON) and request_id.
Caching. Filing documents and indexes (/Archives/edgar/data/{cik}/{accession}/…)
are immutable and cached for 365 days (revalidated only when you ask with
cache_ttl_s); company_tickers.json, submissions and XBRL facts for 12 h,
then revalidated with conditional requests; full-text search for 1 h.
GET /v1/sec/companies/resolve?ticker=TSN#
Also ?cik=100493 or ?name=tyson foods (exactly one). From
company_tickers.json and company_tickers_exchange.json:
{"cik": 100493, "cik_padded": "0000100493", "title": "TYSON FOODS, INC.",
"tickers": ["TSN"], "exchanges": ["NYSE"], "ambiguous": false,
"candidates": [{"cik": 100493, "cik_padded": "0000100493", "title": "TYSON FOODS, INC.", "tickers": ["TSN"], "exchanges": ["NYSE"]}],
"error": null, "cached": true, "source_url": "https://www.sec.gov/files/company_tickers.json", "…": "…"}
BRK.B and BRK-B are the same ticker. A name matches exact titles first,
then titles starting with or containing it; when several companies match,
ambiguous is true, the company fields are null and candidates lists
up to 10. A CIK without a listed ticker is resolved from its submissions.
GET /v1/sec/companies/{cik}/submissions#
Query: forms, since, until (filing dates, YYYY-MM-DD), limit
(default 100, max 10,000), history (default true: also read the pages of
older filings SEC lists under files, only those that can hold filings
after since). Company fields cik, cik_padded, name, title,
tickers, exchanges, entity_type, sic, sic_description, category,
fiscal_year_end, state_of_incorporation, ein, lei, website,
phone, business_address, former_names; filings (newest first, at most
limit), filings_total, truncated, and files (name, filing_count,
filing_from, filing_to, url, fetched, body_url). Each filing:
| Field | From SEC's column |
|---|---|
accession |
accessionNumber |
form, filing_date, report_date, acceptance_datetime |
form, filingDate, reportDate, acceptanceDateTime |
act, file_number, film_number, items, core_type, size |
act, fileNumber, filmNumber, items, core_type, size |
is_xbrl, is_inline_xbrl |
isXBRL, isInlineXBRL (as booleans) |
primary_document, primary_document_description |
primaryDocument, primaryDocDescription |
primary_document_url, index_url |
built: the document and the -index.htm page (null URL when the primary document is in a sub-folder, e.g. ownership forms) |
is_amendment |
built: the form ends in /A |
GET /v1/sec/companies/{cik}/filings/latest?forms=10-K,20-F,40-F#
The newest filing (by filing date) of forms — default 10-K,20-F,40-F
(annual reports; amendments only when you list them, e.g. 10-K,10-K/A):
the filing fields above at the top level (accession, form,
filing_date, report_date, primary_document, primary_document_url,
index_url, is_amendment, …) plus cik, cik_padded, name, tickers,
exchanges. Older filing pages are searched when the recent list has none;
none at all: not_found.
GET /v1/sec/filings/{cik}/{accession}#
The filing index: form, filing_date, report_date, accepted,
company, is_amendment, index_url, folder_url, accession,
accession_nodash, index_source (index_htm, or index_json when only the
folder listing has the documents) and documents: sequence,
description, document (file name), type (10-K, EX-21, EX-101.SCH,
…), size, url. Sub-folders are not listed.
POST /v1/sec/documents/fetch#
{"cik": 100493, "accession": "0000100493-25-000070", "document": "tsn-20250927.htm",
"max_bytes": 52428800}
max_bytes: at most 100 MB. Left unset, HTML documents are accepted up to
100 MB (annual reports in inline XBRL are often 20–80 MB); the same holds for
POST /v1/fetch and batch items fetching https://www.sec.gov/Archives/edgar/…
URLs without max_bytes.
Fetches one document of a filing (HTML/iXBRL, PDF, exhibit, XML) and answers
exactly like POST /v1/fetch (text, pdf_text_pages, content_kind,
body_url, sha256, body_kind: origin, …). Optional: include_html
(default true), accept_pdf, cache_ttl_s, timeout_s, project_ref.
Invalid identifiers answer error: invalid_identifier in that shape.
GET /v1/sec/companies/{cik}/facts#
A summary of data.sec.gov/api/xbrl/companyfacts/CIK##########.json:
cik, cik_padded, name, taxonomies (concepts per taxonomy),
concepts, bytes; the complete JSON is at body_url.
GET /v1/sec/search?q=…&forms=…&dateRange=…#
EDGAR full-text search (filings since 2001). Query: q (EDGAR syntax),
forms, dateRange (all, 10y, 5y, 1y, 30d, or custom with
startdt/enddt), from (offset, pages of 100). Answer: query, total,
total_relation, hits (accession, ciks, display_names, form,
root_forms, file_type, file_description, file_date, period_ending,
document, url, index_url, score).
Batch: POST /v1/batch/sec#
Up to 50,000 SEC operations as one job of kind sec:
{
"items": [
{"op": "resolve", "ticker": "TSN"},
{"op": "latest", "ticker": "TSN", "forms": "10-K"},
{"op": "latest", "cik": 100493},
{"op": "document", "cik": 100493, "accession": "0000100493-25-000070", "document": "tsn-20250927.htm"}
],
"idempotency_key": "acme-run-2026-10-20-sec-0001",
"callback_url": "https://acme.example/hooks/cormorant"
}
op is resolve (ticker, cik or name), submissions (cik or
ticker, forms, since, until, limit, history), latest (cik or
ticker, forms), facts (cik or ticker), filing (cik,
accession) or document (cik, accession, document, max_bytes,
accept_pdf, include_html — default false in a batch); project_ref
on any item. Identifiers are checked when the job is created (422 invalid_item naming the item). Item results have the shape of the single
endpoint (plus op); document results that of POST /v1/sec/documents/fetch. Items share the cluster-wide SEC rate limit with
every other SEC request (at most 10 requests/s per egress IP) and are
admitted a few at a time: a full limiter or a SEC backoff puts an item back
in the queue instead of failing it. Each item is metered once as kind sec
(a ticker resolved inside an item is not extra) and counts as fetch for
key limits.
POST /v1/translate#
Machine translation of a text, kept next to the original. Send the text
of a fetch result (plain text or light Markdown) and a target:
{
"text": "騰訊控股有限公司2025年收入為6600億元人民幣,年增8%。",
"target": "en", // BCP 47 tag or a name: english, taiwanese, swiss german …
"source": null, // detected when omitted
"title": null, // translated too
"tier": "quality", // quality (documents, default) | fast (titles, snippets)
"bilingual": false, // true: also the aligned segments
"glossary": [{"source": "騰訊控股", "target": "Tencent Holdings"}],
"project_ref": "company:4711"
}
{
"request_id": "req_…",
"original": {"text": "騰訊控股…", "title": null, "lang": "zh-Hant"},
"translation": {
"target": "en", "source": "zh-Hant", "status": "done", // done | partial | failed
"tier": "quality",
"text": "Tencent Holdings Limited's revenue in 2025 was RMB 660 billion, up 8% year on year.",
"title": null,
"glossary_applied": ["騰訊控股 → Tencent Holdings"],
"checks": {"numbers_preserved": true, "untranslated_share": 0.0, "failed": []},
"same_language": false,
"cached": false,
"chars_billed": 30,
"chars_cached": 0,
"segments": null // bilingual: [{id, kind, src, tgt, src_start, src_end, tgt_start, tgt_end}]
},
"warnings": [], // e.g. how `taiwanese` was read
"billing": {"category": "translation_quality", …}
}
The text is split into segments — headings, list items, table cells,
paragraphs — translated together and put back in the same structure. With
bilingual: true each segment carries its character offsets (end
exclusive): src_start/src_end in the original text, tgt_start/tgt_end
in translation.text (where a failed segment keeps its original wording).
The title's offsets are null, as are those of a long paragraph's sentence
that cannot be placed exactly. A quote taken from the translation maps back
to the original sentence through the segment whose tgt range contains it.
On a fetch, translation.source is the page's language the text is
translated from (the page's lang, else detected), also while the
translation is pending and when it failed; status is done,
partial, failed or pending. A page partly in the target language is
translated as a whole: the parts already in it come back unchanged.
Every segment is checked: all numbers of the original are in the
translation (compared by value, so 6600億 may become 660 billion), it is
in the target language, its length is plausible, and it is a translation,
not a comment. A segment that fails is tried once more with another model;
if it still fails it keeps its original wording, tgt is null in
segments, it is listed in checks.failed with the failed checks and the
status is partial (failed when nothing could be translated). The page's
own words are data: instructions inside a page are translated, never
followed.
Segments translated before (same wording, languages, tier and glossary
terms) come from a cache (chars_cached): a site's menus and footers are
translated once, a re-fetched page costs nothing. A text already in the
target language is returned as it is, at no charge (same_language). Billing is
per 1,000 source characters translated (chars_billed) on the meters
translation_fast and translation_quality; a request answered entirely
from the cache counts as translation_cached. Synchronous up to 20,000
characters (text and title); larger texts: 413 text_too_large.
Errors: 422 unknown_language (with the supported tags), 413 text_too_large, 503 translation_unavailable with reason
(not_configured, disabled, budget_daily, budget_monthly) — retry
later.
GET /v1/translations/{translation_id}#
A fetch's translation running in the background (translate_to on a text
over 20,000 characters, or on a batch item):
{
"translation_id": "tr_8c1f2a…",
"status": "done",
"request_id": "req_6b1f…",
"target": "en",
"tier": "quality",
"translation": {"status": "done", "text": "…", "checks": {"numbers_preserved": true}},
"error": null,
"reason": null,
"created_at": "2026-10-25T08:00:00Z",
"finished_at": "2026-10-25T08:01:12Z",
"billing": {"category": "translation_quality"}
}
status is pending, running, done or failed (error:
translation_unavailable with reason, translation_failed, or
translation_timeout after 9 minutes of translating). A job
that waits for translation capacity, or for the translation provider to be
available again, stays pending and runs later. Kept 30
days after it finishes; another project's id is 404.
Collect: POST /v1/collect#
Research a company or topic across languages in one job. Body:
| Field | Meaning |
|---|---|
subject |
What to research (a company name or a topic, any language). With company: what to look for about it (default: its name). |
company |
cmp_… or scheme:value. Its own names in each language are searched (not machine-translated); without it, a subject that names a company in the register (match ≥ 0.9) is used the same way. |
entity, entity_filter |
The company as on POST /v1/search: id, names, domains (or a cmp_… id or domain as a string). A subject that does not name the company gets its name in front ("BYD" animal welfare), searched in each language as the company's own name there (names you give in Chinese, Japanese or Korean script first, then the register's); results about it come first. entity_filter drops the others; it is on by default whenever a company is bound (company, entity, or a subject naming one), and false keeps every result. |
languages |
1 to 6 languages (BCP 47 or names), searched in that order. |
queries, query_language |
Your own query per language; the language of subject when it is too short to detect. |
translate_to, translation_tier, bilingual |
Translate the fetched pages (in the background, as batch fetch items); bilingual: with the aligned segments and their offsets. |
depth |
Pages fetched per language: quick 3, standard 5 (default), deep 10. |
freshness, allow_premium, project_ref |
As for search and fetch. |
idempotency_key, callback_url |
As for batch jobs; the callback fires once the pages are fetched. |
Answers 202 {job_id, created} at once. The job searches each language
(as POST /v1/search with languages and the company as entity), picks
the best pages per language (each URL once) and fetches them as a batch
fetch job (fetch_job_id, with language per page).
GET /v1/collect/{job_id}#
status (running until the searches and fetches are finished, then
done), company, entity (the names and domains the searches matched),
query, queries_used, coverage[] per language (query,
query_method, results, fetched, failed, in_language, documents), documents[],
all search results, warnings, translations_pending and billing (every
search, fetch and translation of the job so far, each billed as when made on
its own).
A document is a fetched page (url, final_url, requested_lang, lang,
title, text, published_at, language_versions, translation,
error). Pages that are one page in several languages (linked by hreflang,
either way, or with the same final URL) are one document: the version in
translate_to first (no translation needed), else the first requested
language; the others are in versions[], and found_in lists every
language that found it. Background translations are filled in once done.
With a bound company each document also says whether it is about it:
entity_match (how its search result matched, as on POST /v1/search),
named (the fetched title or text names the company: its names in any
language, its tickers or ISINs; null when nothing was fetched),
mentions (how often) and match_score (0–1: 1.0 on the company's own
domain; named in the text 0.7, plus 0.03 per further mention, at most
0.95; otherwise by entity_match: name 0.6, weak_name 0.3, none 0,
halved when the fetched text does not name the company).
GET /v1/usage?from=YYYY-MM-DD&to=YYYY-MM-DD#
Usage of the caller's scope and what it costs. Inclusive dates (UTC), default: current month to date, at most 400 days. Read from aggregates refreshed every 5 minutes, never from the request log, so it answers in the same time at any volume.
Who sees what. A standard key (cmr_…) sees only its own requests. An
account admin key (cma_…) sees every key and project of its customer —
revoked keys included, and usage recorded before per-key attribution as
"key": null. A project without a customer is its own account. Nothing ever
crosses a customer boundary; a key or project you cannot see is 404, like
one that does not exist.
Parameters
| Parameter | Meaning |
|---|---|
from, to |
Range of UTC days (inclusive). |
group_by |
Comma-separated, combinable: key, project, category, day, hour (hourly data: last 35 days). |
key |
Only these keys (comma-separated prefixes, e.g. cmr_AbCdEf). |
project |
Only these projects (comma-separated names). |
category |
Only these billing categories: search, search_fallback, search_cached, search_empty, fetch_own, fetch_premium, fetch_cached, fetch_robots, company, company_cached, sec, sec_cached, company_profile, company_profile_cached. |
format |
csv (same as Accept: text/csv). |
{
"project": "acme-crawler", "key": "cma_XyZaBc", "role": "account_admin",
"scope": {"customer": "Acme", "projects": ["acme-crawler", "acme-search"], "keys": "all"},
"from": "2026-10-01", "to": "2026-10-19",
"as_of": "2026-10-19T11:05:02+00:00", "final": false, "currency": "USD",
"totals": {"requests": 9120, "succeeded": 8800, "failed": 320, "success_rate": 0.9649,
"cached": 1200, "cache_hit_rate": 0.1316,
"errors": {"http_404": 210, "all_tiers_failed": 110},
"latency_ms_p50": 900, "latency_ms_p95": 7400, "bytes": 812345678,
"premium_requests": 90, "premium_share": 0.0113, "empty_count": 0,
"charge": "15.96", "empty_charge": "0.00",
"billable": {"fetch_own": {"quantity": "8710", "included": "1000",
"billable": "7710", "amount": "15.42"},
"fetch_premium": {"quantity": "90", "included": "0",
"billable": "90", "amount": "0.36"},
"premium_gb": {"quantity": null, "included": null,
"billable": null, "amount": "0.18"}}},
"search": {"requests": 1200, "cached": 300, "cache_hit_rate": 0.25, "succeeded": 1198,
"success_rate": 0.998, "bytes": 0, "premium_bytes": 0,
"latency_ms_p50": 1100, "latency_ms_p95": 3900, "fallbacks": 60,
"fallback_rate": 0.0667, "providers": {"searxng": {"requests": 840, ...}, "brave": {...}}},
"fetch": {"requests": 7920, "cached": 900, "tiers": {"direct": {...}, "proxy": {...}},
"errors": {"http_404": 210},
"by_outcome": {"succeeded": {"requests": 7600, "bytes": 800000000,
"premium_bytes": 8800000, "premium_requests": 80},
"failed": {"requests": 320, "bytes": 0,
"premium_bytes": 323456, "premium_requests": 10}}, ...},
"company_profile": {}, // extended company profiles (kind company_profile), same fields; {} when none
"group_by": ["key"],
"groups": [{"key": "cmr_AbCdEf", "key_label": "crawler", "key_role": "standard",
"key_status": "active", "project": "acme-crawler", "requests": 9000, ...,
"charge": "15.70", "billable": {...}}],
"keys": [{"prefix": "cmr_AbCdEf", "label": "crawler", "role": "standard",
"project": "acme-crawler", "active": true, "requests": 9000, "cached": 1150,
"succeeded": 8690, "search_requests": 1100, "fetch_requests": 7900, "company_requests": 0,
"company_profile_requests": 0,
"premium_bytes": 9123456, "charge": "15.70"}],
"account": [{"period": "2026-10", "from": "2026-10-01", "to": "2026-10-19", "currency": "USD",
"complimentary": true, "usage_charges": "15.96", "account_level_amount": "-15.96",
"account_lines": [{"kind": "complimentary", "description": "Complimentary plan: 100 % discount",
"amount": "-15.96"}],
"list_total": "15.96", "net_total": "0.00"}]
}
- Metrics (in
totalsand every group):requests(cache hits included),succeeded,failed,cached,errors(failures by error code, top 50),latency_ms_p50/latency_ms_p95of uncached requests (estimated from a latency histogram with bounds 100, 250, 500 ms, 1, 2, 5, 10, 20, 30, 60 and 120 s — exact to the bucket),bytes,premium_requestsandpremium_share(fetches that needed the premium routes, of all uncached fetches). - Charges (projects with a customer):
chargeis what the group costs at your plan's prices in your invoice currency, as a decimal string;billablelists each price-plan meter with the measuredquantity, theincludedunits it used (its pro-rata share of the plan's included units of the month),billableandamount. Meters billed on provider cost show only the amount. The period is rated exactly like the invoice and each usage line is split to the cent, first per key, then per day and category: any grouping adds up to the same total, and the keys add up to the usage lines of the estimate (GET /v1/account) or invoice. Base fee, minimum, contract discount and the complimentary credit are account-level lines: account admin keys see them per period inaccount. Complimentary accounts see list-price charges and the 100 %complimentaryline. - Provider cost —
cost_usdand the projectbudget(Cormorant's spend with its search and proxy providers) appear only for projects without an external customer (internal use). Customers see what they pay, never what Cormorant pays. - Freshness:
as_ofis the time up to which every request is included;final: true(top level, and per group withgroup_by=day) means the days are closed and will not change (a day becomes final two hours after it ends). searchandfetchkeep the per-kind blocks of earlier versions (now for the caller's scope), withproviders/tiersbreakdowns. Withkeyingroup_by,keyskeeps the earlier per-key list as well.- Latency components: every per-kind block has
latency_components(queue_ms,politeness_wait_ms,upstream_ms, each{p50, p95}of uncached requests), and each entry oftiers/providersaddslatency_ms_p50/p95and<component>_p50/_p95, so a slow tier can be told apart from a busy domain or a queue backlog. Estimated from histograms like the other percentiles; requests from before these were recorded are not included. by_outcome(in every per-kind block) splits the same requests intosucceededandfailed, each withrequests,bytes,premium_bytes,premium_requests(fetch) andcost_usd(provider cost, internal projects only):fetch.by_outcome.failed.premium_bytesis what blocked pages cost before the fetch gave up. Whether failed requests are billed depends on your plan (billable).
CSV. Accept: text/csv (or format=csv) returns one row per group — or
one row of totals without group_by — with the dimensions, the metrics,
charge, the meters as <meter>_quantity, <meter>_included,
<meter>_billable, <meter>_amount and errors as code=n;code=n.
curl -sS "$CORMORANT_URL/v1/usage?from=2026-10-01&to=2026-10-31&group_by=key,day" \
-H "Authorization: Bearer $CORMORANT_API_KEY" -H "Accept: text/csv" -o usage.csv
GET /v1/usage/timeseries#
The same metrics per granularity=hour (last 35 days; default range: today)
or granularity=day (default: month to date), one point per bucket up to now
— buckets without usage are zero, so the points can be charted directly.
group_by (key, project, category, combinable) gives one series per
value; key, project and category filter as for GET /v1/usage. Same
scope rules, same charges (an hour's charge is its share of the day's), CSV
with Accept: text/csv.
{"granularity": "hour", "from": "2026-10-19", "to": "2026-10-19", "as_of": "2026-10-19T11:05:02+00:00",
"final": false, "currency": "USD", "group_by": ["key"],
"series": [{"key": "cmr_AbCdEf", "key_label": "crawler", "key_role": "standard",
"key_status": "active", "project": "acme-crawler",
"points": [{"t": "2026-10-19T00:00:00+00:00", "final": false, "requests": 410,
"succeeded": 402, "failed": 8, "latency_ms_p95": 6100,
"premium_share": 0.01, "charge": "0.82", ...}, ...]}]}
GET /v1/usage/domains#
The busiest fetched domains of the caller's keys over the range (kept 90
days): requests, succeeded, success_rate, premium_requests and
premium_share per domain, busiest first (limit, default 50, at most 500).
group_by=key returns a top list per key. Built from each key's 100 busiest
domains per day; usage recorded before per-key attribution is not included.
{"from": "2026-10-01", "to": "2026-10-19",
"domains": [{"domain": "www.example.com", "requests": 1200, "succeeded": 1150,
"success_rate": 0.9583, "premium_requests": 40, "premium_share": 0.0333}]}
GET /v1/requests#
The request ledger, newest first and in real time: one row per search, fetch or batch item of the caller's scope (a standard key: its own requests; an account admin key: the whole customer). Kept as long as the request log (90 days; default range: the last 30 days).
| Parameter | Meaning |
|---|---|
from, to |
Range of UTC days (inclusive). |
key, project, category |
As for GET /v1/usage. |
kind |
search, fetch, company (/v1/companies/…), sec (SEC EDGAR: /v1/sec/… and fetches of SEC hosts) or company_profile (extended company profiles). |
outcome |
succeeded or failed. |
error, domain, project_ref, job_id, cached |
Exact matches. |
limit |
Rows per page, 1–1000 (default 100). |
cursor |
next_cursor of the previous page. |
{"from": "2026-09-20", "to": "2026-10-19", "as_of": "2026-10-19T11:05:02+00:00",
"currency": "USD", "limit": 100, "next_cursor": "MjAyNi0xMC0xOVQxMTowMjoxMyswMDowMHw5ODc2",
"requests": [{"request_id": "req_6b1f2c0e9a7d4b5c8e3f1a2b3c4d5e6f",
"time": "2026-10-19T11:02:13+00:00", "key": "cmr_AbCdEf", "key_role": "standard",
"project": "acme-crawler", "project_ref": "company:4711", "job_id": null,
"kind": "fetch", "domain": "www.example.com", "tier": "direct", "status": 200,
"ok": true, "error": null, "latency_ms": 840, "cached": false, "empty": false,
"routes_tried": null, "bytes": 48211,
"premium": false, "category": "fetch_own", "charge": "0.001842"}]}
Page with cursor until next_cursor is null; the next page is also in
the Link: <…>; rel="next" header (and X-Next-Cursor). Pages are keyset
pages, so they stay fast and consistent however deep you go, while new
requests arrive on top. charge is the request's share of its key's
charges for that day and category (their average price, 6 decimals); it is
null until the request is aggregated (within 5 minutes) and settles when
the day is final. GET /v1/requests/{request_id} returns one request with
reason and the tiers tried (attempts); another key's (standard keys) or
another customer's request is 404. CSV with Accept: text/csv (one page;
the next cursor is in X-Next-Cursor).
GET /v1/quota#
Every limit that applies to the caller this month, each with limit,
used, reserved, remaining, resets_at, projected_end_of_period
(linear extrapolation to the end of the month) and status (ok,
warning from 80 %, exhausted): the key's spend cap
(monthly_spend, money as decimal strings), request quotas
(monthly_requests.<category>) and rate limit; the project's rate limit
(and provider budget, for projects without an external customer). An account
admin key gets every active key of the account and, for a customer, the plan's
included units (included.<meter>).
{"key": "cmr_AbCdEf", "role": "standard", "period": "2026-10",
"resets_at": "2026-11-01T00:00:00+00:00", "as_of": "2026-10-19T11:05:02+00:00",
"usage_refreshed_at": "2026-10-19T11:05:00+00:00",
"keys": [{"key": "cmr_AbCdEf", "key_label": "crawler", "key_role": "standard",
"project": "acme-crawler", "is_self": true, "allowed_categories": null,
"usage": {"requests": {"search": 120, "fetch": 81234, "fetch_premium": 412},
"spend": "38.12", "currency": "USD"},
"limits": [{"name": "monthly_requests.fetch", "unit": "requests", "limit": 100000,
"used": 81234, "reserved": 0, "remaining": 18766,
"resets_at": "2026-11-01T00:00:00+00:00",
"projected_end_of_period": 132550, "status": "warning"},
{"name": "monthly_spend", "unit": "USD", "limit": "50.00", "used": "37.90",
"reserved": "0.22", "remaining": "11.88", "status": "ok", ...}]}],
"project": {"project": "acme-crawler",
"limits": [{"name": "rate_limit", "unit": "requests/s", "limit": 200, "used": 3, ...}]}}
reserved is the spend estimated since the last aggregation (or, for the
provider budget, spend held for calls in flight). events lists the
thresholds crossed this month in your scope (see Alerts below).
alert_email says whether alert e-mails reach your account's alert
addresses (there may be several): status is deliverable, not_set,
partially_undeliverable (some addresses) or undeliverable (all), with
addresses, undeliverable (counts), and reason (bounced or
complained) and since of the first undeliverable one. After a hard
bounce or a spam complaint no further alert mail goes to that address until
it is changed (contact us); webhooks are not affected.
Alerts: POST, GET, DELETE /v1/alerts#
A webhook receives an event whenever something in its scope crosses 50, 80
or 100 % of a limit or allowance in a month (each threshold fires once per
month): a key's spend cap or request quota, a project's provider budget
(projects without an external customer) or the plan's included units of the
account. The same events are listed in GET /v1/quota (events).
POST /v1/alerts
{"url": "https://hooks.example.com/cormorant", "scope": "customer", "thresholds": [80, 100]}
201 {"id": 7, "url": "https://hooks.example.com/cormorant", "scope": "customer", "key": null,
"project": null, "thresholds": [80, 100], "created_at": "2026-10-19T11:00:00+00:00",
"last_delivery_at": null, "last_status": null, "secret": "whsec_9f2c…"}
scope:key(one key;key= its prefix, default the calling key),project(project= name; the project and its keys) orcustomer(the whole account). A standard key can only watch itself (403 account_admin_requiredotherwise); an account admin key anything in its account. Default:keyfor standard keys,customerfor admin keys.thresholds: any of50,80,100(default all).urlmust behttpsand resolve to a public address; at most 20 webhooks per account.secretis returned only once.GET /v1/alertslists the webhooks you can see (never secrets) withlast_delivery_atandlast_status;DELETE /v1/alerts/{id}removes one.
Deliveries are POST <url> with the event as JSON:
{"id": "evt_42", "created_at": "2026-10-19T11:05:03+00:00", "type": "usage.threshold",
"scope": "key", "customer": "Acme", "project": "acme-crawler", "key": "cmr_AbCdEf",
"key_role": "standard",
"limit": {"name": "monthly_spend", "unit": "USD", "limit": "50.00", "used": "40.12",
"threshold": 80, "period": "2026-10", "resets_at": "2026-11-01T00:00:00+00:00"}}
Headers: X-Cormorant-Event: usage.threshold, X-Cormorant-Delivery: dlv_…
and X-Cormorant-Signature: t=1760871903,v1=5257a8…, where v1 is the hex
HMAC-SHA256 of "<t>.<raw body>" with your secret. Verify it in constant
time and reject a t older than a few minutes:
import hashlib, hmac, time
def verify(secret: str, body: bytes, header: str) -> bool:
parts = dict(p.split("=", 1) for p in header.split(","))
mac = hmac.new(secret.encode(), f"{parts['t']}.".encode() + body, hashlib.sha256)
fresh = abs(time.time() - int(parts["t"])) < 300
return fresh and hmac.compare_digest(mac.hexdigest(), parts["v1"])
Any 2xx answer counts as delivered; other answers and network errors are
retried after 1, 5, 15, 60, 180, 360 and 720 minutes (8 attempts). Redirects
are not followed, and each delivery connects to the address that passed the
check (no DNS rebinding). Events are evaluated with the usage aggregates (every 5
minutes). Use id to ignore duplicates.
GET /v1/keys and GET /v1/keys/self#
The keys the caller may see — by prefix, label and role, never the key itself:
every key of the customer's projects for an account admin key (revoked keys
included), only itself for a standard key. The prefix always shows the role:
cma_… is an account admin key, cmr_… a standard key.
{"role": "account_admin",
"keys": [{"prefix": "cma_XyZaBc", "label": "ops", "role": "account_admin",
"project": "acme-crawler", "status": "active",
"created_at": "2026-09-01T08:00:00+00:00", "revoked_at": null,
"last_used_at": "2026-10-19T11:02:00+00:00", "is_self": true},
{"prefix": "cmr_AbCdEf", "label": "crawler", "role": "standard", "status": "revoked", ...}]}
Each key also has limits (monthly_spend_cap, currency, monthly_requests,
rate_limit_rps, allowed_categories; null without limits).
GET /v1/keys/self returns the calling key in the same shape plus its use
this month (usage) and quota state (quota, the entries of GET /v1/quota).
Managing keys (account admin keys)#
An account admin key (cma_…) manages the keys of its account's projects,
named by prefix as GET /v1/keys lists them. Standard keys get 403
account_admin_required. Every change is in the account's audit log.
POST /v1/keys{"label": "crm-sync", "project": "acme-crawler", "role": "standard"}creates a key (default: a standard key of the calling key's project). The answer (201,Cache-Control: no-store) is the key's row pluskey, the full key, shown this once.PATCH /v1/keys/{prefix}{"label": "…"}renames it.POST /v1/keys/{prefix}/rotatecreates a key with the same project, role, label and limits, revokes the old one at once, and answers like creation plusreplaces(the old prefix).POST /v1/keys/{prefix}/revokerevokes it at once. The account's last active account admin key cannot be revoked (409last_admin_key).PUT /v1/keys/{prefix}/limitssets every limit at once (monthly_spend_cap,monthly_requests,rate_limit_rps,allowed_categories). Limits Cormorant set for a key are a ceiling: lower values are taken, higher ones refused (403above_operator_limit), and a limit left out keeps Cormorant's value. The rate limit is at most the project's.
Account and invoices#
Keys belong to a project; a project may belong to a customer (the billed
account). These endpoints show the key's own project usage plus the plan,
current-period estimate and issued invoices of that customer — never another
customer's data, never drafts. Money is a decimal string in the invoice
currency (USD, CHF or EUR). Usage is aggregated every 5 minutes (usage_refreshed_at).
See billing.md for pricing rules.
GET /v1/account#
{
"project": {"id": 7, "name": "acme-crawler"},
"period": {"period": "2026-10", "from": "2026-10-01", "to": "2026-10-31"},
"usage_refreshed_at": "2026-10-19T11:00:04+00:00",
"project_usage": {"fetch_own": {"requests": 9120, "succeeded": 8800, "bytes": 812345678,
"bytes_ok": 800000000, "premium_bytes": 0, "premium_bytes_ok": 0,
"cost_usd": "0", "cost_ok_usd": "0"}, "search": {...}},
// cost_usd / cost_ok_usd: null for projects of an external customer
"customer": {"name": "Acme", "company_name": "Acme Research AG", "currency": "USD",
"status": "active", "complimentary": true,
"payment_type": "complimentary", "demo_until": null},
// payment_type: complimentary | demo | invoice | stripe; demo_until: last day of a demo
"customer_usage": {...},
"plan": {"id": 1, "code": "standard-usd", "version": 1, "name": "Standard (USD)",
"currency": "USD", "complimentary": false},
"estimate": {"period": "2026-10", "currency": "USD",
"lines": [{"kind": "usage", "component": "fetch_own",
"description": "Page fetches (1,000 included)", "quantity": "8800",
"unit": "fetch", "unit_price": null, "amount": "15.60",
"detail": {"included": "1000", "billable": "7800",
"tiers": [{"from": "0", "to": "100000", "quantity": "7800",
"unit_price": "0.002", "amount": "15.60"}]}},
{"kind": "complimentary", "description": "Complimentary plan: 100 % discount", "amount": "-15.60", ...}],
"subtotal": "15.60", "discount_total": "15.60", "net_total": "0.00",
"vat_rate": "8.1", "vat_amount": "0.00", "total": "0.00", "complimentary": true,
"list_total": "15.60"}
}
keys breaks the period down per API key. An account admin key (cma_…)
sees every key of the customer's projects (or of this project without a
customer); an additional key (cmr_…) sees only itself. Keys appear by
prefix, label and role, never ids or secrets, with its usage by category and amount, its share of
the usage charges at list price. Each usage line of the estimate is split
between keys in proportion to their share of that meter (to the cent), so the
amounts add up to the usage lines; base fee, minimum, discounts and the
complimentary credit stay on the account. A row with "prefix": null is usage recorded
before per-key attribution.
"keys": [{"prefix": "cma_XyZaBc", "label": "billing", "role": "account_admin", "project": "acme-crawler",
"active": true, "requests": 9120, "succeeded": 8800,
"usage": {"fetch_own": {"requests": 9120, ...}}, "amount": "15.60"}]
Projects without a customer get "customer": null, "plan": null, "estimate": null
(and amount: null per key).
Categories: search, search_fallback, search_cached, search_empty, fetch_own,
fetch_premium, fetch_cached, fetch_robots, company, company_cached, sec, sec_cached,
company_profile, company_profile_cached.
GET /v1/account/invoices#
{"invoices": [{"number": "CORM-2026-0001", "status": "issued|paid|void", "period": "2026-09", "period_start", "period_end", "currency", "plan_label", "complimentary", "subtotal", "discount_total", "net_total", "vat_rate", "vat_amount", "total", "vat_note", "issued_at", "due_at", "paid_at", "voided_at", "pdf_url": "/v1/account/invoices/CORM-2026-0001/pdf"}]}
GET /v1/account/invoices/{number} and /pdf#
The invoice with its lines (and tier breakdown), or the PDF
(GET /v1/account/invoices/{number}/pdf). Another customer's number (or a
draft) is 404.
GET /v1/account/credit-notes and /v1/account/credit-notes/{number}/pdf#
{"credit_notes": [{"number": "CORM-CN-2026-0001", "invoice_number": "CORM-2026-0001", "issued_at", "currency", "net_amount", "vat_rate", "vat_amount", "total", "reason", "refund": false, "pdf_url": "/v1/account/credit-notes/CORM-CN-2026-0001/pdf"}]}, newest
first. refund: false means the total was deducted from the invoice's open amount; true
means it is owed back. The PDF route answers 404 for another customer's number.
GET /v1/account/reports and /v1/account/reports/{period}/pdf#
Monthly usage reports, one per closed month (latest version), account admin
keys only (403 account_admin_required otherwise; an empty list for a
project without a customer):
{"reports": [{"period": "2026-10", "version": 1, "generated_at", "requests": 96871, "currency": "CHF", "net_total": "412.60", "pdf_url": "/v1/account/reports/2026-10/pdf", "projects": [{"project": "research-crawler", "pdf_url": "…/pdf?project=research-crawler"}], "keys": [{"key": "cmr_8f2Ka", "label": "crawler prod", "project": "research-crawler", "pdf_url": "…/pdf?key=cmr_8f2Ka"}]}]}
The PDF shows requests per day and category, success rate, charges, projects
and keys with their share of the charges; ?project= or ?key= (prefix)
prints one project or key. A month without a report, or an unknown project
or key, is 404. A new version appears when usage or prices of the month
changed before it was invoiced.
Company data#
The company register: one source-attributed record (company/v1) per
company Cormorant has been asked about, kept and versioned. Sources are
official registers, GLEIF and other open, legitimate sources
(GET /v1/companies/sources). Every data call is metered as company
(billing category and meter company; one request per call or batch item).
GET /v1/companies/sources, GET /v1/schemas/company and watch management
are not metered.
| Endpoint | Purpose |
|---|---|
GET /v1/companies/search?q=&country=&identifier=&status=&legal_form=&limit=&cursor=&live= |
Register matches (trigram/full-text over current, former and trading names; names in Chinese, Japanese, Korean or Cyrillic by substring, either Chinese script, 騰訊 finds 腾讯控股有限公司; exact on identifier) plus live hits from the sources covering country on the first page (unless the register has a near-exact hit, score ≥ 0.95; live=true always, live=false never). match_score 0–1, in_register, ref; live_sources[] per source {source, ok, status, error, ms} |
GET /v1/companies/{id} |
The record. id = cmp_… or scheme:value. Asked by ticker:MIC:SYMBOL (share classes in any spelling, ticker:SYMBOL for a US symbol without a MIC), the answer adds listing: that listing's mic, ticker, exchange, currency, isin and primary (null while market data cannot say). max_age, refresh, include=people,ownership,filings,financials,events,claims,market,estimates,esg,indices, sources=. translate_to=en (`translation_tier=fast |
GET /v1/companies/{id}/history?field= |
Claims timeline: every value each source asserted, with observed_at, valid_from, valid_to, current |
GET /v1/companies/{id}/logo |
The logo shown on the company's own website, stored by Cormorant: the image bytes with their own Content-Type (SVG, PNG, JPEG, WebP, GIF), ETag, X-Logo-Terms: display_only; 404 logo_not_found when none is stored. The record (GET /v1/companies/{id}) describes it as web.logo: url, sha256, format, bytes, source (company website), source_url, retrieved_at, terms (display_only: may be shown next to the company's name to identify it, in reports too; the logo is the company's trademark and no licence is granted), terms_note, terms_url. Logos are read for the largest companies by market capitalisation first and re-read every 90 days. |
GET /v1/companies/{id}/group?depth=3 |
The company's group as one tree: from its top parent in the register (top, path down to the record) to its subsidiaries, depth 1–6 levels, at most 500 nodes (truncated). Nodes {id, name, country, status, identifiers, relation, share_pct, children}; relation is direct_parent (the company names the parent) or subsidiary (the parent lists it); named companies not in the register have id: null. include=investees adds investees: the record's holdings below control (associate, joint_venture, investee) with company, share_pct, previous_share_pct, since, until, asset, operator, carrying_value, source_filing (SEC filers: the equity-method investees tagged in the latest 10-K or 10-Q; since is the period end of the first report showing the current share) |
GET /v1/companies/{id}/{events,people,ownership,relationships,filings,financials,sources} |
Sub-resources with paging (limit, cursor); events?type=enforcement,litigation&from=2016-01-01 lists official cases (enforcement: a regulator's action, from US EPA ECHO and SEC litigation releases; litigation: a court case, from US federal dockets) with authority, case_id, jurisdiction, status (open, settled, closed, dismissed, appealed), role (defendant, respondent, plaintiff, potentially_responsible_party), topic, amount, currency, filed_date, resolved_date, milestones (each event and date; source: company_filing for a step the company states in its own 10-K or 10-Q, with source_filing), company_disclosure on US EPA Superfund cases of US filers (site, statements with kind notice, settlement_signed, escrow_deposit, payment or court_approval, date, the text quoted and its source_filing, form, filed; company_share, the company's own share of the settlement in USD when stated exactly) and match (how the case was linked: identifier, the company's own name or a subsidiary_name, with the party as the source writes it; never by keyword); such a listing adds coverage, each case source's state for the company (checked with checked_at, error, pending, not_applicable, off), so an empty list counts as "no case" only for sources checked; relationships?type=associate,joint_venture,investee lists holdings below control (US filers: equity-method investees tagged in 10-K/10-Q XBRL; EU-listed issuers: associates and joint ventures named in the notes of the ESEF annual report; investee when the source does not say which), with share_pct, previous_share_pct and since when the share changed in the reports read, and source_filing; they are left out of relationships unless asked for; people lists current officers once per person and role (sources and name spellings merged; entries with a past until only with include_former); `financials?period=annual |
GET /v1/companies/{id}/filings/{doc_id}?format=pdf|xbrl|csv|english|text|facts |
One document of such a filing: body_url links the file (xbrl, csv, english: zip) or the extracted text, fetched from the source once and kept; text returns the filing body's text inline, facts the XBRL instance's facts (concept, context, period_start, period_end, instant, dimensions, unit, decimals, value). 404 filing_not_found for a document that is not the company's |
GET /v1/companies/{id}/corroboration |
Revenue, net income, total assets, equity, shares outstanding and market capitalisation of the latest fiscal year, each next to the same figure from a source independent of market data (second: value, source, period_end, currency, document_url): other sources' accounts in the record (ESEF reports, registers), SEC EDGAR XBRL facts (US filers), the latest EDINET annual securities report (Japan). Market capitalisation is derived:<source>: that source's shares outstanding times the market price. difference_pct compares the two when they share a currency; a figure without a second value has note: "no independent source". The ESEF annual report of the same fiscal year is read directly (by LEI) when the record has none in its accounts. sources_checked lists the sources looked at (an inactive source is not), sources_unavailable those that could not be read now (try again later); metered as a company call |
POST /v1/companies/resolve |
{name, country, city, identifiers, isin, persist} → match (confident only; added to the register unless persist: false, so it has its cmp_ id and in_register: true) and ranked candidates |
POST /v1/companies/batch, POST /v1/companies/batch/csv |
Job of kind company: get, refresh or resolve per item; JSON or CSV in; results via GET /v1/jobs/{job_id} or GET /v1/companies/batch/{job_id}.csv |
GET /v1/companies/changes?since=&cursor=&country= |
Change feed of the register (company and changed top-level fields), oldest first |
POST/GET /v1/companies/watches, DELETE /v1/companies/watches/{id} |
Signed company.changed webhooks for a list of companies |
GET /v1/companies/sources |
Sources: countries, schemes, capabilities, precedence, licence URL, freshness classes, live health |
GET /v1/schemas/company |
JSON Schema (2020-12) of company/v1 |
Identifiers are written scheme:value and normalised (spaces, dots and
case do not matter; check digits are verified): ch_uid
(CHE-101.329.561), ch_chid, ch_ehraid, ch_bag_insurer (8: a Swiss
health insurer's BAG number), lei, us_cik, uk_crn,
de_register (München:HRB:6684), fr_siren, fr_siret, no_orgnr,
dk_cvr, fi_ytunnus, ee_regcode, cz_ico, pl_krs, be_kbo, au_abn,
au_acn, nz_nzbn, jp_corporate_number, br_cnpj, sg_uen, ca_corp,
it_cf, cn_uscc, kr_brn, tw_ban, es_cif, nl_kvk, se_orgnr, at_fn,
vat (DE129273398, CHE101329561), isin (CH0038863350: the issuer,
found through GLEIF's ISIN-to-LEI mapping; the ISIN is then kept on the
record), ticker (XNAS:AAPL), wikidata. An invalid identifier (e.g. a
wrong ISIN check digit) is 422 invalid_identifier.
Refresh on request. A request answers from the register. Each source's
data about the company is re-fetched first when it is older than the
source's freshness class for that field group (e.g. registry core 24 h,
people 7 days) or than max_age (seconds); refresh=true re-fetches
everything. The answer's refresh lists per source and group what was
refreshed, fresh, failed (error class; the register still answers),
not_found, in_progress, pending (a refresh slower than 2 s, error: "deadline", or of a source whose canaries fail, error: "canary_failed":
it finishes in the background and the next request sees its data) or
skipped (the source backs off after repeated failures, error: "backoff"). Stale sources are refreshed concurrently and the answer waits
at most about 2 s for them; batch items wait for every refresh. A company not yet in the register is looked
up in the sources that know the identifier's scheme and added; unknown
everywhere is 404 company_not_found, and remembered (ISIN 24 h, other
schemes 1 h; refresh=true asks again): within that time the sources are
not asked and refresh shows not_found with error: "cached". When a
source that could know the identifier cannot be asked right now (it backs
off, Cormorant's rate limit for it is full, it timed out or failed), the
answer is 503 source_unavailable with sources_unavailable and
Retry-After instead, and nothing is remembered: ask again later. Companies nobody asks for are never
re-scraped; official change feeds (e.g. GLEIF's daily updates) keep the ones
in the register current.
Provenance. Every value is a claim of a source; the record shows the
resolved value of each field, provenance (source, observed_at,
confirmed_at, sha256 of the raw document, conflict, confidence),
quality (completeness, conflicts where sources really disagree) and
sources[] (raw documents with body_url — downloadable with
GET /v1/bodies/{sha256} once you have received the record).
include=claims adds every current claim. Precedence when sources disagree:
market_data for every field it provides (legal name, business address,
website, listings, classification, size, activity codes, market and
financial data), then official register > official gazette > GLEIF >
regulatory filings > crosswalks (Wikidata) > other commercial sources, then
each field's declared rule. The other sources supply what market_data
does not (LEI and register identifiers, legal form, status, registered
address, jurisdiction, dates); its address is the business address
(type: business) beside the registered one, and its country never sets
jurisdiction. When a record holds several active CIKs, ISINs or tickers,
the one market_data reports is identifiers[].primary.
When no register, GLEIF or filing states the country of jurisdiction, it is
derived from the domicile of the company's own ISINs (never from depositary
receipts or XS/EU prefixes), also in place of a crosswalk's country
(Wikidata's is where a company operates, not where it is incorporated; its
value stays in quality.conflicts): provenance.jurisdiction.source is
derived:isin, with confidence 0.5 and derived_from (the ISINs). Changes
of derived values alone are not in the change feed. A record holding several
LEIs uses GLEIF's data of its primary LEI (identifiers[].primary) only.
names.display is the legal name in readable case (names.legal stays the
authoritative form, e.g. GLEIF's capitals). Conflicts ignore differences of
case, punctuation, legal-form spelling, address spelling and URL form; two
sources' descriptions (summary, purpose) never conflict.
One field is an exception to market_data's precedence: summary is
Wikipedia's lead (with its url and licence, CC BY-SA 4.0) when there is
one, else the market data description with its terms in licence; the
market data description is also its own field, description (text,
lang, source, terms_url; additive). dates.incorporated is the
incorporation of the current legal entity as registers and GLEIF state it
(a re-incorporation is this date); dates.founded (additive) is when the
business was founded (Wikidata's inception) — UPS: incorporated 1999-07-15,
founded 1907-08-28 — and the two are never a conflict. A listed company no
register or GLEIF states a status of has status.value active while its
listing trades (provenance.status.source derived:listing, confidence
0.4, derived_from the listing); a delisted company is left without a
status (never inferred dissolved).
Outdated names and tickers. market_data can lag a rename or a ticker
change. When registers or GLEIF and Wikidata agree on a newer legal name
(or SEC EDGAR's name of the company's CIK differs and another source agrees,
or the company files with the SEC), or another source lists the ticker as
replaced, the record keeps market_data's value and lists it in
quality.stale_suspect (additive): [{field: names.legal | securities.ticker, finding: stale_name | stale_ticker, value, source, observed_at, values: [{source, value, observed_at, basis}], since}].
Cormorant asks the source again within minutes and the case is reviewed;
once the source catches up, the entry disappears and the new value is a
normal change in the feed.
Market data. The market_data source (a commercial market-data
provider) covers listed companies, funds and ETFs worldwide and is asked by
ticker (XNAS:AAPL, XTKS:7203, XSWX:NESN), isin or us_cik, and by
name (listings on the exchanges of the requested country). It is the
register's main authority: its values win every field it provides, while
registers, GLEIF and filings fill the fields it does not (see Provenance).
It adds these optional blocks to company/v1
(all additive):
classification(always in the record):kind(company,fund,etf,adr,spac,unit,warrant,preferred,other), theis_fund,is_etf,is_adr,is_spacflags,actively_trading,sector,industry— tells investment vehicles from operating companies.market(include=market; refreshed daily): price, change, volume, market capitalisation (market_cap, inmarket_cap_currency: the major unit ofcurrency,GBPfor aGBpline), beta, 52-week range, shares outstanding and the float, last dividend, IPO date,history(weekly{date, close, market_cap}, about two years),peers,scores(Altman Z, Piotroski).financialsitems (include=financials; weekly) gainperiod_type(annual/quarter, periods2024and2025-Q3),period_end,fiscal_year,fiscal_period,filed_at, headline figures (gross profit, operating income, EBITDA, EPS, liabilities, cash, debt, net debt, operating cash flow and FCF, capital expenditure, dividends, shares),statements(every line item of the income statement, balance sheet and cash flow, standardised and as reported) andmetrics(key metrics, ratios, growth, enterprise value, owner earnings);segments(revenue by product and by region per period) comes withinclude=financials.ownershipitems (include=ownership; quarterly) can carryholder_kind(institution,fund,insider),shares,value,as_of(the largest holders, capped);ownership_summary: institutional (13F) holders and ownership share, insider transactions of the latest quarter, fund holders.compensation(include=people): executive pay per year from proxy statements; executives also appear inpeople.estimates(include=estimates; daily): analyst consensus per fiscal year, price-target range and consensus, grade counts, rating and the latest grade changes.esg(include=esg; monthly): environmental, social, governance and total scores with their history, ESG risk rating and industry rank.indices(include=indices): index memberships (memberships[], withsource,as_ofandweight_pctwhere the list states it) andcoverage[]: every index reported on,checkedorunavailable(companies model).classification.gics: GICS from a source that publishes it, elsenull; never mapped fromclassification.sector/industry.- Events:
dividend,split,earnings(reported, and the next date),ipo,press_release,news(headlines withurl, capped); filings: SEC filings of the last two years;web.phone;size.history(employee counts);securitiesitems gaincusip,exchange,currency,security_typeandname(the listing's own name, e.g.WeRide Inc. Class A;names.legalis the company's name without the designation).
Values of this source carry market_data as their source; links to the
provider's own site are left out (url: null), the exact bytes stay
downloadable through body_url.
Wikidata and Wikipedia. The wikidata source finds a company by its
Wikidata id (wikidata:Q312), LEI or ISIN, and by name. It contributes
identifiers (Wikidata id, LEI, ISINs, CIK, UK company number, Swiss UID,
Japanese corporate number, SIREN), the official or common name and other
languages, country, headquarters city, inception (when known to the day;
dates.founded), dissolution, official website and listings (securities: ticker and
exchange MIC). With a Wikipedia article, summary holds its lead (text,
lang, url, licence: Wikipedia text is CC BY-SA 4.0, so credit the
article when you show it). Wikidata is community-edited: it fills gaps and
confirms, and loses every conflict with a register or GLEIF. Listings are
ordered with the home exchange first (the company's country), then major
exchanges; a company Wikidata gives several countries gets its
headquarters' country (or the ISIN's). A company batch warms the ISIN
lookups in bulk (one query per 100 ISINs). A CIK Wikidata reports for an
ISIN's company resolves GET /v1/sec/companies/resolve?isin= directly. names.legal is the national register's primary
entry and does not depend on refresh order (CH: zefix_rest >
lindas_zefix > uid_register > ch_cantonal_excerpt > sogc > gleif);
other sources' forms are in names.alternates ({name, source}), language
versions in names.translations (with source). A merged
record's cmp_ id keeps working and answers with the surviving record and
redirected_from.
curl -s "https://api.cormorant.ch/v1/companies/ch_uid:CHE-101.329.561?include=ownership" \
-H "Authorization: Bearer $CORMORANT_API_KEY"
{
"schema_version": "company/v1",
"id": "cmp_01JA2B3C4D5E6F7G8H9J0KMNPQ",
"identifiers": [{"scheme": "ch_uid", "value": "CHE-101.329.561", "issuer": "Federal Statistical Office (BFS)", "status": "active", "parts": null, "sources": ["gleif"], "primary": false},
{"scheme": "lei", "value": "BFM8T61CT2L1QCEMIK50", "issuer": "GLEIF", "status": "active", "parts": null, "sources": ["gleif"], "primary": true}],
"names": {"legal": "UBS AG", "display": "UBS AG", "previous": [{"name": "SBC AG", "lang": "en"}], "trading": [], "translations": [], "alternates": []},
"legal_form": {"local_code": "AG", "local_name": "Company limited by shares", "elf_code": "MVII", "category": "corporation"},
"status": {"value": "active", "local_value": "ACTIVE"},
"jurisdiction": {"country": "CH", "subdivision": null, "register": {"authority": "RA000549", "court": null, "entity_id": "CHE-101.329.561", "last_change": "2026-03-17"}},
"addresses": [{"type": "registered", "lines": ["Bahnhofstrasse 45"], "street": "Bahnhofstrasse 45", "house_number": null, "postal_code": "8001", "city": "Zurich", "region": "CH-ZH", "country": "CH"}],
"dates": {"incorporated": "1978-02-28", "founded": null, "registered": null, "deregistered": null, "fiscal_year_end": null},
"ownership": [{"type": "direct_parent", "holder": {"name": "UBS Group AG", "identifiers": [{"scheme": "lei", "value": "549300SZJ9VS8SGXAN81"}], "country": "CH"}, "source": "gleif"}],
"provenance": {"names.legal": {"source": "gleif", "observed_at": "2026-10-19T08:00:00+00:00", "confirmed_at": "2026-10-19T08:00:00+00:00", "sha256": "9f86…", "conflict": false, "confidence": 1.0}},
"sources": [{"source": "gleif", "url": "https://api.gleif.org/…/BFM8T61CT2L1QCEMIK50", "retrieved_at": "2026-10-19T08:00:00+00:00", "sha256": "9f86…", "body_url": "/v1/bodies/9f86…", "content_type": "application/vnd.api+json", "licence": "https://www.gleif.org/en/meta/lei-data-terms-of-use", "parser_version": "gleif/1"}],
"quality": {"completeness": 0.778, "conflicts": []},
"refresh": [{"source": "gleif", "group": "core", "status": "fresh"}, {"source": "gleif", "group": "ownership", "status": "refreshed", "at": "2026-10-19T08:00:01+00:00"}],
"redirected_from": null,
"updated_at": "2026-10-19T08:00:01+00:00"
}
Latency. A company in the register is answered from it: resolve
with a confident register match and search with a near-exact register hit
ask no source. Otherwise the live sources are asked concurrently and waited
for at most 2.5 s (batch resolve items: 12 s); slower sources finish in
the background, sources backing off after repeated failures or with failing
canaries are not asked. live_sources (search and resolve) reports each
source as ok, failed (error: error class), timeout or skipped
(error: backoff or canary_failed) with ms. A newly stored resolve
match gets the other sources' data in the background.
Batch. POST /v1/companies/batch takes {action, items: [{ref} | {name, country, city, identifiers, isin}], include, max_age, persist, idempotency_key, callback_url}; POST /v1/companies/batch/csv takes a CSV body (header
ref,name,country,city,isin,identifiers or any subset, identifiers
separated by ;) with the same options as query parameters. An item with an
invalid ISIN fails alone (invalid_identifier). Item results: {company_id, record} for
get/refresh (the record as above), {match, candidates, company_id} for
resolve, or {error} (company_not_found, invalid_identifier,
source_unavailable). An item whose sources cannot be asked right now is
not finished as a miss: it waits and is tried again (for up to about an
hour); only if they stay unavailable does it fail with source_unavailable
and sources_unavailable (never cached, safe to resubmit). resolve
answers carry sources_unavailable as well: with match: null and a
non-empty list the company is not known to be missing, it just could not be
checked.
Change feed and watches. GET /v1/companies/changes returns {items: [{seq, company_id, kind: created|updated|merged|split, fields, country, changed_at}], next_cursor}; start with since (ISO 8601) and continue with
cursor. POST /v1/companies/watches with {companies: [ids or scheme:value], url} (HTTPS, public address) returns the watch with its
secret once (at most 20 watches per project, 1000 companies each). Changes
of watched companies are POSTed every minute as {event: "company.changed", id, watch_id, changes} with X-Cormorant-Event, X-Cormorant-Delivery and
X-Cormorant-Signature: t=<unix>,v1=<hex> (HMAC-SHA256 of "<t>.<raw body>", as for usage alerts). Any 2xx is delivered; otherwise retried after
1, 5, 15, 60 and 180 minutes, then hourly, without skipping changes. A
watched record merged into another is followed. Optional filters: kinds
(some of created, updated, merged, split) and fields (top-level
record fields, e.g. ["status", "sanctions"]: only updates changing one of
them; created, merged and split changes are delivered whatever the
fields). Unknown values are 422 invalid_kinds / 422 invalid_fields.
Errors: 404 company_not_found, 503 source_unavailable (try again
later), 422 invalid_identifier,
422 invalid_parameter (e.g. unknown include), 422 invalid_item (batch);
otherwise as for every endpoint (401, 403, 429).
Market data#
Guide: Market data. Companies by the usual refs;
errors as for company data (404 company_not_found or listing_not_found,
422, 503 source_unavailable with Retry-After). Metered as company
(endpoint:prices, market_cap, prices_batch, dividends, splits,
corporate_actions_batch, quotes, fx, fx_history, screener,
movers, enterprise_values, metrics, price_change, shares,
listing, listings_resolve). POST /v1/quotes and POST /v1/listings/resolve are metered per item that needed the market-data
source (one company request each, under the request's id; an item asked
twice counts once); a batch answered wholly from Cormorant's caches is one
company_cached request. Every other route is one request per call.
Every listing-level answer (enterprise values, metrics, price change,
shares, listing) carries its lineage: source, retrieved_at (when the
source's answer was retrieved) and sha256 (of its exact bytes, when
Cormorant keeps them; null otherwise), with documents[] (dataset,
retrieved_at, sha256) listing every source answer used. listing
(mic, ticker, exchange, currency, isin) is the listing the
figures are of: the primary one, the one listing=MIC:SYMBOL names, the
ticker a ticker: ref names, or the security an isin: ref names (an ADR
or secondary line answers with its own listing). Currencies are as the
source states them (GBp stays pence). Ratios are fractions (0.031 is
3.1 %); price changes and free_float_pct are percent.
Market capitalisation currency#
Prices are quoted in the listing's currency as the source states it, which
can be a minor unit (GBp/GBX pence in London, ZAc cents in
Johannesburg, ILA agorot in Tel Aviv); market capitalisations are in the
major unit. Every answer with a market_cap therefore states
market_cap_currency (ISO 4217 major unit: GBp/GBX → GBP, ZAc →
ZAR, ILA → ILS, any other currency as is): GET /v1/companies/{ref}/listing, POST /v1/quotes (and the movers' quotes),
the record's market block (GET /v1/companies/{ref}), GET /v1/companies/{ref}/market-cap and the screener's rows. In enterprise
values and metrics the market capitalisation is the source's, in the
issuer's reporting currency: their market_cap_currency equals their
currency. currency itself is unchanged everywhere.
GET /v1/companies/{ref}/prices#
Query: from, to (days; default the year up to today), interval
(1d, 1w, 1mo), listing (MIC:SYMBOL; default the primary listing),
max_age (seconds; default 12 h for the newest days). Answer: company_id,
listing (mic, ticker, exchange, currency, isin), interval,
from, to, source, as_of, first_available, traded_value_30d
(sessions, avg_volume, avg_traded_value, through), items[]
(date, open, high, low, close, adjusted_close, volume),
billing. listing is the listing that answers: a ticker: ref on a venue
the company does not trade on (ticker:XNYS:MSFT) answers its real listing
(XNAS:MSFT); listing= names another listing of the company.
GET /v1/companies/{ref}/market-cap#
Query: from, to, listing, max_age. Answer: company_id, listing,
from, to, source, as_of, first_available, market_cap_currency,
items[] (date, market_cap), billing. market_cap_currency is the
major unit of the listing's currency, which market capitalisations are in
(see Market capitalisation currency).
POST /v1/prices/batch#
Body: refs (1–100), from, to, interval, max_age. Answer: items[]
in order, each ref plus the prices answer, or ref, error, status.
Listings already stored answer at once; each listing fetched from the
source takes about a second, many at a time (100 new listings: about
7–10 s).
GET /v1/companies/{ref}/dividends#
Query: from, to (days; default the ten years up to today), listing,
max_age (seconds; default 12 h for the source's list), refresh,
limit (1–1000, default 500), cursor. Answer: company_id, listing,
from, to, coverage (from, to), source, as_of, items[]
newest first (ex_date, record_date, pay_date, declared_date,
amount as declared, adjusted_amount for all later splits, currency,
type, type_inferred, frequency, source, url), next_cursor,
billing.
Missing is not zero: coverage is the span the source has data for the
listing (from its first trading day there when later than from). An
empty items inside it means no dividend was distributed; outside it nothing is
known; coverage: null means the source has nothing for the listing.
adjusted_amount is amount × denominator / numerator for every split
effective after the ex date (the splits route's events). The source states
no dividend type: a payment of a regular payer at least 2.5 times the
median of its neighbours is special with type_inferred: true, every
other payment regular. frequency is the source's (annual,
semi_annual, quarterly, monthly, irregular).
GET /v1/companies/{ref}/splits#
Query and paging as for dividends (max_age default 7 days). Answer as for
dividends with items[] (date = first trading day on the new basis,
numerator new shares per denominator old shares, type split or
reverse_split, source, url).
POST /v1/corporate-actions/batch#
Body: refs (1–200; MIC:SYMBOL is read as ticker:MIC:SYMBOL), types
(dividends, splits; default both), from, to, max_age, refresh.
Answer: items[] in order, each ref, company_id, listing,
coverage, dividends, splits (whole lists, the single-company item
shapes), or ref, error, status.
POST /v1/quotes#
Body: refs, listings (MIC:SYMBOL), together 1–200; max_age (seconds,
default 60). Answer: items[] in order (refs, then listings): ref,
company_id, listing, price, change, change_pct, volume, open,
day_low, day_high, previous_close, year_low, year_high,
market_cap, market_cap_currency, currency, exchange, timestamp,
delay_min, age_s, source, as_of; or error (company_not_found, listing_not_found,
quote_not_found, invalid_identifier). A listing is read in the
register's spelling (XCSE:NOVO-B is XCSE:NOVO.B) and linked to its
company like a ref; a US listing names the venue it trades on.
A listing in listings may be named by a segment MIC of its exchange
(MTAA:ENI is XMIL:ENI, AIMX is XLON, ALXP is XPAR, First North
FNSE/FNDK/FNFI/FNIS), on the OTC markets (OTCM, PINX, OTCB,
OTCQ, EXPM) and on every venue of the market-data source; a listing not
in the register states the currency, ISIN and exchange the source gives
for it.
GET /v1/companies/{ref}/enterprise-values#
Query: period (annual default, quarter), limit (1–40, default 10),
listing. Answer: lineage, period, currency (the issuer's reporting
currency, which the figures are in: not the trading currency of the
listing, so an ADR's are its issuer's; null when the source states
none), items[]
newest first (period 2024 or 2024-Q3, period_type, fiscal_year,
fiscal_period, date = period end, stock_price, number_of_shares,
market_cap, cash_and_equivalents subtracted, total_debt added,
enterprise_value, currency, market_cap_currency), billing. An
empty items means the source has none for the listing. Here
market_cap_currency equals currency: the source's enterprise values,
market capitalisation included, are in the issuer's reporting currency. An
ADR's answer adds issuer (see …/listing).
GET /v1/companies/{ref}/metrics#
Query: period (ttm default: the trailing twelve months at today's
price, one item; annual, quarter), limit (1–40, default 10),
listing. Answer: lineage (documents: key_metrics, ratios),
period, currency (of the amounts: the issuer's reporting currency, as
for enterprise values), as_of (for ttm: when retrieved), items[]
(period, period_type, fiscal_year, fiscal_period, date,
currency, pe_ratio, ev_to_ebitda, price_to_book, price_to_sales,
dividend_yield, payout_ratio, return_on_equity,
return_on_invested_capital, net_debt_to_ebitda, earnings_yield,
free_cash_flow_yield, market_cap, enterprise_value, and every figure
of the source in key_metrics and ratios, snake_case,
market_cap_currency: equal to currency, the reporting currency, as for
enterprise values), billing. An ADR's answer adds issuer.
GET /v1/companies/{ref}/price-change#
Query: listing. Answer: lineage, currency, as_of, changes (percent:
1d, 5d, 1m, 3m, 6m, ytd, 1y, 3y, 5y, 10y, max; null
where the listing is younger), billing. Refreshed every 15 minutes. 404
data_not_found when the source has no figures for the listing.
GET /v1/companies/{ref}/shares#
Query: listing. Answer: lineage, as_of (the date the source states for
the figures), shares_outstanding, float_shares, free_float_pct,
billing. 404 data_not_found as above.
GET /v1/companies/{ref}/listing#
Query: listing. The listing a ref names with its own data: an isin: of
an ADR or secondary line (isin:US6410694060, Nestlé's ADR) answers with
that security's listing, not the primary one. Answer: lineage (profile,
shares_float), name, primary, security_type (equity, adr,
etf, fund), is_adr, adr_ratio (null: no source states it yet),
adr_ratio_implied, adr_ratio_source, currency (the trading currency
as quoted, e.g. GBp), market_cap, market_cap_currency (its major
unit, e.g. GBP), shares_outstanding, float_shares,
free_float_pct, shares_as_of, is_actively_trading, as_of,
issuer (depositary lines only), billing. Quotes, prices, dividends,
splits, enterprise values, price change and shares asked by the same ref
answer for the same listing. GET /v1/companies/isin:<ADR ISIN>/financials
answers with the issuer's statements (issuer_company_id) when the ADR's
own record has none, and adds issuer.
adr_ratio_implied (number or null): underlying shares per receipt,
implied from the two lines' prices: the ADR's price / (the issuer's home
price × the latest ECB cross rate), rounded to the nearest ratio that
depositary programmes use (1/100 … 100) and null unless the price ratio
is within 6% of one. adr_ratio_source is "implied" when it is set,
else null. adr_ratio stays null until a source states the ratio.
issuer (object, only on an answer that serves an issuer's data for a
depositary line: an ADR, GDR or CDR asked by its ISIN, or a depositary
record): company_id, name (legal name), listing (MIC:SYMBOL of the
issuer's primary listing), isin (of that listing), match (method:
register_link when the register holds the receipt in the issuer's own
record or an operator linked it, isin_group when the source lists the
issuer's home line under the receipt's ISIN, name_search when found by
name; score: the name similarity 0–1 of a name_search, else null),
matched_at (when the link was stored; null for a link the record
itself holds). A name match needs a similarity of 0.9 or more, a listing
outside the US, the depositary's country of incorporation when its record
states one, and no second company within 0.02 of the score; otherwise no
issuer is named rather than a weaker one.
POST /v1/listings/resolve#
Body: listings (1–200): MIC:SYMBOL, ticker:MIC:SYMBOL or a US symbol
without a MIC (MSFT: looked for on XNAS, XNYS, XASE, ARCX, BATS in that
order). Share classes in any common spelling (NOVO.B, NOVO-B, NOVO B,
BRK/B); a US symbol named on another US venue answers its real one.
Answer: items[] in order, each ref, company_id, name (the
company's legal name), listing (mic, ticker, exchange, currency,
isin), primary; or ref, error (listing_not_found,
invalid_identifier, source_unavailable), status. A company not yet in
the register is added from the market-data source. GET /v1/companies/ticker:MIC:SYMBOL answers the same listing (with
primary) next to the record.
GET /v1/fx#
Query: base (default USD), symbols (comma-separated ISO 4217),
kind (intraday default, reference), max_age. Answer: base,
rates[] (symbol, rate = units per one base, date or timestamp,
source market_data or ecb, error currency_not_found).
GET /v1/fx/history#
Query: base, symbol, from, to. Answer: base, symbol, source
(ecb where both currencies have ECB reference rates, else
market_data), from, to, items[] (date, rate).
POST /v1/screener#
Listed companies of the register, rebuilt from the records every 15
minutes. Body (all optional, combined with AND): country[], kind[]
(default ["company"]; [] for every kind), sector[], industry[] (any
case), mic[], market_cap_min, market_cap_max, revenue_min,
revenue_max (in currency, default EUR, compared in euros at the ECB's
latest rates; mic takes every venue of the market-data source, a segment
MIC counting as its exchange), employees_min, employees_max, sort (-market_cap
default, market_cap, ±revenue, ±change_pct, ±volume, ±name),
limit (1–500, default 100), cursor. Answer: total, items[]
(company_id, name, country, kind, sector, industry, mic,
ticker, currency, price, change_pct, volume, market_cap,
market_cap_currency (the major unit of currency; null without a
market cap), market_cap_eur, financials_currency, revenue, revenue_eur,
net_income, employees, fiscal_period_end, as_of), next_cursor,
as_of (last rebuild), billing. Metered screener. mic and ticker are
the primary listing's. A revenue or market capitalisation no company has had
(above 2 trillion / 20 trillion euros, or revenue over 1,000 × the market
capitalisation: a unit or currency error at the source) is null in the
row and not matched by the bounds; the record keeps the source's value.
GET /v1/market/movers#
Query: kind (gainers default, losers, actives: largest traded value,
volume × price), country (ISO 3166; default all), mic (comma-separated
MICs of the primary listing, e.g. XSWX,XVTX; segment MICs count as their
exchange; default all), limit (1–100, default 20). The 500 largest listed
operating companies (of the country, on those exchanges) by market
capitalisation are quoted (quotes at most 5 minutes old) and ranked.
Answer: kind, country, mic (main MICs asked), universe (listings looked at), items[]
(company_id, name, country, listing, quote as in POST /v1/quotes), billing. Metered movers.
Service status#
Public status of the service for your monitoring, and the page at
/status. No authentication (an Authorization header is
accepted and ignored), CORS-enabled, refreshed at most every 15 s and shared
by all callers (Cache-Control: public, max-age=15, ETag /
If-None-Match → 304). Limited to 120 requests per minute per client IP
(429 with Retry-After). The status never contains host names, addresses,
instance URLs, project names, keys or internal error strings — only component
ids, statuses, reason codes and aggregate numbers.
The status endpoints answer 200 whatever the service status: the
status is in the body. Alert on the body (status is not operational), and
treat a timeout, a connection error or any other HTTP code as "Cormorant is
unreachable" — a status endpoint that answered 503 during an outage could
not be told apart from a broken proxy or network in between.
| Endpoint | Returns |
|---|---|
GET /v1/status |
overall status, every component with reasons and metrics, incidents and maintenance |
GET /v1/status/summary |
only status, description, updated_at (for uptime monitors) |
GET /v1/status/components/{id} |
one component plus the incidents and maintenance naming it (404 for an id not in this deployment) |
GET /v1/status/history?hours=24 |
worst status per 5 minutes (per hour beyond 24 h, up to 168 h) and uptime per component; overall as _overall |
{
"status": "degraded",
"description": "Degraded performance",
"updated_at": "2026-10-19T09:41:15+00:00",
"window_s": 600,
"components": [
{"id": "api", "name": "API", "description": "…", "status": "operational", "reasons": [], "metrics": {}, "group": null},
{"id": "fetch", "name": "Fetch", "description": "…", "status": "degraded", "reasons": ["low_success_rate"], "metrics": {}, "group": null},
{"id": "company_gleif", "name": "Company data: GLEIF", "description": "…", "status": "operational", "reasons": [], "metrics": {}, "group": "company_data"}
],
"incidents": [
{"id": "inc_3f9a1c0b7e", "title": "Elevated fetch failures", "status": "identified",
"impact": "degraded", "components": ["fetch"], "created_at": "…", "updated_at": "…",
"resolved_at": null, "updates": [{"at": "…", "status": "identified", "message": "…"}]}
],
"maintenance": []
}
Statuses, best to worst: operational, maintenance, degraded,
partial_outage, major_outage. The overall status is the worst component
status, except that a major outage of a component other than api,
search, fetch or storage counts as a partial outage, and it is
maintenance when the only components not operational are under announced
maintenance. An unresolved incident shows its components at least at its
impact. Components not part of the deployment are not listed (archive
when archived copies are disabled, premium_routes when no premium route is
configured, sec while no SEC identity is configured, company_profiles while no
premium route is configured, translation while machine translation is not
configured) — do not alert on a missing component.
Counts and rates cover the last window_s = 600 s. A component with fewer
than its minimum sample there (20 uncached requests; 10 attempts for a tier)
reports requests/attempts, failures and success_rate over the last
hour instead; metrics.window_s (<tier>_window_s in premium_routes) says
which window was used, and the status is judged on that window. null rates
mean even the hour has too few samples.
| Component | Metrics (rates 0–1; failures and window_s with every rate) |
Not operational when |
|---|---|---|
api |
— | database or cache unreachable (major) |
search |
success_rate, requests, engines_healthy_share, engines, instances_healthy_share, fallback_available, fallback_share, fallback_success_rate, workers_alive, queue_lag_s |
success rate of uncached searches < 0.95 / 0.80 / 0.50 (degraded / partial / major; a search stopped by its own project's monthly budget, budget_exhausted, is not counted); healthy search instances < 50 % (degraded) or none (partial with the fallback search service, major without); healthy engines < 34 % (degraded); no worker; queue lag. engines_healthy_share: share of search engines (per instance) whose latest answer in the last 15 minutes returned results (the instance share until searches were observed); engines: [{engine, status}] with ok (healthy everywhere), degraded (on some instances) or down (rate limited, CAPTCHA or suspended everywhere) |
fetch |
success_rate, uncached_success_rate, requests, cached, latency_p95_ms, workers_alive, sync_queue_backlog, sync_queue_lag_s, batch_queue_backlog |
success rate of fetches, cache hits included, < 0.85 / 0.60 / 0.30, or of uncached fetches alone < 0.30 (degraded) (4xx answers of the site, robots.txt, invalid or blocked URLs, too large, PDF not accepted, deferred, and fetches whose premium route its own project's monthly budget refused (budget_exhausted) are not failures); p95 > 60 s over the last 600 s (degraded, high_latency; fetches that reached a premium route are left out of the p95, their ladders run up to minutes by design; the hour's p95, reported under moderate load, does not change the status); no worker (major); queue lag |
browser_rendering |
success_rate, attempts, workers_alive, sync_queue_backlog, sync_queue_lag_s, batch_queue_backlog |
browser attempts failing for infrastructure reasons: success < 0.80 / 0.50 / 0.10; no browser worker (major) |
archive |
success_rate, attempts |
archive unreachable or erroring: success < 0.80 / 0.50 / 0.10 |
premium_routes |
proxy_success_rate, proxy_attempts, proxy_browser_success_rate, proxy_browser_attempts, rendering_success_rate, rendering_attempts, unblocker_success_rate, unblocker_attempts (configured routes only); degraded_routes: the routes behind tier_errors (proxy, proxy_browser, proxy_render, unblocker), worst first |
provider errors: success < 0.80 / 0.50 / 0.10 |
sec |
success_rate, requests, throttle_wait_p95_ms (p95 wait for a slot in the cluster-wide SEC rate limiter), backoff_active, rate_limit_rps |
SEC backing off after 403/429/503 (degraded, sec_backoff); success rate of uncached SEC requests < 0.85 / 0.60 / 0.30 (4xx, invalid identifiers and not found are not failures); p95 wait > 5 s (degraded, throttled) |
providers |
— | an outside service Cormorant relies on (search fallback, premium routes, alternative sources, notifications) currently refuses our access (degraded, provider_access); which one is not shown — the operator is alerted |
company_profiles |
success_rate, requests, latency_p95_ms (uncached extended company profile operations), cache_hit_rate, refused_share (operations the source refused: blocked, rate_limited), rendering_share (share served by the rendering service rather than the residential proxy), throttle_wait_p95_ms (p95 wait for a slot in the shared rate limit), backoff_active, proxy_skipped (the residential proxy is being skipped after a recent refusal); always over the last 600 s |
success rate of uncached operations < 0.85 / 0.60 / 0.30 (not found, invalid identifiers, robots.txt, premium routes not allowed and exhausted budgets are not failures; null below 10); refused share ≥ 0.20 (degraded, upstream_refusing); the site throttle backing off after 429 (degraded, site_backoff); p95 wait > 10 s (degraded, throttled) |
translation |
success_rate, calls, failures (calls to the translation service over the last hour; null rate below 10 calls), window_s (3600), last_refusal_at (when the translation service last refused Cormorant's access, within the last 15 minutes) |
every POST /v1/translate would answer 503 translation_unavailable (major), with the same reason: provider_auth or provider_credits (the translation service refuses Cormorant's access or account), budget_daily or budget_monthly (Cormorant's translation spend cap is reached), disabled; success rate of the last hour's calls < 0.50 / 0.20 (partial / major, low_success_rate; a call retried after a malformed answer is a normal failure, so smaller dips do not count) |
batch_jobs |
scheduler_last_run_s, workers_alive, running_jobs, oldest_waiting_job_s, queue_backlog |
scheduler last ran > 30 s (degraded) / > 120 s ago (partial); no batch worker (major); a job waiting to start > 15 min (degraded) / > 60 min (partial) |
storage |
database_ok, cache_ok, object_storage_ok (null: not configured) |
database or cache unreachable (major); object storage unreachable on two checks in a row (degraded) |
company_<source> (group company_data, one per active company data source, e.g. company_gleif) |
success_rate, requests (last hour of calls to the source; null below 10), latency_p95_ms, parse_failure_rate, canary_ok, backoff_active, schema_drift (fields that used to be filled and now come back empty), change_feed_lag_s; the market-data source (company_market_data) also reachable (a success in the last hour; false after errors only, null without calls), last_success_at, plan, quota (calls_today, calls_month, monthly_budget, budget_used, rate_limit_per_min, peak_minute_calls of the last hour, rate_used) and last_error (kind, at; never the message) |
success < 0.85 / 0.50 / 0.20; canaries (known companies checked every 15 minutes) failing (partial); backoff after repeated failures, schema drift, parse failures > 10 % (degraded); fewer than 10 calls in the hour, none successful and at least two failed by the source (partial) or one (degraded) (recent_failures; our own rate limit, backoff and "not found" answers are not failures). parse_failure_rate counts answers that could not be read as well as mappings that failed. Counts at most as degraded for the overall status |
Queue lag (queue_lag_s, sync_queue_lag_s: how long the oldest synchronous
request has waited for a worker) above 15 / 60 / 120 s is degraded / partial
/ major. Rates computed on fewer than 20 requests (10 tier attempts) are
reported but do not change a status. New metric keys may be added.
Reason codes: no_workers, queue_lag, low_success_rate,
high_latency, engines_reduced, engines_unavailable, tier_errors,
scheduler_stalled, jobs_waiting, database_unreachable,
cache_unreachable, object_storage_unreachable, sec_backoff,
throttled, provider_access, upstream_refusing, site_backoff, incident, maintenance; company data sources also canary_failed, source_backoff,
schema_drift, parse_failures (more than 10 % of at least 10 calls in the
hour, and at least 3 of them), recent_failures, rate_limited (the source
answered 429 with a wait of a minute or more: no calls until then).
Incidents and maintenance are posted by the operator. incidents lists
unresolved incidents (investigating, identified, monitoring) and those
resolved within 7 days, newest first, each with its timeline (updates,
newest first). maintenance lists scheduled and in_progress windows and
those completed within 7 days, soonest first; an empty components list
means the whole service.
History: GET /v1/status/history returns, per component, statuses
(oldest first; null where nothing was recorded) and uptime over the
period, where a partial_outage bucket counts as 30 % downtime and a
major_outage bucket as 100 %. Kept 7 days.
Health and metrics#
GET /health→200 {"status":"ok"}(process is up). For monitoring the service as a whole useGET /v1/status.GET /ready→200when PostgreSQL and Redis accept a write and at least one SearXNG instance is registered, else503; body lists the checks, never secrets.GET /metrics→ Prometheus text (private network only): requests by kind, provider and outcome, cost, bytes, premium bytes, search fallbacks, latency histogram, queue lengths, SearXNG instance count — aggregated across all hosts.
Examples#
export CORMORANT_URL=https://api.cormorant.ch CORMORANT_API_KEY=cmr_...
curl -s "$CORMORANT_URL/v1/search" -H "Authorization: Bearer $CORMORANT_API_KEY" \
-H 'Content-Type: application/json' -d '{"query":"Holcim annual report 2025","country":"CH"}'
curl -s "$CORMORANT_URL/v1/fetch" -H "Authorization: Bearer $CORMORANT_API_KEY" \
-H 'Content-Type: application/json' -d '{"url":"https://www.holcim.com/investors"}'
curl -s "$CORMORANT_URL/v1/batch/fetch" -H "Authorization: Bearer $CORMORANT_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"idempotency_key":"demo-1","items":[{"url":"https://example.com"},{"url":"https://example.org"}]}'
import httpx
client = httpx.Client(
base_url=CORMORANT_URL, headers={"Authorization": f"Bearer {KEY}"}, timeout=180
)
page = client.post("/v1/fetch", json={"url": "https://www.holcim.com/investors"}).json()
if page["error"] is None:
text = page["text"]
Sync calls wait up to 150 s for the result (then 504 with the request id);
use the batch endpoints for bulk work.