API documentation

Check every new customer automatically.

Score any UK company from your own systems: search, the verdict as one object, or the whole report. The API is included in the Enterprise plan.

Basics

Base URL

https://trustfox.co.uk/api/v1

Authentication

Create a key on your account page and send it as a bearer token on every request. It is shown once, when you create it, so keep it somewhere safe. You can replace it at any time, and the old key stops working straight away. Keys start with tf_live_. Keep them server-side; never put one in a browser or a mobile app.

Authorization: Bearer tf_live_…

Checks and limits

Versioning and data

The version is in the path. Fields may be added without notice; nothing is removed or renamed without a new version. Responses contain public sector information licensed under the Open Government Licence v3.0 and are for trade credit decisions only. A view on trade credit, from public records. Not a credit rating, not a credit reference on any individual, and not investment, financial or legal advice.

Search

GET https://trustfox.co.uk/api/v1/companies/search?q=sample+construction

Pass a registered name or a company number of two or more characters. The best 20 matches are returned; total is the full match count on the register. This response shows the fictional example company.

{
  "query": "sample construction",
  "total": 1,
  "items": [
    {
      "companyNumber": "EX000001",
      "name": "SAMPLE CONSTRUCTION LIMITED",
      "status": "active",
      "statusLabel": "Active",
      "type": "ltd",
      "typeLabel": "Private limited company",
      "incorporatedOn": "2014-03-12",
      "address": "Unit 4, Example Business Park, Leeds, LS99 9EX"
    }
  ]
}

Score

GET https://trustfox.co.uk/api/v1/companies/{number}/score?fresh=1

The verdict in one object: score, band, stance, indicative limit and every signal that fired. This response is for the fictional example company; a real company number returns the same shape.

{
  "companyNumber": "EX000001",
  "companyName": "SAMPLE CONSTRUCTION LIMITED",
  "status": "active",
  "statusLabel": "Active",
  "incorporatedOn": "2014-03-12",
  "score": 15,
  "band": "E",
  "riskLabel": "Very high risk",
  "riskLevel": "High",
  "stance": "On this record, credit is not recommended.",
  "confidence": "high",
  "indicativeCreditLimit": 0,
  "signals": [
    {
      "id": "financials-negative-net-assets",
      "category": "financials",
      "severity": "high",
      "points": -25,
      "title": "Negative net assets of -£78,300"
    },
    {
      "id": "financials-liquidity-weak",
      "category": "financials",
      "severity": "high",
      "points": -15,
      "title": "Weak liquidity (current ratio 0.46)"
    },
    {
      "id": "financials-insolvent-and-illiquid",
      "category": "financials",
      "severity": "high",
      "points": -10,
      "title": "Balance-sheet insolvent with no liquidity cushion"
    },
    {
      "id": "directors-idv-missing",
      "category": "transparency",
      "severity": "medium",
      "points": -8,
      "title": "No director has verified their identity"
    },
    {
      "id": "filings-late-accounts",
      "category": "filings",
      "severity": "medium",
      "points": -6,
      "title": "Accounts filed late 1 time in the last five years"
    },
    {
      "id": "financials-loss-making",
      "category": "financials",
      "severity": "medium",
      "points": -6,
      "title": "Loss of £34,900 in the latest period"
    },
    {
      "id": "sector-high-risk",
      "category": "sector",
      "severity": "low",
      "points": -5,
      "title": "Higher-risk sector: Other building completion and finishing"
    },
    {
      "id": "financials-low-cash",
      "category": "financials",
      "severity": "low",
      "points": -4,
      "title": "Low cash relative to short-term creditors"
    },
    {
      "id": "directors-single",
      "category": "directors",
      "severity": "low",
      "points": -4,
      "title": "Single director, no other officers"
    },
    {
      "id": "directors-insolvent-minor-SAMPLE, Alex",
      "category": "directors",
      "severity": "low",
      "points": -4,
      "title": "Alex Sample has 1 previous company that went through insolvency, among 2 appointments"
    },
    {
      "id": "charges-new-borrowing",
      "category": "charges",
      "severity": "low",
      "points": -4,
      "title": "1 new charge registered in the last 12 months"
    },
    {
      "id": "charges-outstanding",
      "category": "charges",
      "severity": "low",
      "points": -3,
      "title": "1 outstanding secured charge"
    },
    {
      "id": "age-10-plus",
      "category": "age",
      "severity": "positive",
      "points": 4,
      "title": "Established for 12 years"
    },
    {
      "id": "directors-stable",
      "category": "directors",
      "severity": "positive",
      "points": 3,
      "title": "Stable leadership (longest-serving director 12 years)"
    },
    {
      "id": "ownership-owner-managed",
      "category": "ownership",
      "severity": "positive",
      "points": 2,
      "title": "Owner-managed"
    },
    {
      "id": "status-active",
      "category": "status",
      "severity": "info",
      "points": 0,
      "title": "Active on the Companies House register"
    }
  ],
  "generatedAt": "2026-11-23T15:04:55.960Z",
  "reportId": "<report id>",
  "reportUrl": "https://trustfox.co.uk/report/<report id>",
  "notice": "A view on trade credit, from public records. Not a credit rating, not a credit reference on any individual, and not investment, financial or legal advice."
}
FieldTypeMeaning
companyNumberstringEight-character number as held by Companies House.
companyNamestringCurrent registered name.
status / statusLabelstringCompanies House status (active, dissolved, liquidation…) and its label.
incorporatedOndateISO date of incorporation.
scoreinteger0 to 100. Every company starts at 100; rules deduct, positives add back at most 10.
bandA–EA 80+, B 65+, C 50+, D 30+, E below 30.
riskLabelstringLow risk, Moderate risk, Elevated risk, High risk or Very high risk.
riskLevelLow | Medium | HighThree-level summary for simple integrations.
stancestringOne-line credit stance, e.g. “Avoid open credit; take a deposit or pro-forma payment.”
confidencehigh | medium | lowHow much of the record could be read: complete, partial or thin. It describes the evidence, not the company. A score of 20 with high confidence means the bad picture is well evidenced.
indicativeCreditLimitinteger | nullWhole pounds. 0 means the rules support no credit. null when it cannot be computed: no machine-readable accounts, or the company is not active.
signalsarrayEvery rule that fired: id, category, severity (critical, high, medium, low, info, positive), points (negative deducts) and title. The full report adds detail and evidence to each.
generatedAtdate-timeWhen the report was generated. Reports are cached for 24 hours.
reportId / reportUrlstringIdentifier and shareable link for the full report. reportId is null when no database is configured.
noticestringWhat the response is and is not: a view on trade credit, not a credit rating or advice. Show it wherever you show the score.

