Crossfoot

The Crossfoot API.

POST a filing, get back the verdict, every diagnostic with its rule code and location, and the facts if you ask for them, as JSON. It is the same engine as the command line, with the taxonomies already fetched and parsed on the server: about a second end to end for a Companies House filing once its taxonomy is warm.

It checks XBRL 2.1, Dimensions, Inline XBRL and calculations (XBRL 2.1 or Calculations 1.1). It does not run the filing rule packs (ESEF, UK, SEC EFM) or Formula: those are Crossfoot Pro features and run on your own machine. Conversion to xBRL-JSON is not in the API yet.


Price

Without a key

£020 validations a day per IP address

Files up to 5 MB, 10 requests a minute. For trying it and for the odd file.

Try it with curl

API

£99a month, 2,000 validations included, then 5p each

Files up to 20 MB, 60 requests a minute per key. Overage is metered by Stripe and added to the next invoice. Cancel any time.

Get an API key

The key is shown once on the page after checkout. A validation that fails on our side (5xx), or a file with no XBRL in it (422), is not counted.


Endpoints

RequestWhat it does
POST /api/v1/validateValidate one file: Inline XBRL (.html, .xhtml), an XBRL instance (.xbrl, .xml) or a report package (.zip, .xbri).
GET /api/v1/usageThis billing period: included, used, overage reported to Stripe, the key's prefix.
POST /api/v1/keys/rotateA new key. The key you called with stops working at once.

Authentication

Send the key as a bearer token: Authorization: Bearer cfk_live_…. Keys are 256-bit random strings; we store a one-way hash, not the key, so a lost key is replaced, not recovered (rotate it, or use the email you paid with on the page you got the key from). Leave the header out to use the free allowance; a header with a wrong key is refused, not treated as free.

POST /api/v1/validate

Send the file as the raw request body (Content-Type: application/octet-stream, or its XHTML, XML or zip type) or as the form field file in multipart/form-data. The kind is taken from the file name and checked against the first bytes.

QueryEffect
calc=21|11|11t|offCalculation checks: XBRL 2.1 (default), Calculations 1.1 with rounding, 1.1 with truncation, or none.
facts=trueInclude every fact (concept, entity, period, dimensions, unit, value, decimals) in the canonical form the conformance judges use. Default false.
filename=…The file name, when you send a raw body (or use Content-Disposition).

verdict is valid (no errors or inconsistencies), inconsistent (calculation inconsistencies only) or invalid. A filing that breaks the rules is still a successful call: the answer is in the body, with status 200.

{
  "id": "val_3f0c9a1b7e2d4c5a6b8e",
  "file": { "name": "accounts.html", "kind": "inline", "bytes": 382190 },
  "verdict": "valid",
  "kind": "Inline",
  "counts": { "facts": 388, "errors": 0, "inconsistencies": 0, "warnings": 0, "info": 0,
              "instances": 1, "contexts": 41, "units": 3, "footnotes": 0,
              "dts_documents": 64, "concepts": 6212 },
  "diagnostics": [],
  "taxonomy": { "files_fetched": 0, "cache": "warm", "unavailable": [] },
  "timing": { "total_ms": 512, "engine_ms": 471, "fetch_ms": 0, "rounds": 1 },
  "usage": { "plan": "api", "used": 118, "included": 2000, "overage": 0,
             "period_start": "2026-12-01T10:41:07.000Z", "period_end": "2027-01-01T10:41:07.000Z" }
}

Each diagnostic:

{ "code": "xbrl.5.2.5.2:calcInconsistency", "severity": "inconsistency",
  "message": "Calculation inconsistent: ProfitLoss reported 41,200, children sum to 41,300",
  "location": { "uri": "accounts.html", "line": 812, "col": 14 } }

Severities: error, inconsistency, warning, info. Codes follow the XBRL conformance suites and Arelle (xbrl.4.9, xbrldte:…, ix11.…), so existing mappings carry over.

GET /api/v1/usage

