Data API and MCP server
BabyData exposes its baby-and-pregnancy calculators as a free, read-only JSON API and a Model Context Protocol (MCP) server, so an AI agent gets the same numbers from the same rules as the on-page tools. The endpoints cover due date, ovulation, pregnancy weeks and UK statutory maternity pay. Every response returns the rule it used and a primary UK source. No authentication, no PII, licensed CC BY 4.0. Pregnancy outputs are informational only, not medical advice, and are reviewed by our editorial team against NHS and gov.uk guidance.
Informational only, not medical or financial advice. These tools return estimates, not diagnoses or guarantees. Confirm pregnancy questions with your midwife, GP or NHS 111, and statutory pay on gov.uk.
REST endpoints
All endpoints are GET, return JSON, and accept query parameters. Dates are YYYY-MM-DD.
GET /api/due-date
Estimate a due date and current pregnancy stage (Naegeleās rule).
Parameters: method (lmp, conception, ivf), date (YYYY-MM-DD), embryoAge (IVF), asOf
Example: /api/due-date?method=lmp&date=2026-01-15
GET /api/ovulation
Estimate ovulation day, the fertile window and the next period.
Parameters: lastPeriod (YYYY-MM-DD), cycleLength (20 to 45, default 28)
Example: /api/ovulation?lastPeriod=2026-01-15&cycleLength=28
GET /api/pregnancy-weeks
How many weeks pregnant, with trimester and progress.
Parameters: lmp or dueDate (YYYY-MM-DD), asOf
Example: /api/pregnancy-weeks?lmp=2026-01-15
GET /api/maternity-pay
Estimate UK Statutory Maternity Pay over the 39 weeks (gov.uk rule).
Parameters: weeklyEarnings or annualSalary (GBP)
Example: /api/maternity-pay?weeklyEarnings=600
MCP server
A Model Context Protocol server is available at /mcp (streamable-http, JSON-RPC 2.0, protocol version 2025-06-18). It exposes the same four calculators as MCP tools:
calculate_due_datecalculate_ovulationpregnancy_weeksmaternity_pay
The MCP manifest is at /.well-known/mcp.json and the OpenAPI 3.1 description at /openapi.json.
Methods and sources
Each response carries the rule it applied. Due dates use Naegele's rule (LMP plus 280 days, conception plus 266, IVF transfer plus 266 minus embryo age), as the NHS dates pregnancy. Ovulation is cycle length minus 14, with the fertile window the 5 days before ovulation plus ovulation day. Statutory Maternity Pay follows the gov.uk rule: 6 weeks at 90% of average weekly earnings, then 33 weeks at the lower of the flat rate or 90%. The names and births data draws on the ONS Baby names in England and Wales dataset, ONS births, National Records of Scotland and NISRA.
Terms
Read-only, no authentication, no personal data is stored. Licensed under CC BY 4.0: reuse the figures with attribution to BabyData. The statutory maternity pay flat rate is a placeholder until confirmed on gov.uk at launch.
Names and Family Data Desk, BabyData
BabyData's editorial desk builds and documents the tools, citing the underlying rule and the official UK dataset behind every number. Pregnancy-related tools are editorially reviewed against NHS and gov.uk guidance before publication.
Last reviewed: 12 June 2026