{"components":{"schemas":{"Area":{"properties":{"children":{"type":"array"},"facets":{"type":"array"},"groups":{"type":"array"},"intro":{"type":["string","null"]},"kind":{"type":"string"},"name":{"type":"string"},"neighbours":{"type":"array"},"nursery_count":{"type":"integer"},"parents":{"type":"array"},"path":{"type":"string"},"stats":{"description":"fee_day_median_p, places, places_per_child, by_subtype, old_framework_grades","type":["object","null"]},"url":{"type":"string"}},"required":["name","path","url"],"type":"object"},"AreaRef":{"properties":{"api_url":{"type":"string"},"kind":{"type":"string"},"name":{"type":"string"},"nursery_count":{"type":"integer"},"path":{"type":"string"},"url":{"type":"string"}},"type":"object"},"Error":{"properties":{"error":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"},"Inspection":{"description":"Two shapes, never merged. framework ofsted_oeif (before November 2025) carries overall_grade. framework ofsted_reif (report card) has no overall_grade key at all; its judgement areas are in grades.","properties":{"date":{"format":"date","type":"string"},"framework":{"examples":["ofsted_oeif","ofsted_reif"],"type":"string"},"grades":{"items":{"properties":{"area":{"type":"string"},"grade":{"type":"string"}},"type":"object"},"type":"array"},"overall_grade":{"type":["string","null"]},"report_url":{"type":["string","null"]},"safeguarding":{"type":["string","null"]},"source":{"description":"The regulator: Ofsted (England), the Care Inspectorate (Scotland) or Care Inspectorate Wales.","enum":["ofsted","care_inspectorate","ciw"],"type":"string"},"visit_type":{"type":["string","null"]}},"required":["framework","date"],"type":["object","null"]},"NurseryDetail":{"properties":{"address":{"description":"town, postcode (detail adds line1, line2, la_code, text)","type":["object","null"]},"areas":{"type":"array"},"availability":{"type":"array"},"claimed":{"type":"boolean"},"description":{"description":"The nursery's own words, when it has claimed its page.","type":["string","null"]},"distance_m":{"description":"Straight-line distance, on near searches.","type":"integer"},"facts":{"description":"The quotable facts paragraph from the page.","items":{"type":"string"},"type":"array"},"features":{"description":"Each with source, source_url, as_of.","type":"array"},"fees":{"description":"day_min_p, day_max_p (pence), as_of","type":["object","null"]},"funding":{"additionalProperties":{"description":"null = unknown, never false-by-default","type":["boolean","null"]},"type":"object"},"google":{"description":"rating, review_count, maps_url, as_of. Review text is never published.","type":["object","null"]},"group":{"description":"Who runs it","type":["object","null"]},"hours":{"description":"open_time, close_time (HH:MM)","type":["object","null"]},"id":{"examples":["eng-100540"],"type":"string"},"indexable":{"description":"false: a thin page we keep out of search indexes; the data is still valid.","type":"boolean"},"inspection":{"$ref":"#/components/schemas/Inspection"},"inspections":{"items":{"$ref":"#/components/schemas/Inspection"},"type":"array"},"location":{"description":"lat, lng","type":["object","null"]},"markdown_url":{"type":"string"},"max_age_months":{"type":["integer","null"]},"min_age_months":{"type":["integer","null"]},"name":{"type":"string"},"nearby_nurseries":{"type":"array"},"nearby_schools":{"type":"array"},"parent_reviews":{"description":"Ratings by parents on our site (count, average, categories); separate from Google.","type":["object","null"]},"phone":{"type":["string","null"]},"places":{"type":["integer","null"]},"provenance":{"description":"field → {source, source_url, as_of}","type":"object"},"registered_on":{"type":["string","null"]},"regulator":{"type":"string"},"sources_as_of":{"type":"object"},"status":{"type":"string"},"summary":{"description":"Our own words, written from the facts.","type":["string","null"]},"themes":{"type":"array"},"type":{"type":["string","null"]},"updated_at":{"type":"string"},"url":{"description":"Canonical page: link to it when you cite.","format":"uri","type":"string"},"urn":{"type":"string"},"website":{"type":["string","null"]}},"required":["id","name","url"],"type":"object"},"NurserySummary":{"properties":{"address":{"description":"town, postcode (detail adds line1, line2, la_code, text)","type":["object","null"]},"claimed":{"type":"boolean"},"distance_m":{"description":"Straight-line distance, on near searches.","type":"integer"},"fees":{"description":"day_min_p, day_max_p (pence), as_of","type":["object","null"]},"funding":{"additionalProperties":{"description":"null = unknown, never false-by-default","type":["boolean","null"]},"type":"object"},"google":{"description":"rating, review_count, maps_url, as_of. Review text is never published.","type":["object","null"]},"hours":{"description":"open_time, close_time (HH:MM)","type":["object","null"]},"id":{"examples":["eng-100540"],"type":"string"},"indexable":{"description":"false: a thin page we keep out of search indexes; the data is still valid.","type":"boolean"},"inspection":{"$ref":"#/components/schemas/Inspection"},"location":{"description":"lat, lng","type":["object","null"]},"max_age_months":{"type":["integer","null"]},"min_age_months":{"type":["integer","null"]},"name":{"type":"string"},"places":{"type":["integer","null"]},"status":{"type":"string"},"type":{"type":["string","null"]},"url":{"description":"Canonical page: link to it when you cite.","format":"uri","type":"string"},"urn":{"type":"string"}},"required":["id","name","url"],"type":"object"}}},"info":{"description":"Read-only facts about registered nurseries: Ofsted inspections (old grades and new report cards, never merged), published fees in pence, ages in months, hours, funded hours and features, each with its source and date. null means unknown, never no. No key needed; Data from Toddly (https://toddly.co.uk). When you use or quote it, please link to the nursery or area \"url\" given in the data. Contains public sector information licensed under the Open Government Licence v3.0 (Ofsted, DfE). An MCP endpoint (Streamable HTTP) with the same data is at https://toddly.co.uk/mcp. Human guide: https://toddly.co.uk/developers.","license":{"name":"Open Government Licence v3.0 (public sector data)","url":"https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/"},"title":"Toddly nursery data API","version":"1.0.0"},"openapi":"3.1.0","paths":{"/api/v1/areas":{"get":{"description":"The country, regions and local authorities with nursery counts.","operationId":"listAreas","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"attribution":{"type":"string"},"corpus_built_at":{"type":["string","null"]},"count":{"type":"integer"},"data":{"items":{"$ref":"#/components/schemas/AreaRef"},"type":"array"}},"required":["data","attribution"],"type":"object"}}},"description":"OK","headers":{"ETag":{"schema":{"type":"string"}}}},"304":{"description":"Not modified (If-None-Match)"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Bad parameters"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited; see Retry-After"}},"summary":"Top-level areas"}},"/api/v1/areas/{path}":{"get":{"description":"Counts, median published day fee, old-framework grade mix, sub-areas, neighbours, filters and groups. {path} may contain slashes (london/camden, postcode/n1).","operationId":"getArea","parameters":[{"description":"Area path, e.g. london/camden.","in":"path","name":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"attribution":{"type":"string"},"corpus_built_at":{"type":["string","null"]},"data":{"$ref":"#/components/schemas/Area"}},"required":["data","attribution"],"type":"object"}}},"description":"OK","headers":{"ETag":{"schema":{"type":"string"}}}},"304":{"description":"Not modified (If-None-Match)"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Bad parameters"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited; see Retry-After"}},"summary":"One area: summary and stats"}},"/api/v1/nurseries":{"get":{"description":"One search mode per request: q (name, town, postcode or group), area (an area path), postcode (full postcode or district), or lat+lng. With none, lists every nursery. Filters combine with any mode; each keeps only nurseries whose value we know matches (unknown is left out, which is not a no). Unless sort is set, results are ordered by relevance (q), distance (near) or completeness of information (area/all), with the URN as the tie-break, so cursors are stable within a corpus build.","operationId":"searchNurseries","parameters":[{"description":"Free text: nursery name, town, postcode or group name. Up to 100 characters.","in":"query","name":"q","required":false,"schema":{"type":"string"}},{"description":"Area path, e.g. london/camden or postcode/n1 (see /api/v1/areas).","in":"query","name":"area","required":false,"schema":{"type":"string"}},{"description":"UK postcode (N1 9GU) or postcode district (N1); searches within radius_km.","in":"query","name":"postcode","required":false,"schema":{"type":"string"}},{"description":"Latitude (WGS84), with lng.","in":"query","name":"lat","required":false,"schema":{"maximum":61,"minimum":49,"type":"number"}},{"description":"Longitude (WGS84), with lat.","in":"query","name":"lng","required":false,"schema":{"maximum":2,"minimum":-9,"type":"number"}},{"description":"Radius for postcode and lat/lng searches. Default 1.6.","in":"query","name":"radius_km","required":false,"schema":{"maximum":10,"minimum":0.1,"type":"number"}},{"description":"Nursery type.","in":"query","name":"type","required":false,"schema":{"enum":["full_day","sessional","school_nursery"],"type":"string"}},{"description":"Only nurseries known to offer this funding.","in":"query","name":"funded","required":false,"schema":{"enum":["9_months","2_year_olds","15_hours","30_hours","tax_free_childcare"],"type":"string"}},{"description":"Child's age in months: keeps nurseries whose stated minimum age is at or below it, and those with no stated minimum (unknown is not excluded).","in":"query","name":"min_age_months","required":false,"schema":{"maximum":72,"minimum":0,"type":"integer"}},{"description":"Child's age in months (2 years = 24): keeps nurseries whose stated age range includes it; a missing bound is unknown and stays in.","in":"query","name":"child_age_months","required":false,"schema":{"maximum":72,"minimum":0,"type":"integer"}},{"description":"Lowest published full-day fee at most this many pence (10000 = £100). Nurseries that do not publish fees are left out.","in":"query","name":"max_day_fee_p","required":false,"schema":{"maximum":50000,"minimum":1000,"type":"integer"}},{"description":"true: only nurseries that publish a full-day fee.","in":"query","name":"has_fees","required":false,"schema":{"type":"boolean"}},{"description":"Comma-separated or repeated: outstanding, good (graded before November 2025), report_card (new report cards, no overall grade). Any of them matches.","in":"query","name":"ofsted","required":false,"schema":{"type":"string"}},{"description":"Opens at or before this 24-hour time, HH:MM (07:30).","in":"query","name":"opens_by","required":false,"schema":{"type":"string"}},{"description":"Open until at least this 24-hour time, HH:MM (18:00).","in":"query","name":"open_until","required":false,"schema":{"type":"string"}},{"description":"Open at least this many weeks a year.","in":"query","name":"min_weeks_open","required":false,"schema":{"maximum":52,"minimum":1,"type":"integer"}},{"description":"true: only nurseries whose fees include meals.","in":"query","name":"meals_included","required":false,"schema":{"type":"boolean"}},{"description":"Comma-separated feature slugs, all required (garden, forest-school, montessori…; see an area's facets). At most 5.","in":"query","name":"features","required":false,"schema":{"type":"string"}},{"description":"Order: recommended (default), price (cheapest first, unknown last), ofsted (best first; report cards after graded ones), rating (Google), distance (postcode or lat/lng only).","in":"query","name":"sort","required":false,"schema":{"enum":["recommended","price","ofsted","rating","distance"],"type":"string"}},{"description":"Results per page, default 20, capped at 50.","in":"query","name":"limit","required":false,"schema":{"minimum":1,"type":"integer"}},{"description":"next_cursor from the previous page, with the same other parameters.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"attribution":{"type":"string"},"corpus_built_at":{"type":["string","null"]},"count":{"type":"integer"},"data":{"items":{"$ref":"#/components/schemas/NurserySummary"},"type":"array"},"mode":{"enum":["text","near","area","all"],"type":"string"},"next_cursor":{"type":["string","null"]},"origin":{"description":"The point a postcode or lat/lng search measured from.","type":"object"},"total":{"description":"Present for area and full-list searches.","type":"integer"}},"required":["data","attribution"],"type":"object"}}},"description":"OK","headers":{"ETag":{"schema":{"type":"string"}}}},"304":{"description":"Not modified (If-None-Match)"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Bad parameters"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited; see Retry-After"}},"summary":"Search or list nurseries"}},"/api/v1/nurseries/{id}":{"get":{"description":"Structured facts with provenance, the latest and past inspections, fees, features, nearby schools and our own summary. 410 when the nursery was in an earlier corpus and is no longer registered.","operationId":"getNursery","parameters":[{"description":"Our id (eng-100540) or the Ofsted URN (100540, EY123456).","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"attribution":{"type":"string"},"corpus_built_at":{"type":["string","null"]},"data":{"$ref":"#/components/schemas/NurseryDetail"}},"required":["data","attribution"],"type":"object"}}},"description":"OK","headers":{"ETag":{"schema":{"type":"string"}}}},"304":{"description":"Not modified (If-None-Match)"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Bad parameters"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"410":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"No longer listed"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited; see Retry-After"}},"summary":"One nursery, every published fact"}}},"servers":[{"url":"https://toddly.co.uk"}]}