{ "account": "acc_…", "plan": "Crossfoot API", "status": "active",
  "period": { "start": "2026-12-01T10:41:07.000Z", "end": "2027-01-01T10:41:07.000Z" },
  "included": 2000, "used": 2041, "remaining_included": 0,
  "overage": { "validations": 41, "reported_to_stripe": 41, "waiting_to_report": 0, "price_each": "£0.05" },
  "key": { "prefix": "cfk_live_8Hq2xN1", "created": "2026-12-01T10:42:00.000Z" } }

Errors

Every error is JSON: {"error": {"status", "code", "message", "docs"}}.

StatusCodesMeaning
400bad_option, empty, bad_multipart, no_fileA query option is wrong, or there is no file in the request.
401bad_key, unknown_key, revoked_key, wrong_modeThe key is missing its Bearer, unknown, replaced, from the other mode, or its subscription ended.
402payment_failed, not_renewedThe subscription is behind on payment.
405methodWrong HTTP method for the endpoint.
413too_largeThe file is over 20 MB (5 MB without a key).
415unsupported_media_type, unsupported_file, not_xbrl, not_zipNot Inline XBRL, an XBRL instance or a report package.
422not_xbrlThe engine read the file and found no XBRL in it. Not counted.
429rate_limited, free_limit, period_capToo many requests a minute, the free tier's 20 a day, or the safety cap. Retry-After says when.
502, 503, 504engine_unavailable, timeoutThe engine is starting (retry after a few seconds) or the file took over two minutes. Not counted.

Limits

File size
20 MB with a key, 5 MB without.
Rate
60 requests a minute per key; 10 a minute and 20 a day per IP address without one.
Time
Two minutes per validation. Measured on 100 Companies House filings: 0.74 s of engine time at the median (p95 1.6 s), about 1 s end to end, once the filing's taxonomy is loaded; the first filing on a taxonomy the server has not loaded yet takes 3 to 5 s while it is fetched and parsed, and the first call after a quiet spell a few seconds more while the engine starts.
Taxonomies
Fetched from the publishers on our taxonomy mirror's list (XBRL International, FRC, HMRC, IFRS, ESMA, EBA, EIOPA, EFRAG, SEC, FASB and a few national authorities). A file a filing references outside that list is reported in taxonomy.unavailable; put it in a report package to have it used.
Safety cap
200,000 validations a billing period per account, so a runaway loop cannot run up a bill. Write to us to raise it.
Your files
Processed in memory and dropped when the answer is sent. We keep a count of validations per key, not the files or their contents.

Examples

curl

curl -sS https://crossfoot.dev/api/v1/validate \
  -H "Authorization: Bearer $CROSSFOOT_API_KEY" \
  -F file=@accounts.html

# without a key (20 a day), raw body, with the facts
curl -sS "https://crossfoot.dev/api/v1/validate?facts=true&filename=accounts.html" \
  -H "Content-Type: application/octet-stream" --data-binary @accounts.html

Python

import os, requests

with open("accounts.html", "rb") as f:
    r = requests.post(
        "https://crossfoot.dev/api/v1/validate",
        params={"calc": "11"},
        headers={"Authorization": f"Bearer {os.environ['CROSSFOOT_API_KEY']}"},
        files={"file": ("accounts.html", f)},
        timeout=150,
    )
r.raise_for_status()
report = r.json()
print(report["verdict"], report["counts"]["facts"], "facts")
for d in report["diagnostics"]:
    print(d["severity"], d["code"], d["message"])

JavaScript (Node 20+)

import { readFile } from 'node:fs/promises';

const form = new FormData();
form.append('file', new Blob([await readFile('accounts.html')]), 'accounts.html');
const res = await fetch('https://crossfoot.dev/api/v1/validate?facts=true', {
  method: 'POST',
  headers: { Authorization: `Bearer ${process.env.CROSSFOOT_API_KEY}` },
  body: form,
});
const report = await res.json();
if (!res.ok) throw new Error(report.error.message);
console.log(report.verdict, report.counts, report.facts.length);

Billing questions, a higher cap or a bulk price: support@crossfoot.dev. The terms cover the API too.