Direct answer
Build an England and Wales charity lookup as a server-side registry adapter. Ask for jurisdiction first; prefer an exact registered-number lookup; preserve the registered number, group or subsidiary suffix and unique organisation number; show the recorded status and retrieval time; and require the user to confirm the selected record. Treat name results as candidates, removed records as review events and API failure as an operational state—not as evidence that an organisation is not charitable. The result proves only what the public register says. Identity, authority, bank ownership, programme eligibility and due diligence remain separate checks.
Executive summary
- The Charity Commission API is for England and Wales, not a complete UK-wide charity source.
- A registered charity number can represent linked records; preserve the suffix and unique organisation number.
- “Not found” is inconclusive because other jurisdictions, exempt, excepted and small unregistered charities exist.
- Keep the API key server-side, cache carefully, retain provenance and provide a manual path during outages or ambiguity.
A real charity integration where the prototype changed the quote
Appycodes worked on a scoping engagement for a UK registered charity ahead of an invitation to tender. The work included a technical specification, a vendor-evaluation tool and a CRM recommendation. Instead of estimating the integration from sales documentation, the team built a working CRM-to-website prototype and exercised the flow end to end.
The prototype exposed three constraints that would have materially affected a fixed-price commitment: trial accounts did not provide API keys, payments used a connected-account model that could not be tested without live credentials, and the vendor offered a sandbox only on its highest plan. The hard decision was to spend delivery effort before bidding so the estimate described what could actually be proved, rather than assuming every vendor surface behaved like a conventional test API.
That project did not use the Charity Commission API, and we do not imply that it did. It provides the implementation lesson behind this guide: a public-register lookup is one bounded component in a charity product. It does not remove the need to prototype the CRM, payment, consent, eligibility and operational paths that sit around it. The verified, anonymised project summary is published in the Appycodes case-study register.
What the Charity Commission API can—and cannot—prove
The Charity Commission for England and Wales says its beta API exposes the latest information shown on its Register of Charities and requires a developer-hub subscription and API key. It supports searches by name, registration date, registered number and removal date, plus detail operations for charity records, classifications, trustees, areas of operation and financial information. Charity Commission: API documentation · Charity Commission: current operations
| Question | Use the register? | Product treatment |
|---|---|---|
| Does this exact record appear on the England and Wales register? | Yes | Show source, registered number, suffix, organisation number, status and retrieved time. |
| Which similarly named charity did the user mean? | Partly | Return candidates and require confirmation; do not auto-select from name alone. |
| Is the charity currently recorded as registered or removed? | Yes | Store the register status as a snapshot and route removed records to review. |
| Does this person control the charity or have authority to sign? | No | Use an invitation to a known domain, authorised-contact workflow and documentary checks. |
| Is the organisation eligible for our grant, discount or marketplace? | No | Apply your separately reviewed rules and retain the evidence used for that decision. |
| Is a missing result proof that it is not charitable? | No | Check jurisdiction, spelling, alternative evidence and manual review. |
The biggest data-model trap is assuming the public-facing registered number is always unique to one record. The Commission’s current data definition says organisation_number is unique to a single charity, while reg_charity_number can be shared by multiple charities; group_subsid_suffix distinguishes the main record from a linked or subsidiary record. It also defines R as registered and RM as removed, and warns that the removal date is not necessarily when the charity ceased to exist or operate. Charity Commission: API data definitions
Coverage is another hard boundary. GOV.UK states that the England and Wales register does not include some charities below £5,000 income, excepted charities or exempt charities, and points users to separate registers for Scotland and Northern Ireland. GOV.UK: search the charity register OSCR publishes a daily Scottish register download and a separate beta API; Northern Ireland maintains its own searchable register. OSCR: Scottish Charity Register APIs · CCNI: Northern Ireland charity search
The Appycodes Registry Fit Gate
Score five gates from 0 to 3: 0 unknown or absent, 1 user-asserted, 2 matched with unresolved ambiguity, 3 confirmed with retained evidence. The maximum is 15. Jurisdiction and Identifier are hard gates: if either scores zero, the product cannot describe the result as a confirmed register match.
England and Wales, Scotland, Northern Ireland, or evidence outside a public register.
Registered number, suffix and unique organisation number rather than display name.
Registered, removed or unresolved, with the status date and caveat preserved.
Source, retrieval time, cache age and a defined recheck trigger.
The product states what the match proves and which decision happens elsewhere.
The gate is a product-control model, not a legal or statistical risk score. Its purpose is to stop a clean API response from being promoted into a claim the source does not support.
Store a confirmed snapshot, not a mutable copy of the register
Keep registry discovery, user confirmation and the business decision as separate records. A useful minimum model is:
| Field | Why it exists | Update rule |
|---|---|---|
jurisdiction | Selects CCEW, OSCR, CCNI or manual evidence | Never inferred from a name or address alone |
organisation_number | Stable unique CCEW record identifier | Immutable after user confirmation |
registered_number + suffix | Public identifier and linked-record identity | Immutable; conflicts create review |
registry_snapshot | Name, status and only the fields the workflow needs | Append a new version; do not silently overwrite |
retrieved_at + source | Provenance and cache age | Set on every successful registry fetch |
confirmed_by + confirmed_at | Separates user selection from machine retrieval | Retain as auditable workflow evidence |
decision + decision_basis | Grant, discount, onboarding or marketplace outcome | Owned by the business policy, never the registry adapter |
Refresh status at the point of consequence—for example, application submission or annual renewal—rather than on every keystroke. Keep the previous snapshot so an operator can see what changed. A removed status should pause the dependent decision and explain the next step; it should not delete the customer record or erase previously supplied evidence.
A resilient Next.js registered-number lookup
The server route below validates the input, keeps the key out of the browser, uses the documented registered-number route with main-record suffix 0, applies a timeout, preserves provenance and returns a manual-review state for no exact match. Configure the base URL, key and current header name from the API definition in your developer-hub subscription rather than copying credentials into source.
// app/api/charities/[number]/route.ts
import { NextResponse } from "next/server";
type RegisterRow = {
organisation_number: number;
reg_charity_number: number;
group_subsid_suffix: number;
charity_name: string;
reg_status: "R" | "RM";
date_of_registration: string;
date_of_removal: string | null;
};
const BASE_URL = process.env.CCEW_API_BASE_URL;
const API_KEY = process.env.CCEW_API_KEY;
const API_KEY_HEADER = process.env.CCEW_API_KEY_HEADER;
export async function GET(
_request: Request,
context: { params: Promise<{ number: string }> },
) {
const { number } = await context.params;
if (!/^\d{6,8}$/.test(number)) {
return NextResponse.json({ error: "invalid_charity_number" }, { status: 400 });
}
if (!BASE_URL || !API_KEY || !API_KEY_HEADER) {
return NextResponse.json({ error: "register_not_configured" }, { status: 503 });
}
// suffix 0 asks for the main charity record. Do not silently pick a linked
// record when the returned suffix or organisation number differs.
const url = new URL(`charityRegNumber/${number}/0`, BASE_URL);
const response = await fetch(url, {
headers: { [API_KEY_HEADER]: API_KEY },
cache: "no-store",
signal: AbortSignal.timeout(4500),
});
if (response.status === 404) {
return NextResponse.json({ match: null, next: "manual_review" });
}
if (!response.ok) {
return NextResponse.json(
{ error: "register_unavailable", next: "retry_or_manual_review" },
{ status: 503 },
);
}
const rows = (await response.json()) as RegisterRow[];
const exact = rows.find(
(row) => row.reg_charity_number === Number(number) && row.group_subsid_suffix === 0,
);
return NextResponse.json({
match: exact
? {
jurisdiction: "england-wales",
organisationNumber: exact.organisation_number,
registeredNumber: exact.reg_charity_number,
suffix: exact.group_subsid_suffix,
name: exact.charity_name,
status: exact.reg_status === "R" ? "registered" : "removed",
removedAt: exact.date_of_removal,
source: "Charity Commission for England and Wales",
retrievedAt: new Date().toISOString(),
}
: null,
next: exact ? "confirm_with_user" : "manual_review",
});
}Do not proxy arbitrary path fragments from the browser. Expose a narrow endpoint for the operation your product needs, validate the number before the upstream call and log latency, HTTP status and request purpose without logging the API key or unnecessary personal data. Cache exact public-record responses for a bounded period, but bypass or revalidate that cache when a user is about to make a consequential submission.
The Commission’s terms require API keys to remain confidential, prohibit embedding them in code or an open-source tree, recommend environment or configuration storage, and permit quotas or rate limits. They also require source attribution under the Open Government Licence. Charity Commission API terms
Failure modes that matter in production
1. Treating a fuzzy name result as the charity
Common words, local branches and historical names produce plausible candidates. Display the number, status and enough non-sensitive context for the user to choose. Save only after explicit confirmation. If the user already has a registration number, skip name search.
2. Collapsing linked charities onto one registered number
If the product discards the suffix and organisation number, later refreshes can attach the wrong linked body to an application. Make the composite source identity unique in your database and reject a different organisation number as a conflict.
3. Calling every miss “not a charity”
A miss may mean the wrong jurisdiction, a small unregistered body, an excepted or exempt charity, a spelling problem, an API outage or a record not yet available. Give the user the official registers and a manual-evidence route. The absence of one registry row is not a legal conclusion.
4. Letting an upstream outage block the entire service
Separate “register unavailable” from “no match”. Use a short timeout, limited retries with jitter, a circuit breaker and an operator-visible queue. Let a user save a draft and resume; do not convert a 503 into a rejection.
5. Copying every public field into the CRM
Public does not mean purpose-free. The API can expose contact and trustee data, but the Commission’s terms make the consumer the controller of personal data it receives, require a lawful basis and security, and can require deletion following a register-data removal notice. Retrieve the minimum fields needed, document retention and avoid using trustee data for marketing. Charity Commission API terms: personal data duties
6. Mixing registry updates with customer-confirmed facts
Do not let a refresh overwrite the operational email, billing contact, bank evidence or delivery preferences supplied by the charity. Registry data and customer data have different sources and change rules. Show a comparison and ask an authorised user or operator to resolve material differences.
Recommendations by UK product type
Freeze the confirmed registry snapshot onto the application, then run eligibility, conflicts, bank and due-diligence checks under a versioned programme policy.
Use the register match as one signal, bind the account through a charity-controlled contact, and recheck status at renewal rather than querying on every login.
Registry data can label the organisation; payment onboarding, connected-account ownership, sanctions, fraud and payout controls belong to the payment and risk layers.
Route England and Wales to CCEW, Scotland to OSCR and Northern Ireland to CCNI. Normalise presentation, but retain each source’s native identifiers and status semantics.
After real integration discovery, Appycodes recommends proving the narrowest risky flow before estimating the whole system. For a charity lookup, that means testing authentication, exact-number and linked-record behaviour, outage handling, cache rules and the handoff into the CRM or eligibility workflow with non-production data. Our API and integration service covers that discovery, adapter design, security, observability and operational handover.
Frequently asked questions
- Is the Charity Commission API a UK-wide charity register API?
- No. The Charity Commission for England and Wales API covers its Register of Charities. Scotland has the OSCR register and beta API, while Northern Ireland has the Charity Commission for Northern Ireland register. A UK-wide product needs an explicit jurisdiction choice and separate adapters.
- Can a Charity Commission API result verify that an organisation is a charity?
- It can show that a matching record appears on the England and Wales register and expose its recorded status and public details. It cannot prove that the user controls the charity, may act for it, satisfies your programme rules, owns a bank account or passes safeguarding, fraud, sanctions or due-diligence checks.
- Which identifier should a charity lookup tool store?
- Store the registered charity number, group or subsidiary suffix, and the API's organisation number. The Charity Commission data definition says the organisation number is unique to a single charity, while a registered charity number can be shared across linked records. Keep the displayed name as a snapshot, not the key.
- What should happen when a charity is not found?
- Do not label it non-charitable. Ask the user to check the jurisdiction and identifier, then offer the official register link and a manual-review route. Some England and Wales charities are not registered because they are below the registration threshold, excepted or exempt, and Scotland and Northern Ireland use different registers.
- Should a charity lookup tool store trustee names?
- Only if a documented business decision genuinely needs them. Trustee names are personal data. The API terms make the API consumer responsible for lawful, fair and secure processing, and may require deletion when the Commission notifies users that register personal data has been removed.
Primary sources
- Charity Commission: API documentation and beta status
- Charity Commission: current API operations
- Charity Commission: API data definitions
- Charity Commission: developer-hub API terms
- GOV.UK: Register of Charities coverage and exclusions
- OSCR: Scottish Charity Register public APIs
- CCNI: Northern Ireland charity register search
Technical and operational guidance, not legal, regulatory, tax, safeguarding, fraud, sanctions or due-diligence advice. Confirm your decision policy and data use with qualified advisers where required.
UK topic cluster
Company data & identity
UK registry, charity, postcode and identity-data implementation guidance.
Related guide
Companies House API for onboarding
Resolve legal entities while keeping identity, authority and KYC checks separate.
Related guide
Postcodes.io vs Ideal Postcodes
Choose postcode geography or delivery-point address data for a UK workflow.
Case study
A UK charity integration prototype
See the anonymised prototype-first charity scoping record in our case-study register.










































