{"openapi":"3.1.0","info":{"title":"theAsianparent India — parenting tools","version":"1.0.0","summary":"Keyless, read-only parenting calculators. No approval needed.","description":"No site-owner approval, account, or API key is required for these public, read-only tools.\n\nWhat this permission does not cover:\n- Nothing involving private data. We hold almost none: the tools run in the reader's browser and we do not have their inputs.\n- Nothing involving payments. There is nothing to buy here.\n- Nothing that changes account state. There are no accounts on this site.\n- Nothing about your obligations to your own human. We are not your principal and this grant does not speak for them.\n\nFair use: 60 requests per minute per IP address. Exceeding it returns 429 with Retry-After; nothing is blocked and no approval is needed to continue.\nCounted in fixed one-minute windows rather than a sliding one, so a burst landing either side of a boundary can get through about twice that before the first 429. We would rather say so than publish a tidier number.\n\nPOST is recommended. GET is accepted, but GET inputs appear in the URL and so in hosting, CDN and error logs.\n\nFull terms in prose: https://in.theasianparent.com/for-agents","termsOfService":"https://in.theasianparent.com/for-agents","contact":{"name":"theAsianparent India","url":"https://in.theasianparent.com/for-agents"},"license":{"name":"Free to use and cite, with attribution requested","url":"https://in.theasianparent.com/for-agents"}},"servers":[{"url":"https://in.theasianparent.com/api/v1","description":"Production"}],"externalDocs":{"url":"https://in.theasianparent.com/for-agents","description":"For AI agents — the permission in prose"},"paths":{"/":{"get":{"operationId":"listTools","summary":"Discover every tool, the permission and the fair-use limit.","responses":{"200":{"description":"Tool index.","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/due-date":{"post":{"operationId":"dueDatePost","summary":"Estimated due date, current gestational age and scan windows from the last menstrual period.","description":"Estimated due date, current gestational age and scan windows from the last menstrual period.\n\nAssumes:\n- Naegele's rule: due date is the last menstrual period plus 280 days.\n- A cycle-length correction is applied, so a 32-day cycle moves the estimate four days later than a 28-day one.\n- Gestational age is counted from the last menstrual period, not from conception.\n\nDoes not assume:\n- No ultrasound dating. A first-trimester scan is more accurate than any LMP calculation and overrides it.\n- No adjustment for IVF transfer dates — use the ivf-due-date tool page for that.\n- This is not a clinical determination of term or post-term status.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"last_period":{"type":"string","description":"First day of the last menstrual period, YYYY-MM-DD.","examples":["2026-03-14"],"format":"date"},"cycle_length":{"type":"integer","description":"Usual cycle length in days, 20 to 45. Defaults to 28.","examples":[28]},"on":{"type":"string","description":"Date to compute gestational age at, YYYY-MM-DD. Defaults to today.","examples":["2026-10-01"]},"lang":{"type":"string","enum":["en","hi","ta","mr"],"description":"Which language's page_url to return for the human. Defaults to en."},"agent":{"type":"string","maxLength":120,"description":"Optional. A name for your agent, recorded with the request for capacity planning. Not a credential, grants nothing, and omitting it changes no behaviour or limit."}},"required":["last_period"],"additionalProperties":true},"examples":{"worked":{"summary":"A worked example","value":{"last_period":"2026-03-14","cycle_length":28}}}}}},"responses":{"200":{"description":"The calculation, with its provenance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"400":{"description":"A field was missing or malformed. The body names the field and links the docs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No tool called due-date. The body lists the tools that do exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fair-use limit reached. Carries Retry-After; no approval is needed to continue.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"dueDateGet","summary":"Estimated due date, current gestational age and scan windows from the last menstrual period. (GET; prefer POST so inputs stay out of logs.)","parameters":[{"name":"last_period","in":"query","required":true,"description":"First day of the last menstrual period, YYYY-MM-DD.","schema":{"type":"string"},"example":"2026-03-14"},{"name":"cycle_length","in":"query","required":false,"description":"Usual cycle length in days, 20 to 45. Defaults to 28.","schema":{"type":"integer"},"example":28},{"name":"on","in":"query","required":false,"description":"Date to compute gestational age at, YYYY-MM-DD. Defaults to today.","schema":{"type":"string"},"example":"2026-10-01"},{"name":"lang","in":"query","required":false,"schema":{"type":"string","enum":["en","hi","ta","mr"]}},{"name":"agent","in":"query","required":false,"schema":{"type":"string","maxLength":120}}],"responses":{"200":{"description":"The calculation, with its provenance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"400":{"description":"A field was missing or malformed. The body names the field and links the docs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No tool called due-date. The body lists the tools that do exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fair-use limit reached. Carries Retry-After; no approval is needed to continue.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/ovulation":{"post":{"operationId":"ovulationPost","summary":"Fertile window, ovulation date and next period from the last period and cycle length.","description":"Fertile window, ovulation date and next period from the last period and cycle length.\n\nAssumes:\n- A luteal phase of 14 days, so ovulation is the next period minus 14 days.\n- A fertile window of 6 days ending on the ovulation date, inclusive of both ends.\n- A regular cycle of the stated length.\n\nDoes not assume:\n- This is NOT contraception. The window is a statistical estimate and conception outside it is common.\n- No basal temperature, no LH test, no cervical mucus — none of which this endpoint takes.\n- Irregular cycles are not modelled; the estimate assumes the cycle length given is typical.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"last_period":{"type":"string","description":"First day of the last period, YYYY-MM-DD.","examples":["2026-09-10"],"format":"date"},"cycle_length":{"type":"integer","description":"Usual cycle length in days, 20 to 45. Defaults to 28.","examples":[28]},"lang":{"type":"string","enum":["en","hi","ta","mr"],"description":"Which language's page_url to return for the human. Defaults to en."},"agent":{"type":"string","maxLength":120,"description":"Optional. A name for your agent, recorded with the request for capacity planning. Not a credential, grants nothing, and omitting it changes no behaviour or limit."}},"required":["last_period"],"additionalProperties":true},"examples":{"worked":{"summary":"A worked example","value":{"last_period":"2026-09-10","cycle_length":28}}}}}},"responses":{"200":{"description":"The calculation, with its provenance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"400":{"description":"A field was missing or malformed. The body names the field and links the docs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No tool called ovulation. The body lists the tools that do exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fair-use limit reached. Carries Retry-After; no approval is needed to continue.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"ovulationGet","summary":"Fertile window, ovulation date and next period from the last period and cycle length. (GET; prefer POST so inputs stay out of logs.)","parameters":[{"name":"last_period","in":"query","required":true,"description":"First day of the last period, YYYY-MM-DD.","schema":{"type":"string"},"example":"2026-09-10"},{"name":"cycle_length","in":"query","required":false,"description":"Usual cycle length in days, 20 to 45. Defaults to 28.","schema":{"type":"integer"},"example":28},{"name":"lang","in":"query","required":false,"schema":{"type":"string","enum":["en","hi","ta","mr"]}},{"name":"agent","in":"query","required":false,"schema":{"type":"string","maxLength":120}}],"responses":{"200":{"description":"The calculation, with its provenance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"400":{"description":"A field was missing or malformed. The body names the field and links the docs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No tool called ovulation. The body lists the tools that do exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fair-use limit reached. Carries Retry-After; no approval is needed to continue.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/weeks-to-months":{"post":{"operationId":"weeksToMonthsPost","summary":"Convert a pregnancy week to its month and trimester, or a month to its week range.","description":"Convert a pregnancy week to its month and trimester, or a month to its week range.\n\nAssumes:\n- The antenatal month table hospitals use, where months are 4 to 5 weeks and do not divide evenly: month 1 is weeks 1-4, month 5 is weeks 18-22, month 9 is weeks 36-40.\n- Trimesters: 1-13, 14-27, 28 onward.\n\nDoes not assume:\n- Not calendar months. A pregnancy 'month' is not 30 or 31 days.\n- Weeks 41 and 42 remain the ninth month and third trimester rather than becoming a tenth month.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"week":{"type":"integer","description":"Gestational week, 1 to 42. Give either week or month.","examples":[20]},"month":{"type":"integer","description":"Pregnancy month, 1 to 9. Give either week or month.","examples":[5]},"lang":{"type":"string","enum":["en","hi","ta","mr"],"description":"Which language's page_url to return for the human. Defaults to en."},"agent":{"type":"string","maxLength":120,"description":"Optional. A name for your agent, recorded with the request for capacity planning. Not a credential, grants nothing, and omitting it changes no behaviour or limit."}},"required":[],"additionalProperties":true},"examples":{"worked":{"summary":"A worked example","value":{}}}}}},"responses":{"200":{"description":"The calculation, with its provenance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"400":{"description":"A field was missing or malformed. The body names the field and links the docs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No tool called weeks-to-months. The body lists the tools that do exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fair-use limit reached. Carries Retry-After; no approval is needed to continue.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"weeksToMonthsGet","summary":"Convert a pregnancy week to its month and trimester, or a month to its week range. (GET; prefer POST so inputs stay out of logs.)","parameters":[{"name":"week","in":"query","required":false,"description":"Gestational week, 1 to 42. Give either week or month.","schema":{"type":"integer"},"example":20},{"name":"month","in":"query","required":false,"description":"Pregnancy month, 1 to 9. Give either week or month.","schema":{"type":"integer"},"example":5},{"name":"lang","in":"query","required":false,"schema":{"type":"string","enum":["en","hi","ta","mr"]}},{"name":"agent","in":"query","required":false,"schema":{"type":"string","maxLength":120}}],"responses":{"200":{"description":"The calculation, with its provenance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"400":{"description":"A field was missing or malformed. The body names the field and links the docs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No tool called weeks-to-months. The body lists the tools that do exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fair-use limit reached. Carries Retry-After; no approval is needed to continue.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"Envelope":{"type":"object","description":"Every 200 carries provenance: which versions produced it, what was assumed, where to send the human, and the terms.","required":["ok","tool","result","version","method","page_url","terms"],"properties":{"ok":{"const":true},"tool":{"type":"string"},"result":{"type":"object"},"version":{"type":"object","required":["api","data","method"],"properties":{"api":{"type":"string","description":"This API. Currently 1.0.0."},"data":{"type":"string","description":"The tool's contract version, bumped when the shape or the maths changes."},"method":{"type":"string","description":"The calculation version."},"implementation":{"const":"shared-with-website","description":"The same code the website's own pages run."}}},"method":{"type":"object","required":["assumed","not_assumed"],"properties":{"assumed":{"type":"array","items":{"type":"string"}},"not_assumed":{"type":"array","items":{"type":"string"}}}},"page_url":{"type":"string","format":"uri","description":"Give this to the person so they can see the working."},"page_urls":{"type":"object","description":"The same page in each published language."},"terms":{"type":"object","properties":{"permission":{"type":"string"},"fair_use":{"type":"string"},"details":{"type":"string","format":"uri"},"privacy":{"type":"string","format":"uri"}}},"agent_recorded":{"type":["string","null"],"description":"The agent label we recorded, echoed back."}}},"Error":{"type":"object","required":["ok","error"],"properties":{"ok":{"const":false},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["invalid_input","unknown_tool","rate_limited","server_error"]},"field":{"type":"string","description":"Which field was wrong."},"message":{"type":"string"},"docs":{"type":"string","format":"uri"},"retry_after_seconds":{"type":"integer"}}}}}}},"x-fair-use":{"requests":60,"per_seconds":60,"scope":"per IP address","window":"fixed","window_note":"Counted in fixed one-minute windows rather than a sliding one, so a burst landing either side of a boundary can get through about twice that before the first 429. We would rather say so than publish a tidier number.","on_exceed":"429 with Retry-After; no approval needed to continue"},"x-privacy":{"inputs_stored":false,"note":"Inputs are not recorded. Which field NAMES were supplied is logged, with the User-Agent and any agent label, never the values. GET puts values in the URL, where hosting, CDN and error logs will see them; POST does not.","privacy_policy":"https://in.theasianparent.com/en/about/privacy-policy"}}