Navamsa Chart (D9 chart) SVG Image Code
Generate Navamsa (D9) horoscope charts in SVG format using birth date, time, and geographical details. Customize North Indian or South Indian chart layouts, language, fonts, colors, planetary labels, and native details to create beautiful, scalable Navamsa charts for your astrology applications.
Overview
The Navamsa Chart SVG API generates a Navamsa (D9) divisional horoscope chart in scalable vector graphics (SVG) format using an individual's birth date, time, latitude, longitude, and timezone. In Vedic astrology, the Navamsa chart is derived by dividing each zodiac sign into nine equal parts and is widely used for detailed horoscope analysis, particularly in matters related to marriage, relationships, and planetary strength.
The API supports both North Indian and South Indian chart layouts. Developers can customize the chart appearance using options for font family, font sizes, background color, border color, planet name colors, chart heading, and native details. You can also choose whether to display birth time and location information or outer planets on the chart.
The API supports multiple languages, including English, Telugu, Hindi, Tamil, Kannada, Malayalam, and other Indian languages. Additional configuration options allow you to select the Ayanamsha system and choose between geocentric and topocentric planetary positions.
The response contains the generated SVG markup in the output field. You can use this SVG code directly in your application, save it as an SVG file, or embed it into an HTML page to display a high-quality, scalable Navamsa chart.
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=Roboto:wght@300&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=\"140\" y=\"45\" style=\"fill:#BC412B;\" font-family=\"Roboto\">Ma</text><text font-size=\"20px\" x=\"340\" y=\"145\" style=\"fill:#BC412B;\" font-family=\"Roboto\">Ju</text><text font-size=\"20px\" x=\"370\" y=\"170\" style=\"fill:#BC412B;\" font-family=\"Roboto\">Ne</text><text font-size=\"20px\" x=\"340\" y=\"245\" style=\"fill:#BC412B;\" font-family=\"Roboto\">Su</text><text font-size=\"20px\" x=\"370\" y=\"270\" style=\"fill:#BC412B;\" font-family=\"Roboto\">Mo</text><text font-size=\"20px\" x=\"340\" y=\"345\" style=\"fill:#BC412B;\" font-family=\"Roboto\">Ve</text><text font-size=\"20px\" x=\"370\" y=\"370\" style=\"fill:#BC412B;\" font-family=\"Roboto\">Ke</text><text font-size=\"20px\" x=\"140\" y=\"345\" style=\"fill:#BC412B;\" font-family=\"Roboto\">(Ur)</text><text font-size=\"20px\" x=\"40\" y=\"345\" style=\"fill:#BC412B;\" font-family=\"Roboto\">Sa</text><text font-size=\"20px\" x=\"40\" y=\"145\" style=\"fill:#BC412B;\" font-family=\"Roboto\">Asc</text><text font-size=\"20px\" x=\"70\" y=\"170\" style=\"fill:#BC412B;\" font-family=\"Roboto\">Pl</text><text font-size=\"20px\" x=\"40\" y=\"45\" style=\"fill:#BC412B;\" font-family=\"Roboto\">(Me)</text><text font-size=\"20px\" x=\"70\" y=\"70\" style=\"fill:#BC412B;\" font-family=\"Roboto\">Ra</text><text font-family=\"Roboto\" font-size=\"25px\" style=\"fill:#2D3319;\" x=\"50%\" y=\"30%\" dominant-baseline=\"middle\" text-anchor=\"middle\">Navamsa Chart</text><text font-family=\"Roboto\" font-size=\"20px\" style=\"fill:#231F20;\" x=\"50%\" y=\"50%\" dominant-baseline=\"middle\" text-anchor=\"middle\">Mr. Ram Charan</text><text font-family=\"Roboto\" font-size=\"15px\" style=\"fill:#000;\" x=\"50%\" y=\"60%\" dominant-baseline=\"middle\" text-anchor=\"middle\">Jan 1, 2024</text><text font-family=\"Roboto\" font-size=\"15px\" style=\"fill:#000;\" x=\"50%\" y=\"65%\" dominant-baseline=\"middle\" text-anchor=\"middle\">10:30:31 (5:30 EAST)</text><text font-family=\"Roboto\" font-size=\"15px\" style=\"fill:#000;\" x=\"50%\" y=\"70%\" dominant-baseline=\"middle\" text-anchor=\"middle\">78 E 28, 17 N 23</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/navamsa-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": 2024,
"month": 1,
"date": 1,
"hours": 10,
"minutes": 30,
"seconds": 31,
"latitude": 17.38333,
"longitude": 78.4666,
"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/navamsa-chart-svg-code"
payload = json.dumps({
"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",
"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/navamsa-chart-svg-code',
'headers': {
'Content-Type': 'application/json',
'x-api-key': 'YOUR_API_KEY_HERE'
},
body: JSON.stringify({
"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",
"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);
});