Death Clock API

The Death Clock API predicts your life expectancy based on your date of birth, gender, and smoking status.

Base URL

"https://openapi-idk8.onrender.com"

Endpoints

  • GET /deathclock: Predicts life expectancy and remaining time based on provided parameters.

GET /deathclock

Predicts life expectancy and remaining time based on provided parameters.

Query Parameters

  • dateOfBirth (string): The date of birth in YYYY-MM-DD format. This parameter is required.
  • gender (string): The gender of the individual. Accepted values are 'male' or 'female'. This parameter is required.
  • doYouSmoke (string): Smoking status. Accepted values are 'yes' or 'no'. This parameter is required.

Sample Request

GET "https://openapi-idk8.onrender.com/deathclock?dateOfBirth=1990-01-01&gender=male&doYouSmoke=no"

Sample Response

{
  "api_name": "Death Clock",
  "description": "Death Clock Calculator - Predict Your Life Expectancy",
  "author": "OpenAPI",
  "note": "Awareness of your own mortality, can have a profound impact on your life. Use the results of the 'Death Clock' to inspire you to live life to the fullest and passionately. Start making unforgettable memories, and seize every opportunity that comes your way.",
  "predictedDeathYear": 2075,
  "Seconds Left to Live": "1,729,536,000",
  "Minutes left to live": "28,825,600",
  "Hours left to live": "480,426"
}

Error Handling

If there is an error or a required parameter is missing or invalid, the API responds with an appropriate error message and status code.

Additional Information

The API calculates the predicted death year based on average life expectancy, adjusted for smoking status, and provides the remaining time in seconds, minutes, and hours.