Copy page
Copy page as Markdown for LLMs
The Love Calculator API calculates a compatibility percentage between two individuals based on their names and (optionally) gender. It uses name-matching algorithms and vibrational numerology to determine relationship harmony, providing an easy and engaging way for apps or websites to display love compatibility results.
POST https://astroapi-7.divineapi.com/calculator/v1/love-calculator
Returns Love Percentage in response.
| Name | Type | Description |
|---|---|---|
| Authorization* | String | Your API Access Token. Example: Bearer {token} |
| Name | Type | Description |
|---|---|---|
| api_key* | String | Your API key obtained from the DivineAPI dashboard. |
| your_name* | String | Full name of the first person. Example: Rahul kumar. |
| your_gender | String | Gender of the first person. Example: male. |
| partner_name* | String | Full name of the partner. Example: Rita kumari. |
| partner_gender | String | Gender of the partner. Example: female. |
{
"status": "success",
"code": 200,
"message": "Calculation was successful",
"data": {
"compatibility_percentage": 25
}
}
Below are examples of how you might call this API using different programming languages and environments.
curl --location 'https://astroapi-7.divineapi.com/calculator/v1/love-calculator' \
--header 'Authorization: Bearer {Your Auth Token}' \
--form 'api_key="{Your API Key}"' \
--form 'your_name="Rahul kumar"' \
--form 'your_gender="male"' \
--form 'partner_name="Rita kumari"' \
--form 'your_gender="female"' var request = require('request');
var options = {
'method': 'POST',
'url': 'https://astroapi-7.divineapi.com/calculator/v1/love-calculator',
'headers': {
'Authorization': 'Bearer {Your Auth Token}'
},
formData: {
'api_key': '{Your API Key}',
'your_name': 'Rahul kumar',
'your_gender': 'male',
'partner_name': 'Rita kumari',
'partner_gender': 'female'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
var form = new FormData();
form.append("api_key", "{Your API Key}");
form.append("your_name", "Rahul kumar");
form.append("your_gender", "male");
form.append("partner_name", "Rita kumari");
form.append("partner_gender", "female");
var settings = {
"url": "https://astroapi-7.divineapi.com/calculator/v1/love-calculator",
"method": "POST",
"timeout": 0,
"headers": {
"Authorization": "Bearer {Your Auth Token}"
},
"processData": false,
"mimeType": "multipart/form-data",
"contentType": false,
"data": form
};
$.ajax(settings).done(function (response) {
console.log(response);
})import requests
url = "https://astroapi-7.divineapi.com/calculator/v1/love-calculator"
payload = {'api_key': '{Your API Key}',
'your_name': 'Rahul kumar',
'your_gender': 'male',
'partner_name: 'Rita kumari',
'partner_gender: 'female'
}
headers = {
'Authorization': 'Bearer {Your Auth Token}'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
Input Formatting:
Ensure both your_name and partner_name fields are strings containing full names for accurate compatibility analysis.
Optional Genders:
Gender inputs (your_gender and partner_gender) are optional but improve result accuracy when provided.
Response Handling:
The returned compatibility_percentage is a numerical value ranging from 0 to 100, ideal for visualization in love meters or progress bars.
Use Case Integration:
Suitable for astrology platforms, relationship apps, or interactive entertainment sites looking to add love or compatibility calculators.