API
Pregnancy Calculator API
Welcome to the Pregnancy Calculator API! This API provides endpoints for calculating various aspects related to pregnancy, including the Fertility Window, Pregnancy Due Date, Pregnancy Week, and Pregnancy Weight Recommendation. With this API, you can easily integrate these calculations into your applications, websites, or any other projects.
The API caters to a wide range of programming languages, including but not limited to: C, Clojure, C#, GO, Java, JavaScript, Kotlin, Node.js, Objective-C, OCaml, PHP, PowerShell, Python, R, RapidQL, Ruby, Shell, and Swift.
Introduction
API Overview
This API provides essential endpoints for determining the Fertility Window, Pregnancy Due Date, Pregnancy Week, and Pregnancy Weight Recommendations. Perfect for integrating into health and wellness applications, websites, or any project supporting expectant mothers, this API offers valuable insights and tracking capabilities throughout the pregnancy journey.
Key Features:
Fertility Window Calculation: Calculates the fertility window based on cycle length and menstrual cycle start date, providing helpful insights for those planning pregnancy.
Pregnancy Due Date Prediction: Estimates the expected due date based on the last menstrual period or conception date, supporting confident planning and preparation.
Pregnancy Week Estimation: Estimates the current pregnancy week, based on either the last menstrual period or conception date, enabling users to track progress and milestones.
Pregnancy Weight Recommendation: Provides recommended pregnancy weight range, taking into account pre-pregnancy weight, height, and current gestational age for informed, healthy weight management.
Additional Highlights:
User-Friendly: Designed for easy integration into websites, apps, and platforms.
Accurate & Reliable: High precision in all calculations for trustworthy results.
Developer-Friendly: Simple integration with detailed documentation.
Comprehensive: Covers a range of pregnancy-related calculations for a well-rounded solution.
Endpoints
Endpoints Overview
Fertility Window
Calculates the fertility window based on cycle length and menstrual cycle start date, providing helpful insights for those planning pregnancy.
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
cycle_length | int | Yes | The length of the menstrual cycle in days. |
menstrual_date | string | Yes | The date of the first day of the last menstrual period in the format 'YYYY-MM-DD'. |
Python Requests Example:
import requests url = "https://pregnancy-calculator-api.p.rapidapi.com/fw" querystring = {"cycle_length":"28","menstrual_date":"2024-09-11"} headers = { "x-rapidapi-key": "Sign Up for Key", "x-rapidapi-host": "pregnancy-calculator-api.p.rapidapi.com" } response = requests.get(url, headers=headers, params=querystring) print(response.json())
Response Example:
{ "fertility_window_end":"Sun, 29 Sep 2024 00:00:00 GMT", "fertility_window_start":"Fri, 20 Sep 2024 00:00:00 GMT" }
Pregnancy Due Date / Last Menstrual Period (LMP)
Calculates the estimated due date based on the user's last menstrual period (LMP)
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
last_period_date | string | Yes | The date of the user's last menstrual period in the format 'YYYY-MM-DD'. |
cycle_length | string | Yes | The average length of the user's menstrual cycle in days. |
Python Requests Example:
import requests url = "https://pregnancy-calculator-api.p.rapidapi.com/dd/lmp" querystring = {"last_period_date":"2024-09-11","cycle_length":"28"} headers = { "x-rapidapi-key": "Sign Up for Key", "x-rapidapi-host": "pregnancy-calculator-api.p.rapidapi.com" } response = requests.get(url, headers=headers, params=querystring) print(response.json())
Response Example:
{ "due_date": "2025-07-16", "gestational_age": "-260 days", "trimester": "first trimester" }
Pregnancy Due Date / Conception Date
Calculates the estimated due date based on the user's conception date.
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
conception_date | string | Yes | The date of conception in the format 'YYYY-MM-DD' |
Python Requests Example:
import requests url = "https://pregnancy-calculator-api.p.rapidapi.com/dd/conception" querystring = {"conception_date":"2023-05-01"} headers = { "x-rapidapi-key": "Sign Up for Key", "x-rapidapi-host": "pregnancy-calculator-api.p.rapidapi.com" } response = requests.get(url, headers=headers, params=querystring) print(response.json())
Response Example:
{ "due_date": "2024-01-22", "gestational_age": "281 days", "trimester": "third trimester" }
Pregnancy Week / Last Menstrual Period (LMP)
Calculates the current week of pregnancy based on the Last Menstrual Period (LMP).
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
last_period_date | string | Yes | The date of the user's last menstrual period in the format 'YYYY-MM-DD'. |
cycle_length | string | Yes | The average length of the user's menstrual cycle in days. |
Python Requests Example:
import requests url = "https://pregnancy-calculator-api.p.rapidapi.com/pw/lmp" querystring = {"last_period_date":"2024-10-11","cycle_length":"28"} headers = { "x-rapidapi-key": "Sign Up for Key", "x-rapidapi-host": "pregnancy-calculator-api.p.rapidapi.com" } response = requests.get(url, headers=headers, params=querystring) print(response.json())
Response Example:
{ "common_symptoms": "By 6 weeks, morning sickness may worsen, and food cravings or aversions can develop.", "current_day": 4, "current_week": 6, "fetal_development": "At 6 weeks, the embryo's facial features start forming, and limb buds appear.", "milestones": "By week 4 to 7, the embryo implants itself into the uterus lining." }
Pregnancy Week / Conception Date
Calculates the estimated due date based on the user's conception date.
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
conception_date | string | Yes | The date of conception in the format 'YYYY-MM-DD' |
Python Requests Example:
import requests url = "https://pregnancy-calculator-api.p.rapidapi.com/pw/conception" querystring = {"conception_date":"2024-09-11"} headers = { "x-rapidapi-key": "Sign Up for Key", "x-rapidapi-host": "pregnancy-calculator-api.p.rapidapi.com" } response = requests.get(url, headers=headers, params=querystring) print(response.json())
Response Example:
{ "common_symptoms": "By 4 weeks, symptoms can include nausea (morning sickness) and frequent urination.", "current_day": 6, "current_week": 4, "fetal_development": "At 4 weeks, the embryo is about the size of a poppy seed and has a primitive circulatory system.", "milestones": "By week 4 to 7, the embryo implants itself into the uterus lining." }
Pregnancy Weight Recommendation
Calculates the recommended weight during pregnancy based on the user's pre-pregnancy weight, height, and current gestational age.
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
pre_pregnancy_weight | int | Yes | The user's pre-pregnancy weight in kilograms (kg). |
height | int | Yes | The user's height in meters (m). |
gestational_age | int | Yes | The current gestational age in weeks. |
Python Requests Example:
import requests url = "https://pregnancy-calculator-api.p.rapidapi.com/pwr" querystring = {"pre_pregnancy_weight":"60","height":"1.65","gestational_age":"20"} headers = { "x-rapidapi-key": "Sign Up for Key", "x-rapidapi-host": "pregnancy-calculator-api.p.rapidapi.com" } response = requests.get(url, headers=headers, params=querystring) print(response.json())
Response Example:
{
"recommendation_type": "weight_gain",
"recommended_weight_change": "7.0 kg"
}
Subscribe to Pregnancy Calculator API
Subscribe to Pregnancy Calculator API
Subscribe to Pregnancy Calculator API
Subscribe to Pregnancy Calculator API