My place in the WordPress community
- I have had a wordpress.org account since 2006.
- I contributed to WordPress core for versions 7.0 and 7.1.
- I maintain 30 plugins on wordpress.org.
- I organise and speak at WordCamps.
- I have attended every WordCamp Europe from 2017 to 2026.
Funders, grant platforms and charity software all want the same thing from the Scottish Charity Register: a reliable record of who is registered, what they report and when. The Office of the Scottish Charity Regulator (OSCR) publishes that record as open data with terms attached. I build the Next.js side of such features from Gdynia, remotely and in writing, so that the data is used within those terms. Questions about your own legal position go to your adviser.

The Edinburgh skyline seen from Calton Hill. Photo by Jim Barton, CC BY-SA 2.0, from Wikimedia Commons.
What OSCR data can a Next.js app use?
OSCR’s download page offers a full list of charities on the register, free of charge, and says it is updated on a daily basis. The options on that page:
- the full Scottish Charity Register
- the full register with five years of annual returns
- the 300 highest-income charities, with a one-year income variant that excludes cross-border charities, and with income that may include subsidiary companies
- a list of former charities, with a ceased date and a removal reason for some bodies, described in a separate PDF
The page does not name a file format. The field descriptions are in a separate “download details” PDF dated 22 March 2023, so an app should read the live file header rather than trust a three-year-old field list.
OSCR also runs an API in beta. The page says it launched in May 2023, that access needs an application form, and that questions go to OSCR’s data research mailbox. The page for the API gives two endpoints:
| Endpoint | What it returns |
|---|---|
all_charities | charities, with optional page and charitynumber parameters (for example SC000001) |
annualreturns | up to five years of annual returns for one charity, selected with charityid |
If both page and charitynumber are sent to the first endpoint, page is ignored. The key goes in an HTTP header named x-functions-key. The page lists these errors: 400 with a message, 401 when the key is missing or wrong, 404 when the charity has no content or no annual returns exist for the id, and 503, which can occur during a data refresh that takes two to three minutes. The page states no rate limits.
What do the terms and the licence say?
The register data is licensed under the Open Government Licence v3.0. On the download page OSCR adds terms of use: you will not use the data for direct marketing, and you will not use it to create a register or list that claims to be the Scottish Charity Register. Using the list means accepting the licence terms.
The API page repeats the first restriction in its own way: requests to use the API for marketing purposes will not be granted. When you apply, the form asks for your name, email, organisation (or your own name if you are not acting for one) and the reason for use.
The required attribution has three parts: the crown copyright and database right notice with a year, the statement that the data contains information from the Scottish Charity Register supplied by the Office of the Scottish Charity Regulator, and the statement that it is licensed under the Open Government Licence v3.0. In a Next.js app that is a footer line on every page or panel that shows register data, which is simple to forget on exported PDFs and emails.
What changed on the register in March 2026?
OSCR’s announcement says that from 9 March 2026 the register adds:
- the first and last names of each charity’s trustees, with no other trustee personal information, though some exemptions may apply
- every accounts document submitted from that date through the online annual return, published without redactions
- a description of the charity’s activities in its own words, and the numbers of staff, trustees and volunteers that the charity already gives in its annual return
The announcement does not mention downloads or bulk exports, so I cannot say from the sources whether the files or the API carry the new fields. A project starts by pulling a sample and listing the fields that really arrive. Trustee names are personal data about individuals. What your app may do with them under data protection law is a question for your adviser, and I keep the field out of any list or export until that question is answered.
How should the Next.js app be built around these terms?
Four design rules follow from the terms.
The OSCR key never reaches the browser. The Next.js documentation says environment variables without the NEXT_PUBLIC_ prefix are available only in the Node.js environment and not in the browser, and that NEXT_PUBLIC_ values are inlined into the JavaScript bundle at build time. The OSCR key therefore belongs in a plain variable, read inside a Route Handler.
The browser calls your route, not OSCR. The Next.js documentation describes Route Handlers as custom request handlers built on the Web Request and Response APIs. A handler can validate the charity number, call OSCR with the header and return only the fields your screen needs.
Caching is explicit. The Next.js documentation notes that the default caching for GET handlers changed from static to dynamic in version 15, and shows export const revalidate = 60 for revalidating cached data in a handler. OSCR says the register is updated daily, so a window of an hour or more is enough for most screens. A 503 during a refresh is a reason to serve the cached copy.
The notice travels with the data. A small component that takes the retrieval date and renders the attribution keeps it from being left out of a new screen.
// app/api/charity/[number]/route.ts
export const revalidate = 3600; // OSCR says the register updates daily
export async function GET(
_req: Request,
{ params }: { params: Promise<{ number: string }> },
) {
const { number } = await params;
if (!/^SC\d{6}$/.test(number)) {
return Response.json({ error: "invalid number" }, { status: 400 });
}
const res = await fetch(
`https://oscrapi.azurewebsites.net/api/all_charities?charitynumber=${number}`,
{ headers: { "x-functions-key": process.env.OSCR_API_KEY! } },
);
if (res.status === 503) {
// OSCR refreshes the data, which takes 2 to 3 minutes
return Response.json({ error: "refreshing" }, { status: 503 });
}
if (!res.ok) {
return Response.json({ error: "not found" }, { status: res.status });
}
return Response.json(await res.json());
}The number format check is my assumption from the example SC000001 on the API page. Confirm it against the data before you rely on it.
Which jobs fit which data source?
| Job | Fits |
|---|---|
| Show one charity’s status and annual returns on a grant application | the API, one charity per request |
| Screen a list of applicants against the register once a week | the daily download, loaded in a background job |
| Show the largest charities by income | the 300 highest-income list |
| Check whether a body was once registered | the former charities list |
| Build a public directory | ask OSCR first: a list claiming to be the register is excluded, and the use may sit near the marketing restriction |
For a funder, the register is a check on the applicant, which is a reasonable fit. For a platform that wants to email every charity in a region, the marketing restriction is the first thing to settle, before any code.
How does a register data project run?
- You send the use case: who looks up which charity, how often, and which fields appear on screen.
- I write down which source fits, the API application text for OSCR and the questions your adviser should answer on marketing and personal data.
- I build the route, the cache and the attribution on a staging deployment, with a visible state for refreshes and missing returns.
- The route goes live only after you have approved the staging copy in writing, with the real OSCR key loaded.
I need the reason for use that you would give OSCR, the expected volume and the screens that show the data. Other Next.js work I do is described on the Next.js developer page.
Register data for an Edinburgh product
If your Edinburgh charity or funding product needs register data, send the use case through the contact form: which charity fields you show and whether any contact with charities follows. The first written estimate for the API route, the cache and the attribution component is free. Whether the use fits OSCR’s terms is for you and your adviser to decide, and I build the app around that answer.
Selected projects
Examples of my work.
Corporate Website: olsztyn.com.pl
Olsztyn.com.pl is one of the key projects in my WordPress developer portfolio, serving as a comprehensive city portal dedicated to the residents of Olsztyn. ...
Corporate Website: osemka.pl - Banner
A package of various special banners for the osemka.pl website
Corporate Website: osemka.pl - bannery
A package of various special banners for the osemka.pl website
See also in Great Britain
Need this service: Next.js developer in Edinburgh?
Describe your project by e-mail. I reply within 24 hours.
Describe your projectExplore other WordPress services and knowledge base
Migration to Astro, Next.js, and headless WordPress.
WooCommerce sync with ERP and wholesale systems.
Business process automation around WordPress and company systems.
Library of concrete automation use cases.
Headless WordPress, Sanity, Strapi, and Contentful with Astro or Next.js.
Astro, MDX, edge delivery, and Core Web Vitals measured on real traffic.
Custom WordPress engineering and architecture.
Scalable headless, ERP, and AI architecture for enterprise.
Related categories
Supporting articles

Six to sixteen weeks for typical engagements, with a four-phase shape: discovery, scoping, build and cutover, tuning. The variables are catalogue size, integration count, URL preservation, and editorial team readiness, not framework choice.

A definitive 4-year Total Cost of Ownership (TCO) analysis, real-world Core Web Vitals benchmarks, Astro 7 GraphQL APQ architecture, and a 10-point executive decision matrix for choosing between decoupled and traditional WordPress.

The Shopify Plus vs WooCommerce headless decision in 2026 is no longer a binary "platform vs custom" trade-off. Both can run headless, both integrate AI, both ship at the edge. The real axes are control, total cost over five years, and exit strategy. This article walks the matrix with confirmed platform facts.