Saptamsa chart (D7 Chart) SVG Image Code
Generate Saptamsa (D7) divisional horoscope charts in SVG format using birth date, time, and geographical details. Visualize planetary placements in the D7 chart to explore children, progeny, parenthood, creativity, and relationships with offspring. Ideal for integrating detailed Vedic divisional chart calculations into astrology applications.
Overview
The D7 Chart SVG API generates a Saptamsa (D7) divisional horoscope chart in scalable vector graphics (SVG) format using an individual's birth date, time, latitude, longitude, and timezone. In Vedic astrology, the Saptamsa chart is derived by dividing each zodiac sign into seven equal parts, resulting in 84 divisions across the zodiac.
The D7 chart is traditionally used to analyze children, progeny, parenthood, and relationships with offspring. Astrologers examine planetary placements in this divisional chart to gain additional insights into matters related to children, the ability to raise a family, and the parent-child relationship. It can also provide insights into creativity and inspiration.
The API supports configuration options such as Ayanamsha selection and observation point, allowing developers to choose between geocentric and topocentric planetary calculations. It also supports English and Telugu languages for generating localized horoscope charts.
The response provides the generated SVG markup, which can be embedded directly into websites, mobile applications, and astrology software. You can also save the SVG output as an image file while retaining its scalability and visual quality.
Request Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
year
|
integer | Yes | Year number, eg: 2023 | 2023 |
month
|
integer | Yes | Month number,with no leading zero | 7 |
date
|
integer | Yes | Day number,with no leading zero | 5 |
hours
|
integer | Yes | Hours number,with no leading zero | 1 |
minutes
|
integer | Yes | Minutes number,with no leading zero | 1 |
seconds
|
integer | Yes | Seconds number, with no leading zero | 0 |
latitude
|
float | Yes | Latitude number, in the range from -90 to 90 | 12.86 |
longitude
|
float | Yes | Longitude number, in the range from -180 to 180 | 123.5 |
timezone
|
float | Yes | Timezone of birth location, eg: 5.5 | 5.5 |
config
|
object | No | Contains optional configuration values | |
ayanamsha
|
string | No | Either "tropical" or "sayana" or "lahiri" | Either "tropical" or "sayana" or "lahiri" |
language
|
string | No | Valid 2 letter ISO 639-1 language code | Either "en" For English or "te" for Telugu or "hi" for Hindi or "ta" for Tamil or "kn" for Kannada or "ml" for Malayalam or "or" for Odia or "gu" for Gujarati or "pa" for Punjabi or "bn" for Bengali or "mr" for Marathi or "as" for Assamese or "ur" for Urdu or "ne" for Nepali |
observation_point
|
string | No | Geocentric positions are calculated with respect to the center of Earth. Topocentric positions are calculated with respect to the actual given place | Either "topocentric" or "geocentric" |
chart_config
|
object | No | Configuration properties of Chart | |
font_family
|
string | No | Font name | Mallana or Roboto |
hide_time_location
|
boolean | No | Whether to write or hide Time and Location information on chart | "True" or "False" |
hide_outer_planets
|
boolean | No | Whether to hide Outer Planets or not | "True" or "False" |
chart_style
|
string | No | Chart Style | "south_india" or "north_india" |
sign_number_font_color
|
string | No | HEX color code to be used for Sign Numbers (works for north_india chart only) | #A5243D |
native_name
|
string | No | Native Name | Mr Ram Charan |
native_name_font_size
|
string | No | Font Size to be used to show Native Name | 20px |
native_details_font_size
|
string | No | Font size to be used to print Native Details | 22px |
chart_border_width
|
integer | No | Border width of Chart | 1 |
planet_name_font_size
|
string | No | Font size to be used to show Planet names | 22px |
chart_heading_font_size
|
string | No | Font Size to be used to show Chart Heading | 25px |
chart_background_color
|
string | No | HEX color code to be used for Chart Background | #FEE1C7 |
chart_border_color
|
string | No | HEX color code to be used for chart borders | #B5A886 |
native_details_font_color
|
string | No | HEX color code to be used to show Native details | #000000 |
native_name_font_color
|
string | No | HEX color code to be uses to show native name | #231F20 |
planet_name_font_color
|
string | No | HEX color code to be used tp show Planet names | #BC412B |
chart_heading_font_color
|
string | No | HEX color code to be used to show Chart Heading | #2D3319 |
Supported Languages
This API endpoint supports the following languages.
Use the corresponding 2-letter language code
in the language parameter when making your request.
| Language | Code |
|---|---|
| English |
en
|
| Telugu |
te
|
| Hindi |
hi
|
| Tamil |
ta
|
| Kannada |
kn
|
| Malayalam |
ml
|
| Odia |
or
|
| Gujarati |
gu
|
| Punjabi |
pa
|
| Bengali |
bn
|
| Marathi |
mr
|
| Assamese |
as
|
| Urdu |
ur
|
| Nepali |
ne
|
To request the response in Telugu, use
te as the language code:
{
"language": "te"
}
Request Example
{
"year": 2024,
"month": 1,
"date": 1,
"hours": 10,
"minutes": 30,
"seconds": 31,
"latitude": 17.38333,
"longitude": 78.4666,
"timezone": 5.5,
"config": {
"observation_point": "topocentric", /* geocentric / topocentric */
"ayanamsha": "lahiri", /* lahiri / sayana */
"language":"te" /* en / te / hi / ta / kn / ml / or / gu / pa / bn / mr / as / ur / ne */
},
"chart_config" : {
"font_family":"Mallanna", /* Mallanna / Roboto */
"hide_time_location":"False", /* True / False */
"hide_outer_planets":"False", /* True / False */
"chart_style":"south_india", /* south_india / north_india */
"sign_number_font_color":"#A5243D",/* works for north_india chart only */
"native_name":"Mr. Ram Charan",
"native_name_font_size": "20px",
"native_details_font_size":"15px",
"chart_border_width":1,
"planet_name_font_size": "20px",
"chart_heading_font_size":"25px",
"chart_background_color":"#FEE1C7",
"chart_border_color":"#B5A886",
"native_details_font_color":"#000",
"native_name_font_color": "#231F20",
"planet_name_font_color": "#BC412B",
"chart_heading_font_color":"#2D3319"
}
}
Response Examples
Example responses returned by this API.
{
"statusCode": 200,
"output": "<svg width=\"400\" height=\"400\" xmlns=\"http://www.w3.org/2000/svg\"><defs><style>@import url('https://fonts.googleapis.com/css2?family=Mallanna&display=swap');</style></defs><g><rect stroke=\"#B5A886\" height=\"400\" width=\"400\" y=\"0\" x=\"0\" stroke-width=\"2\" fill=\"#FEE1C7\"/><line stroke-linecap=\"undefined\" stroke-linejoin=\"undefined\" y2=\"400\" x2=\"100\" y1=\"0\" x1=\"100\" stroke-width=\"1\" stroke=\"#B5A886\" fill=\"none\"/><line stroke-linecap=\"null\" stroke-linejoin=\"null\" y2=\"400\" x2=\"300\" y1=\"0\" x1=\"300\" fill-opacity=\"null\" stroke-opacity=\"null\" stroke-width=\"1\" stroke=\"#B5A886\" fill=\"none\"/><line stroke-linecap=\"null\" stroke-linejoin=\"null\" y2=\"100\" x2=\"400\" y1=\"100\" x1=\"0\" fill-opacity=\"null\" stroke-opacity=\"null\" stroke-width=\"1\" stroke=\"#B5A886\" fill=\"none\"/><line stroke=\"#B5A886\" stroke-linecap=\"null\" stroke-linejoin=\"null\" y2=\"300\" x2=\"400\" y1=\"300\" x1=\"0\" fill-opacity=\"null\" stroke-opacity=\"null\" stroke-width=\"1\" fill=\"none\"/><line stroke=\"#B5A886\" stroke-linecap=\"null\" stroke-linejoin=\"null\" y2=\"100\" x2=\"200\" y1=\"0\" x1=\"200\" fill-opacity=\"null\" stroke-opacity=\"null\" stroke-width=\"1\" fill=\"none\"/><line stroke-linecap=\"null\" stroke-linejoin=\"null\" y2=\"200\" x2=\"100\" y1=\"200\" x1=\"0\" fill-opacity=\"null\" stroke-opacity=\"null\" stroke-width=\"1\" stroke=\"#B5A886\" fill=\"none\"/><line stroke-linecap=\"null\" stroke-linejoin=\"null\" y2=\"200\" x2=\"300\" y1=\"200\" x1=\"400\" fill-opacity=\"null\" stroke-opacity=\"null\" stroke-width=\"1\" stroke=\"#B5A886\" fill=\"none\"/><line stroke-linecap=\"null\" stroke-linejoin=\"null\" y2=\"400\" x2=\"200\" y1=\"300\" x1=\"200\" fill-opacity=\"null\" stroke-opacity=\"null\" stroke-width=\"1\" stroke=\"#B5A886\" fill=\"none\"/><text font-size=\"20px\" x=\"240\" y=\"45\" style=\"fill:#BC412B;\" font-family=\"'Mallanna', sans-serif\">Ju</text><text font-size=\"20px\" x=\"270\" y=\"70\" style=\"fill:#BC412B;\" font-family=\"'Mallanna', sans-serif\">Ra</text><text font-size=\"20px\" x=\"205\" y=\"70\" style=\"fill:#BC412B;\" font-family=\"'Mallanna', sans-serif\">Ur</text><text font-size=\"20px\" x=\"340\" y=\"45\" style=\"fill:#BC412B;\" font-family=\"'Mallanna', sans-serif\">Su</text><text font-size=\"20px\" x=\"370\" y=\"70\" style=\"fill:#BC412B;\" font-family=\"'Mallanna', sans-serif\">Mo</text><text font-size=\"20px\" x=\"305\" y=\"70\" style=\"fill:#BC412B;\" font-family=\"'Mallanna', sans-serif\">Sa</text><text font-size=\"20px\" x=\"340\" y=\"345\" style=\"fill:#BC412B;\" font-family=\"'Mallanna', sans-serif\">Pl</text><text font-size=\"20px\" x=\"240\" y=\"345\" style=\"fill:#BC412B;\" font-family=\"'Mallanna', sans-serif\">Ve</text><text font-size=\"20px\" x=\"140\" y=\"345\" style=\"fill:#BC412B;\" font-family=\"'Mallanna', sans-serif\">Ke</text><text font-size=\"20px\" x=\"170\" y=\"370\" style=\"fill:#BC412B;\" font-family=\"'Mallanna', sans-serif\">Ne</text><text font-size=\"20px\" x=\"40\" y=\"245\" style=\"fill:#BC412B;\" font-family=\"'Mallanna', sans-serif\">Ma</text><text font-size=\"20px\" x=\"70\" y=\"270\" style=\"fill:#BC412B;\" font-family=\"'Mallanna', sans-serif\">Me</text><text font-size=\"20px\" x=\"40\" y=\"45\" style=\"fill:#BC412B;\" font-family=\"'Mallanna', sans-serif\">Asc</text><text font-family=\"'Mallanna', sans-serif\" font-size=\"25px\" style=\"fill:#2D3319;\" x=\"50%\" y=\"30%\" dominant-baseline=\"middle\" text-anchor=\"middle\">Saptamsa D7 Chart</text><text font-family=\"'Mallanna', sans-serif\" font-size=\"20px\" style=\"fill:#231F20;\" x=\"50%\" y=\"50%\" dominant-baseline=\"middle\" text-anchor=\"middle\">Mr. Ram Charan</text><text font-family=\"'Mallanna', sans-serif\" font-size=\"15px\" style=\"fill:#000;\" x=\"50%\" y=\"60%\" dominant-baseline=\"middle\" text-anchor=\"middle\">Nov 20, 1980</text><text font-family=\"'Mallanna', sans-serif\" font-size=\"15px\" style=\"fill:#000;\" x=\"50%\" y=\"65%\" dominant-baseline=\"middle\" text-anchor=\"middle\">15:40:0 (5:30 EAST)</text><text font-family=\"'Mallanna', sans-serif\" font-size=\"15px\" style=\"fill:#000;\" x=\"50%\" y=\"70%\" dominant-baseline=\"middle\" text-anchor=\"middle\">76 E 39, 12 N 18</text></g></svg>"
}
Code Examples
Use the following examples to integrate this API into your application.
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://json.freeastrologyapi.com/d7-chart-svg-code',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"year": 1980,
"month": 11,
"date": 20,
"hours": 15,
"minutes": 40,
"seconds": 0,
"latitude": 12.3,
"longitude": 76.65,
"timezone": 5.5,
"config": {
"observation_point": "topocentric",
"ayanamsha": "lahiri",
"language":"te"
},
"chart_config" : {
"font_family":"Mallanna",
"hide_time_location":"False",
"hide_outer_planets":"False",
"chart_style":"south_india",
"sign_number_font_color":"#A5243D",
"native_name":"Mr. Ram Charan",
"native_name_font_size": "20px",
"native_details_font_size":"15px",
"chart_border_width":1,
"planet_name_font_size": "20px",
"chart_heading_font_size":"25px",
"chart_background_color":"#FEE1C7",
"chart_border_color":"#B5A886",
"native_details_font_color":"#000",
"native_name_font_color": "#231F20",
"planet_name_font_color": "#BC412B",
"chart_heading_font_color":"#2D3319"
}
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'x-api-key: YOUR_API_KEY_HERE'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import requests
import json
url = "https://json.freeastrologyapi.com/d7-chart-svg-code"
payload = json.dumps({
"year": 1980,
"month": 11,
"date": 20,
"hours": 15,
"minutes": 40,
"seconds": 0,
"latitude": 12.3,
"longitude": 76.65,
"timezone": 5.5,
"config": {
"observation_point": "topocentric",
"ayanamsha": "lahiri",
"language": "te"
},
"chart_config": {
"font_family": "Mallanna",
"hide_time_location": "False",
"hide_outer_planets": "False",
"chart_style": "south_india",
"sign_number_font_color": "#A5243D",
"native_name": "Mr. Ram Charan",
"native_name_font_size": "20px",
"native_details_font_size": "15px",
"chart_border_width": 1,
"planet_name_font_size": "20px",
"chart_heading_font_size": "25px",
"chart_background_color": "#FEE1C7",
"chart_border_color": "#B5A886",
"native_details_font_color": "#000",
"native_name_font_color": "#231F20",
"planet_name_font_color": "#BC412B",
"chart_heading_font_color": "#2D3319"
}
})
headers = {
'Content-Type': 'application/json',
'x-api-key': 'YOUR_API_KEY_HERE'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
var request = require('request');
var options = {
'method': 'POST',
'url': 'https://json.freeastrologyapi.com/d7-chart-svg-code',
'headers': {
'Content-Type': 'application/json',
'x-api-key': 'YOUR_API_KEY_HERE'
},
body: JSON.stringify({
"year": 1980,
"month": 11,
"date": 20,
"hours": 15,
"minutes": 40,
"seconds": 0,
"latitude": 12.3,
"longitude": 76.65,
"timezone": 5.5,
"config": {
"observation_point": "topocentric",
"ayanamsha": "lahiri",
"language": "te"
},
"chart_config": {
"font_family": "Mallanna",
"hide_time_location": "False",
"hide_outer_planets": "False",
"chart_style": "south_india",
"sign_number_font_color": "#A5243D",
"native_name": "Mr. Ram Charan",
"native_name_font_size": "20px",
"native_details_font_size": "15px",
"chart_border_width": 1,
"planet_name_font_size": "20px",
"chart_heading_font_size": "25px",
"chart_background_color": "#FEE1C7",
"chart_border_color": "#B5A886",
"native_details_font_color": "#000",
"native_name_font_color": "#231F20",
"planet_name_font_color": "#BC412B",
"chart_heading_font_color": "#2D3319"
}
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});