{"openapi":"3.1.0","info":{"title":"Pregnancy Due Date API","version":"1.0.0","description":"Pregnancy and due-date maths as an API, using the standard Naegele's rule (40 weeks / 280 days from the last menstrual period). The due-date endpoint takes the last menstrual period, the conception date, or a known due date — whichever you have — and returns the due date, the estimated conception date and the fertile window. The gestational-age endpoint reports how far along a pregnancy is as of any reference date: gestational age in weeks and days, the trimester, days remaining, progress percent, and whether it is overdue. The milestones endpoint lists the key dates of a pregnancy — the trimester boundaries, the anatomy-scan window, viability at 24 weeks, full term at 37–40 weeks, the due date and post-term at 42 weeks. All dates are handled in UTC and computed locally and deterministically. Ideal for pregnancy and fertility apps, midwifery and clinical tools, and parenting and family-planning products. Informational only — not medical advice. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 4 endpoints. This is pregnancy date maths; for general date arithmetic use a datetime API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/pregnancy-api","description":"oanor gateway"}],"tags":[{"name":"Pregnancy"},{"name":"Meta"}],"components":{"securitySchemes":{"oanorKey":{"type":"apiKey","in":"header","name":"x-oanor-key","description":"Get your key at https://www.oanor.com/developer/keys"}}},"security":[{"oanorKey":[]}],"paths":{"/v1/due-date":{"get":{"operationId":"get_v1_due_date","tags":["Pregnancy"],"summary":"Due date from LMP / conception / due","description":"","parameters":[{"name":"lmp","in":"query","required":false,"description":"Last menstrual period YYYY-MM-DD","schema":{"type":"string"},"example":"2025-01-01"},{"name":"conception","in":"query","required":false,"description":"Or conception date","schema":{"type":"string"}},{"name":"due_date","in":"query","required":false,"description":"Or a known due date","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"lmp":"2025-01-01","basis":"last menstrual period","due_date":"2025-10-08","fertile_window":{"end":"2025-01-16","start":"2025-01-10"},"estimated_conception":"2025-01-15"},"meta":{"timestamp":"2026-06-03T17:42:10.473Z","request_id":"a3df4855-198f-436f-b9ec-e49175cb6a26"},"status":"ok","message":"Due date","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/gestational-age":{"get":{"operationId":"get_v1_gestational_age","tags":["Pregnancy"],"summary":"Gestational age + progress","description":"","parameters":[{"name":"lmp","in":"query","required":false,"description":"LMP (or conception/due_date)","schema":{"type":"string"},"example":"2025-01-01"},{"name":"as_of","in":"query","required":false,"description":"Reference date (default today)","schema":{"type":"string"},"example":"2025-04-02"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"lmp":"2025-01-01","as_of":"2025-04-02","basis":"last menstrual period","overdue":false,"due_date":"2025-10-08","trimester":"second","days_remaining":189,"gestational_age":"13w 0d","progress_percent":32.5,"gestational_weeks":13,"gestational_total_days":91,"gestational_days_into_week":0},"meta":{"timestamp":"2026-06-03T17:42:10.558Z","request_id":"b16c4084-e0c0-4d4a-aefa-9c39b6bc28b0"},"status":"ok","message":"Gestational age","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/milestones":{"get":{"operationId":"get_v1_milestones","tags":["Pregnancy"],"summary":"Key pregnancy milestones","description":"","parameters":[{"name":"lmp","in":"query","required":false,"description":"LMP (or conception/due_date)","schema":{"type":"string"},"example":"2025-01-01"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"lmp":"2025-01-01","basis":"last menstrual period","due_date":"2025-10-08","milestones":[{"date":"2025-04-02","week":13,"milestone":"End of first trimester"},{"date":"2025-07-09","week":27,"milestone":"End of second trimester"},{"date":"2025-06-18","week":24,"milestone":"Viability (24 weeks)"},{"date":"2025-05-07","week":18,"milestone":"Anatomy scan window start (18 weeks)"},{"date":"2025-07-16","week":28,"milestone":"Third trimester begins (28 weeks)"},{"date":"2025-09-17","week":37,"milestone":"Preterm threshold (37 weeks / full term)"},{"date":"2025-09-17","week":37,"milestone":"Early term (37–38 weeks)"},{"date":"2025-10-01","week":39,"milestone":"Full term (39–40 weeks)"},{"date":"2025-10-08","week":40,"milestone":"Due date (40 weeks)"},{"date":"2025-10-22","week":42,"milestone":"Post-term (42 weeks)"}]},"meta":{"timestamp":"2026-06-03T17:42:10.660Z","request_id":"230b31fd-47b5-47e3-b9e4-021c3641b4f6"},"status":"ok","message":"Milestones","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/meta":{"get":{"operationId":"get_v1_meta","tags":["Meta"],"summary":"Spec","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"name":"Pregnancy Due Date API","notes":"Naegele's rule: due date = LMP + 280 days; conception assumed at LMP + 14 days. Informational, not medical advice. Nothing is stored.","version":"v1","endpoints":[{"path":"/v1/due-date","params":{"lmp":"last menstrual period YYYY-MM-DD","due_date":"or a known due date","conception":"or conception date"},"returns":"due date, conception estimate and fertile window"},{"path":"/v1/gestational-age","params":{"lmp":"or conception / due_date","as_of":"reference date (default today)"},"returns":"gestational age, trimester, days remaining and progress"},{"path":"/v1/milestones","params":{"lmp":"or conception / due_date"},"returns":"the key pregnancy milestone dates"},{"path":"/v1/meta","params":[],"returns":"this document"}],"description":"Pregnancy and due-date maths as an API, using the standard Naegele's rule (40 weeks / 280 days from the last menstrual period). The due-date endpoint takes the last menstrual period, the conception date, or a known due date — whichever you have — and returns the due date, the estimated conception date and the fertile window. The gestational-age endpoint reports how far along a pregnancy is as of any reference date: gestational age in weeks and days, the trimester, days remaining, progress percent, and whether it is overdue. The milestones endpoint lists the key dates of a pregnancy — the trimester boundaries, the anatomy-scan window, viability at 24 weeks, full term at 37–40 weeks, the due date and post-term at 42 weeks. All dates are handled in UTC and computed locally and deterministically. Ideal for pregnancy and fertility apps, midwifery and clinical tools, and parenting and family planning. Pure local computation — no key, no third-party service, instant. Live, nothing stored. Informational only — not medical advice. 4 endpoints. This is date maths; for general date arithmetic use a datetime API."},"meta":{"timestamp":"2026-06-03T17:42:10.751Z","request_id":"9ee2f06b-bb95-4bc6-bd57-7a79c6badea5"},"status":"ok","message":"Meta","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}}},"x-oanor-pricing":[{"slug":"free","name":"Free","price_cents_month":0,"monthly_call_quota":7035,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":855,"monthly_call_quota":16550,"rps_limit":8,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":2845,"monthly_call_quota":216500,"rps_limit":20,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":6645,"monthly_call_quota":1125000,"rps_limit":50,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/pregnancy-api"}