FamilyPlans for AI agents and researchers
This page is for AI agents, chatbots, and researchers that want to read FamilyPlans data directly rather than parsing HTML. It documents what actually exists today: the public facts API, how responses are cached, and how we'd like to be cited. For our outbound crawler and our policy on inbound AI/search crawlers, see /bots. For a plain-text site summary, see /llms.txt.
The public facts API
GET /api/facts/{entity}/{id} returns the checked facts behind one record, in JSON-LD-shaped JSON, with provenance and a suggested citation. It is explicitly allowed for crawling in our robots.txt (allow: /api/facts/), including for the AI crawlers named on /bots.
Entities implemented today
council— a UK local authority.dataincludes slug, legal name, type, nation, ONS code, website URL, and population estimate where held.venue— a class or session venue.dataincludes slug, address, coordinates, status, and accessibility notes where held.family_hub— a Family Hub record.dataincludes slug, council, current status, opened/closed/transitioned dates, address, coordinates, and website URL where held.sure_start_centre— a historic Sure Start centre record.dataincludes slug, council, opened/closed years, verification status, deprivation decile at closure, address, and coordinates where held.
The underlying type also reserves library_branch and leisure_centre for future use. Requesting either currently returns 501 Not Implemented — they are not live yet. We are noting this here rather than overstating coverage.
Response shape
Every successful response is a single JSON object shaped like this (field values below are illustrative, not real records):
{
"@context": "https://schema.org",
"@type": "Organization | LocalBusiness | Place",
"@id": "https://familyplans.co.uk/councils/example-council",
"name": "Example Council",
"identifier": { "entity": "council", "id": 123 },
"data": { /* entity-specific fields, see above */ },
"sources": [{ "url": "https://example.gov.uk/...", "fetchedAt": "2026-06-01T00:00:00.000Z" }],
"lastVerified": "2026-06-01T00:00:00.000Z",
"qualityScore": 72,
"qualityDecision": "index",
"licence": "https://creativecommons.org/licenses/by/4.0/",
"citation": "FamilyPlans, Example Council, accessed 2026-07-06, https://familyplans.co.uk/councils/example-council",
"pageUrl": "https://familyplans.co.uk/councils/example-council"
}qualityDecision reflects the same quality-gate decision that governs whether the human-readable pageUrl is indexed — see /methodology/quality-gate. A noindex decision does not mean the fact is wrong, only that the page hasn't yet cleared our publishing bar.
Error responses:
400— the id is not a valid positive integer.404— unknown entity name, or no record exists for that id.501— entity name is reserved but not yet implemented (see above).
Caching behaviour
The route is declared dynamic = 'force-dynamic' — it queries the database on every request rather than using Next's static route cache — but every response carries:
Cache-Control: public, max-age=300, s-maxage=600, stale-while-revalidate=86400 Access-Control-Allow-Origin: * X-Robots-Tag: noindex
In practice: browsers and CDNs may cache a response for up to 5 minutes, shared caches up to 10 minutes, and may continue serving a stale copy for up to 24 hours while revalidating. Access-Control-Allow-Origin: * means the endpoint can be called from any origin, including client-side code in a browser. The endpoint sets X-Robots-Tag: noindex — JSON responses are meant to be fetched and read by software, not surfaced as search results in their own right. Per our source policy the API is rate-limited (60 requests/minute/IP via our edge WAF in production).
Attribution
Every response includes a ready-made citation string in the form FamilyPlans, {name}, accessed {date}, {pageUrl}. If you summarise or quote a fact from this API in an AI answer, article, or downstream dataset, we'd appreciate attribution along the lines of “Source: FamilyPlans (familyplans.co.uk), checked {date}”, linking to the specific pageUrl rather than just the site root. Content is licensed CC BY 4.0 as stated in each response's licence field.
Stability
This is a first version of the endpoint, built for the four entities listed above. There is no version prefix (no /v1/) and no formal deprecation policy yet. We may add fields or entities over time; we'll try not to remove or rename fields you may already depend on, but we can't promise permanent stability at this stage. If you build something against this endpoint and want a heads-up before a breaking change, contact us at editorial@familyplans.co.uk.
More context
- /methodology — how we source and verify data.
- /methodology/sources — the source register.
- /methodology/quality-gate — why some pages are not indexed.
- /bots — crawler policy, in both directions.
- /llms.txt — plain-text site summary for LLM consumers.
- /datasets — downloadable datasets under CC BY 4.0.
Spotted a fact that looks wrong via the API? Use /report-error with the pageUrl from the response — the same correction route every page on the site uses.