Flying Star Grid SVG API
The flying star chart drawn as a nine-palace grid in SVG, south at the top
POST/v1/feng-shui/flying-stars.svg
2 credits · Secret key (test or live) · getFlyingStarsSvg
Request body
facing_degreesnumber requiredThe bearing the building faces, in degrees from magnetic north, as a luopan reads it.
≥ 0 · < 360
periodintegerPeriod 9 runs from Li Chun 2024 to Li Chun 2044.
≥ 1 · ≤ 9
built_yearinteger≥ 1864 · ≤ 2100
themestringone of
light,dark· default"light"optionsobjectlangstring requiredone of
en,hi· default"en"
No other fields are accepted.
No other fields are accepted.
Response
image/svg+xml
Errors: 400, 401, 403, 404, 422, 429, 500. See error codes.
Example request
curl -X POST 'https://api.astrologics.in/v1/feng-shui/flying-stars.svg' \
-H 'Authorization: Bearer al_test_YOUR_KEY' \
-H 'Content-Type: application/json' \
-d '{"facing_degrees":180,"period":9}'
Node.js
const res = await fetch("https://api.astrologics.in/v1/feng-shui/flying-stars.svg", {
method: "POST",
headers: { Authorization: "Bearer al_test_YOUR_KEY", "Content-Type": "application/json" },
body: JSON.stringify({
"facing_degrees": 180,
"period": 9
}),
});
console.log(await res.text());Python
import json
import urllib.error
import urllib.request
body = {
"facing_degrees": 180,
"period": 9,
}
req = urllib.request.Request(
"https://api.astrologics.in/v1/feng-shui/flying-stars.svg",
method="POST",
headers={"Authorization": "Bearer al_test_YOUR_KEY", "Content-Type": "application/json"},
data=json.dumps(body).encode(),
)
try:
with urllib.request.urlopen(req) as res:
print(res.read().decode())
except urllib.error.HTTPError as err:
print(err.code, err.read().decode())PHP
<?php
$ch = curl_init('https://api.astrologics.in/v1/feng-shui/flying-stars.svg');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => ['Authorization: Bearer al_test_YOUR_KEY', 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => '{"facing_degrees":180,"period":9}',
CURLOPT_RETURNTRANSFER => true,
]);
echo curl_exec($ch), PHP_EOL;Example response
Try it
More in Feng Shui
- Kua Number API: A person's Kua number, East or West group and eight directions
- Feng Shui House Gua API: A building's gua from its facing, its eight mansions, and how it fits an occupant's Kua
- Flying Star Chart API: A Xuan Kong flying star chart: base, mountain and water stars in all nine palaces, and its structure
- Annual Flying Stars API: A year's flying stars, Five Yellow, Tai Sui, Sui Po and San Sha, with the twelve monthly charts