Full report

GET https://trustfox.co.uk/api/v1/companies/{number}?fresh=1&narrative=1

Everything on the report page as one object under report. Add narrative=1 to include the AI analyst commentary; it can add up to a minute and is null when the commentary is unavailable. The sections:

FieldTypeMeaning
companyobjectStatus, type, incorporation and cessation dates, SIC codes, registered office and its flags, previous names, accounts and confirmation statement due dates with overdue flags, charge and insolvency flags.
scoreobjectAs the score endpoint, plus confidenceReasons and, on each signal, detail and evidence.
directorsobjectactive and resigned officers (resigned in the last five years, up to 20), each with role, dates, month and year of birth, nationality, identity verification status, an appointments summary across their other companies (total, dissolved, failed, failure rate, up to 100 appointments listed) and the disqualified-register result.
ownershipobjectPersons with significant control (pscs), ceased PSCs and PSC statements, with natures of control.
financialsobject | nullThe latest machine-readable accounts: source filing, current and prior period figures (fixed and current assets, cash, debtors, stocks, creditors within and after one year, net current assets, net assets, equity, turnover, profit, employees where tagged) and ratios (current, cash, net assets change, gearing). null when the latest accounts were filed as a scanned document.
filingsobjectFiling count and status, the latest 60 filings, late accounts and late confirmation statements with days late, gazette notices, strike-off notices in the last three years, registered office changes and director churn in 24 months, last accounts and confirmation statement dates.
chargesobjectCounts of outstanding, satisfied and part-satisfied charges, charges created in the last 12 months, lenders under outstanding charges and the 12 most recent charges.
insolvencyobject | nullFormal insolvency cases with type, dated events and practitioners. null when none are recorded.
narrativeobject | nullAI analyst commentary (headline, summary, strengths, concerns, suggested terms, questions to ask) when narrative=1 was requested and the AI is available. It explains the score and never changes it.
metaobjectapiRequests, warnings, durationMs and asAt (only on dated snapshots).

Every field, with types, is in the OpenAPI 3.1 document.

Errors

Every error is JSON with a stable code to branch on and a message you can show:

{ "error": { "code": "allowance_used", "message": "Monthly allowance used (100 of 100)." } }
FieldTypeMeaning
400invalid_company_number · invalid_queryMalformed company number, or a search of fewer than two characters.
401unauthorisedMissing or unknown API key.
402allowance_usedThe plan’s monthly checks are used up. The message gives the numbers.
403plan_requiredThe key’s plan does not include the API, the account has no plan and its free period is over, or the key’s login is paused because its team has more logins than its plan allows.
404company_not_foundNo company with that number.
429rate_limitedMore than 60 requests in an hour from one IP address. Retry-After header and retryAfterSeconds in the body.
500internal_errorThe report could not be generated. Safe to retry.
502upstream_errorCompanies House returned an error. Retry shortly.
503upstream_rate_limitedThe company register is at its request limit. Retry-After header and retryAfterSeconds in the body.

Examples

curl

curl -H "Authorization: Bearer $TRUSTFOX_KEY" \
  "https://trustfox.co.uk/api/v1/companies/{number}/score"

Node

const res = await fetch("https://trustfox.co.uk/api/v1/companies/{number}/score", {
  headers: { Authorization: `Bearer ${process.env.TRUSTFOX_KEY}` },
})
if (!res.ok) {
  const { error } = await res.json()
  throw new Error(`TrustFox ${res.status} ${error.code}: ${error.message}`)
}
const { score, band, stance, indicativeCreditLimit } = await res.json()

Python

import os, requests

r = requests.get(
    "https://trustfox.co.uk/api/v1/companies/{number}/score",
    headers={"Authorization": f"Bearer {os.environ['TRUSTFOX_KEY']}"},
    timeout=30,
)
r.raise_for_status()
verdict = r.json()
print(verdict["band"], verdict["stance"])

Suggested use in onboarding

Call the score endpoint the moment a new customer gives you their company number. Bands A and B can open on standard terms, C on a set credit limit, D and E on pro-forma or a deposit. Store reportUrl against the account so the decision can be defended later, and re-check before raising a limit.