API reference / Utilities
Utilities
Languages, place search, time-zone resolution and quick sign finders.
7 endpoints. Every endpoint is POST with a JSON body and your key in the Authorization header. Request schemas and examples come from the OpenAPI document; each example response was captured from the live engine and its data fields are a guide to the shape, not a contract.
Find Ascendant
POSTAvailable
https://api.96astro.com/v1/utilities/find-ascendantRising sign, degree, nakshatra and pada with its KP sign, star and sub lords for a date, time and place, plus the planets' sidereal positions at that moment.
- Credits
- 1 credit
- Input
- Birth details
- Output
- JSON
- Delivery
- Direct response
- Languages
- English; translated term names with
labels
| Header | Value and description |
|---|---|
AuthorizationRequired | Bearer YOUR_API_KEYYour sandbox (sk_test_...) or live (sk_live_...) key. X-API-Key: <key> is accepted instead. |
Content-TypeRequired | application/jsonThe body is JSON. |
Idempotency-KeyOptional | <unique string>Makes retries safe: a repeated key with the same body replays the stored response and is never charged twice. (1 to 200 characters) |
| Field | Description |
|---|---|
datetimestringRequired | Local date and time, ISO 8601 without offset, e.g. 1990-10-18T14:30:00 Limits: format local-date-time, pattern ^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(:\d{2}(\.\d{1,6})?)?$ Example: |
timezonestring | nullOptional | IANA time zone, e.g. Asia/Kolkata Default: Example: |
utc_offsetstring | nullOptional | Fixed offset such as +05:30, if no IANA zone is known Default: |
latitudenumberRequired | Limits: minimum -90, maximum 90 Example: |
longitudenumberRequired | Limits: minimum -180, maximum 180 Example: |
ayanamshastringOptional | Default: |
languagestringOptional | Output language (ISO 639-1). The values listed are the ones this capability supports; any other is refused with 422 unsupported_language. Identifiers, enum values and numbers never change with language. Default: Allowed value: en |
labelsstringOptional | Optional. Adds `meta.labels`: translated display names for the identifiers in the answer. `data` is unchanged. Free. Any other code is refused with 422 unsupported_language. Allowed values: asbndeesfrguhiitknkomlmrnenlorpaplptrusitatetrur |
Response · fields in data
Inferred from the example response: a guide to the shape, not a contract.
ayanamsha· stringascendant· objectkp· objectplanets· array of object
Example request
curl -X POST https://api.96astro.com/v1/utilities/find-ascendant \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"datetime": "1990-10-18T14:30:00",
"timezone": "Asia/Kolkata",
"latitude": 28.6139,
"longitude": 77.209
}'const response = await fetch("https://api.96astro.com/v1/utilities/find-ascendant", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
"datetime": "1990-10-18T14:30:00",
"timezone": "Asia/Kolkata",
"latitude": 28.6139,
"longitude": 77.209
}),
});
const { data, meta } = await response.json();
console.log(data);import { Astro96Client } from "@96astro/api";
const astro = new Astro96Client({ apiKey: "YOUR_API_KEY" });
const { data, meta } = await astro.utilities.findAscendant({
"datetime": "1990-10-18T14:30:00",
"timezone": "Asia/Kolkata",
"latitude": 28.6139,
"longitude": 77.209
});
console.log(data);import requests
response = requests.post(
"https://api.96astro.com/v1/utilities/find-ascendant",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
json={
"datetime": "1990-10-18T14:30:00",
"timezone": "Asia/Kolkata",
"latitude": 28.6139,
"longitude": 77.209,
},
timeout=60,
)
response.raise_for_status()
data = response.json()["data"]
print(data)from astro96_api import Astro96Client
astro = Astro96Client(api_key="YOUR_API_KEY")
res = astro.utilities.find_ascendant({
"datetime": "1990-10-18T14:30:00",
"timezone": "Asia/Kolkata",
"latitude": 28.6139,
"longitude": 77.209,
})
print(res.data)<?php
$ch = curl_init('https://api.96astro.com/v1/utilities/find-ascendant');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_API_KEY',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'datetime' => '1990-10-18T14:30:00',
'timezone' => 'Asia/Kolkata',
'latitude' => 28.6139,
'longitude' => 77.209,
]),
]);
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);
print_r($result['data']);package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"datetime": "1990-10-18T14:30:00",
"timezone": "Asia/Kolkata",
"latitude": 28.6139,
"longitude": 77.209
}`)
req, err := http.NewRequest("POST", "https://api.96astro.com/v1/utilities/find-ascendant", body)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(res.Status, string(out))
}Example response
{
"data": {
"ayanamsha": "lahiri",
"ascendant": {
"sign": "Capricorn",
"sign_number": 10,
"sign_lord": "Saturn",
"element": "Earth",
"modality": "Cardinal",
"degree": 23.8935,
"degree_dms": "23° 53' 36\"",
"longitude": 293.8935,
"nakshatra": "Dhanishta",
"nakshatra_lord": "Mars",
"pada": 1
},
"kp": {
"sign_lord": "SAT",
"star_lord": "MAR",
"sub_lord": "MAR"
…Captured from the live engine with a sandbox key (so credits_used is 0) and trimmed: long arrays keep their first items.
Error responses
- 400invalid_request
- 401invalid_key, expired_key
- 402payment_required
- 403account_suspended
- 404not_found
- 409idempotency_conflict
- 413payload_too_large
- 422invalid_request, unsupported_language
- 429rate_limited, quota_exhausted, spend_cap_reached, project_budget_exceeded
- 500computation_failed
- 502unavailable
- 503unavailable
- 504deadline_exceeded
Errors are never charged. What each status means and what to do: errors.
Find Moon Sign
POSTAvailable
https://api.96astro.com/v1/utilities/find-moon-signSidereal Moon sign (and nakshatra) for a date, time and place.
- Credits
- 1 credit
- Input
- Birth details
- Output
- JSON
- Delivery
- Direct response
- Languages
- English; translated term names with
labels
| Header | Value and description |
|---|---|
AuthorizationRequired | Bearer YOUR_API_KEYYour sandbox (sk_test_...) or live (sk_live_...) key. X-API-Key: <key> is accepted instead. |
Content-TypeRequired | application/jsonThe body is JSON. |
Idempotency-KeyOptional | <unique string>Makes retries safe: a repeated key with the same body replays the stored response and is never charged twice. (1 to 200 characters) |
| Field | Description |
|---|---|
datetimestringRequired | Local date and time, ISO 8601 without offset, e.g. 1990-10-18T14:30:00 Limits: format local-date-time, pattern ^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(:\d{2}(\.\d{1,6})?)?$ Example: |
timezonestring | nullOptional | IANA time zone, e.g. Asia/Kolkata Default: Example: |
utc_offsetstring | nullOptional | Fixed offset such as +05:30, if no IANA zone is known Default: |
latitudenumberRequired | Limits: minimum -90, maximum 90 Example: |
longitudenumberRequired | Limits: minimum -180, maximum 180 Example: |
ayanamshastringOptional | Default: |
languagestringOptional | Output language (ISO 639-1). The values listed are the ones this capability supports; any other is refused with 422 unsupported_language. Identifiers, enum values and numbers never change with language. Default: Allowed value: en |
labelsstringOptional | Optional. Adds `meta.labels`: translated display names for the identifiers in the answer. `data` is unchanged. Free. Any other code is refused with 422 unsupported_language. Allowed values: asbndeesfrguhiitknkomlmrnenlorpaplptrusitatetrur |
Response · fields in data
Inferred from the example response: a guide to the shape, not a contract.
ayanamsha· stringmoon_sign· object
Example request
curl -X POST https://api.96astro.com/v1/utilities/find-moon-sign \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"datetime": "1990-10-18T14:30:00",
"timezone": "Asia/Kolkata",
"latitude": 28.6139,
"longitude": 77.209
}'const response = await fetch("https://api.96astro.com/v1/utilities/find-moon-sign", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
"datetime": "1990-10-18T14:30:00",
"timezone": "Asia/Kolkata",
"latitude": 28.6139,
"longitude": 77.209
}),
});
const { data, meta } = await response.json();
console.log(data);import { Astro96Client } from "@96astro/api";
const astro = new Astro96Client({ apiKey: "YOUR_API_KEY" });
const { data, meta } = await astro.utilities.findMoonSign({
"datetime": "1990-10-18T14:30:00",
"timezone": "Asia/Kolkata",
"latitude": 28.6139,
"longitude": 77.209
});
console.log(data);import requests
response = requests.post(
"https://api.96astro.com/v1/utilities/find-moon-sign",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
json={
"datetime": "1990-10-18T14:30:00",
"timezone": "Asia/Kolkata",
"latitude": 28.6139,
"longitude": 77.209,
},
timeout=60,
)
response.raise_for_status()
data = response.json()["data"]
print(data)from astro96_api import Astro96Client
astro = Astro96Client(api_key="YOUR_API_KEY")
res = astro.utilities.find_moon_sign({
"datetime": "1990-10-18T14:30:00",
"timezone": "Asia/Kolkata",
"latitude": 28.6139,
"longitude": 77.209,
})
print(res.data)<?php
$ch = curl_init('https://api.96astro.com/v1/utilities/find-moon-sign');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_API_KEY',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'datetime' => '1990-10-18T14:30:00',
'timezone' => 'Asia/Kolkata',
'latitude' => 28.6139,
'longitude' => 77.209,
]),
]);
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);
print_r($result['data']);package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"datetime": "1990-10-18T14:30:00",
"timezone": "Asia/Kolkata",
"latitude": 28.6139,
"longitude": 77.209
}`)
req, err := http.NewRequest("POST", "https://api.96astro.com/v1/utilities/find-moon-sign", body)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(res.Status, string(out))
}Example response
{
"data": {
"ayanamsha": "lahiri",
"moon_sign": {
"sign": "Virgo",
"sign_number": 6,
"sign_lord": "Mercury",
"element": "Earth",
"modality": "Mutable",
"degree": 27.8766,
"degree_dms": "27° 52' 35\"",
"longitude": 177.8766,
"nakshatra": "Chitra",
"nakshatra_lord": "Mars",
"pada": 2
}
},
"meta": {
"request_id": "req_00000000000000000000",
"api_version": "v1",
"credits_used": 0,
"warnings": [],
"language": "en"
}
}Captured from the live engine with a sandbox key (so credits_used is 0) and trimmed: long arrays keep their first items.
Error responses
- 400invalid_request
- 401invalid_key, expired_key
- 402payment_required
- 403account_suspended
- 404not_found
- 409idempotency_conflict
- 413payload_too_large
- 422invalid_request, unsupported_language
- 429rate_limited, quota_exhausted, spend_cap_reached, project_budget_exceeded
- 500computation_failed
- 502unavailable
- 503unavailable
- 504deadline_exceeded
Errors are never charged. What each status means and what to do: errors.
Find Sun Sign
POSTAvailable
https://api.96astro.com/v1/utilities/find-sun-signThe sidereal (Vedic) Sun sign with degree and nakshatra, and the tropical (Western) Sun sign, for a date; time and place refine it.
- Credits
- 1 credit
- Input
- Date
- Output
- JSON
- Delivery
- Direct response
- Languages
- English; translated term names with
labels
| Header | Value and description |
|---|---|
AuthorizationRequired | Bearer YOUR_API_KEYYour sandbox (sk_test_...) or live (sk_live_...) key. X-API-Key: <key> is accepted instead. |
Content-TypeRequired | application/jsonThe body is JSON. |
Idempotency-KeyOptional | <unique string>Makes retries safe: a repeated key with the same body replays the stored response and is never charged twice. (1 to 200 characters) |
| Field | Description |
|---|---|
datetimestringRequired | Local date and time, ISO 8601 without offset, e.g. 1990-10-18T14:30:00 Limits: format local-date-time, pattern ^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(:\d{2}(\.\d{1,6})?)?$ Example: |
timezonestring | nullOptional | IANA time zone, e.g. Asia/Kolkata Default: Example: |
utc_offsetstring | nullOptional | Fixed offset such as +05:30, if no IANA zone is known Default: |
latitudenumberRequired | Limits: minimum -90, maximum 90 Example: |
longitudenumberRequired | Limits: minimum -180, maximum 180 Example: |
ayanamshastringOptional | Default: |
languagestringOptional | Output language (ISO 639-1). The values listed are the ones this capability supports; any other is refused with 422 unsupported_language. Identifiers, enum values and numbers never change with language. Default: Allowed value: en |
labelsstringOptional | Optional. Adds `meta.labels`: translated display names for the identifiers in the answer. `data` is unchanged. Free. Any other code is refused with 422 unsupported_language. Allowed values: asbndeesfrguhiitknkomlmrnenlorpaplptrusitatetrur |
Response · fields in data
Inferred from the example response: a guide to the shape, not a contract.
ayanamsha· stringvedic· objectwestern· object
Example request
curl -X POST https://api.96astro.com/v1/utilities/find-sun-sign \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"datetime": "1990-10-18T14:30:00",
"timezone": "Asia/Kolkata",
"latitude": 28.6139,
"longitude": 77.209
}'const response = await fetch("https://api.96astro.com/v1/utilities/find-sun-sign", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
"datetime": "1990-10-18T14:30:00",
"timezone": "Asia/Kolkata",
"latitude": 28.6139,
"longitude": 77.209
}),
});
const { data, meta } = await response.json();
console.log(data);import { Astro96Client } from "@96astro/api";
const astro = new Astro96Client({ apiKey: "YOUR_API_KEY" });
const { data, meta } = await astro.utilities.findSunSign({
"datetime": "1990-10-18T14:30:00",
"timezone": "Asia/Kolkata",
"latitude": 28.6139,
"longitude": 77.209
});
console.log(data);import requests
response = requests.post(
"https://api.96astro.com/v1/utilities/find-sun-sign",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
json={
"datetime": "1990-10-18T14:30:00",
"timezone": "Asia/Kolkata",
"latitude": 28.6139,
"longitude": 77.209,
},
timeout=60,
)
response.raise_for_status()
data = response.json()["data"]
print(data)from astro96_api import Astro96Client
astro = Astro96Client(api_key="YOUR_API_KEY")
res = astro.utilities.find_sun_sign({
"datetime": "1990-10-18T14:30:00",
"timezone": "Asia/Kolkata",
"latitude": 28.6139,
"longitude": 77.209,
})
print(res.data)<?php
$ch = curl_init('https://api.96astro.com/v1/utilities/find-sun-sign');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_API_KEY',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'datetime' => '1990-10-18T14:30:00',
'timezone' => 'Asia/Kolkata',
'latitude' => 28.6139,
'longitude' => 77.209,
]),
]);
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);
print_r($result['data']);package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"datetime": "1990-10-18T14:30:00",
"timezone": "Asia/Kolkata",
"latitude": 28.6139,
"longitude": 77.209
}`)
req, err := http.NewRequest("POST", "https://api.96astro.com/v1/utilities/find-sun-sign", body)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(res.Status, string(out))
}Example response
{
"data": {
"ayanamsha": "lahiri",
"vedic": {
"sign": "Libra",
"sign_number": 7,
"sign_lord": "Venus",
"element": "Air",
"modality": "Cardinal",
"degree": 0.9951,
"degree_dms": "0° 59' 42\"",
"longitude": 180.9951,
"nakshatra": "Chitra",
"nakshatra_lord": "Mars",
"pada": 3
},
"western": {
"sign": "Libra",
"sign_lord": "Venus",
"element": "Air",
…Captured from the live engine with a sandbox key (so credits_used is 0) and trimmed: long arrays keep their first items.
Error responses
- 400invalid_request
- 401invalid_key, expired_key
- 402payment_required
- 403account_suspended
- 404not_found
- 409idempotency_conflict
- 413payload_too_large
- 422invalid_request, unsupported_language
- 429rate_limited, quota_exhausted, spend_cap_reached, project_budget_exceeded
- 500computation_failed
- 502unavailable
- 503unavailable
- 504deadline_exceeded
Errors are never charged. What each status means and what to do: errors.
Supported Languages
POSTAvailable
https://api.96astro.com/v1/utilities/languagesLists the language codes responses can be localised into, with English and native names and whether each is written right to left.
- Credits
- 1 credit
- Input
- No input
- Output
- JSON
- Delivery
- Direct response
- Languages
- English; translated term names with
labels
| Header | Value and description |
|---|---|
AuthorizationRequired | Bearer YOUR_API_KEYYour sandbox (sk_test_...) or live (sk_live_...) key. X-API-Key: <key> is accepted instead. |
Content-TypeRequired | application/jsonThe body is JSON. |
Idempotency-KeyOptional | <unique string>Makes retries safe: a repeated key with the same body replays the stored response and is never charged twice. (1 to 200 characters) |
| Field | Description |
|---|---|
codestring | nullOptional | Only this locale code, e.g. 'hi'. Default: Limits: at most 8 characters Example: |
labelsstringOptional | Optional. Adds `meta.labels`: translated display names for the identifiers in the answer. `data` is unchanged. Free. Any other code is refused with 422 unsupported_language. Allowed values: asbndeesfrguhiitknkomlmrnenlorpaplptrusitatetrur |
| Value | Meaning |
|---|---|
en | English |
hi | Hindi |
mr | Marathi |
ne | Nepali |
bn | Bengali |
ta | Tamil |
te | Telugu |
kn | Kannada |
ml | Malayalam |
gu | Gujarati |
pa | Punjabi |
or | Odia |
si | Sinhala |
fr | French |
es | Spanish |
pt | Portuguese |
de | German |
it | Italian |
nl | Dutch |
pl | Polish |
tr | Turkish |
ru | Russian |
ko | Korean |
ja | Japanese |
Response · fields in data
Inferred from the example response: a guide to the shape, not a contract.
default· stringlanguages· array of object
Example request
curl -X POST https://api.96astro.com/v1/utilities/languages \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"code": "hi"
}'const response = await fetch("https://api.96astro.com/v1/utilities/languages", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
"code": "hi"
}),
});
const { data, meta } = await response.json();
console.log(data);import { Astro96Client } from "@96astro/api";
const astro = new Astro96Client({ apiKey: "YOUR_API_KEY" });
const { data, meta } = await astro.utilities.languages({
"code": "hi"
});
console.log(data);import requests
response = requests.post(
"https://api.96astro.com/v1/utilities/languages",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
json={
"code": "hi",
},
timeout=60,
)
response.raise_for_status()
data = response.json()["data"]
print(data)from astro96_api import Astro96Client
astro = Astro96Client(api_key="YOUR_API_KEY")
res = astro.utilities.languages({
"code": "hi",
})
print(res.data)<?php
$ch = curl_init('https://api.96astro.com/v1/utilities/languages');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_API_KEY',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'code' => 'hi',
]),
]);
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);
print_r($result['data']);package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"code": "hi"
}`)
req, err := http.NewRequest("POST", "https://api.96astro.com/v1/utilities/languages", body)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(res.Status, string(out))
}Example response
{
"data": {
"default": "en",
"languages": [
{
"code": "hi",
"name": "Hindi",
"native_name": "हिन्दी",
"right_to_left": false
}
]
},
"meta": {
"request_id": "req_00000000000000000000",
"api_version": "v1",
"credits_used": 0,
"warnings": [],
"language": "en"
}
}Captured from the live engine with a sandbox key (so credits_used is 0) and trimmed: long arrays keep their first items.
Error responses
- 400invalid_request
- 401invalid_key, expired_key
- 402payment_required
- 403account_suspended
- 404not_found
- 409idempotency_conflict
- 413payload_too_large
- 422invalid_request, unsupported_language
- 429rate_limited, quota_exhausted, spend_cap_reached, project_budget_exceeded
- 500computation_failed
- 502unavailable
- 503unavailable
- 504deadline_exceeded
Errors are never charged. What each status means and what to do: errors.
Place Search
POSTAvailable
https://api.96astro.com/v1/utilities/geo-searchSearches the built-in city list by name and returns coordinates, IANA zone and the UTC offset in force on a given date/time.
- Credits
- 1 credit
- Input
- Name
- Output
- JSON
- Delivery
- Direct response
- Languages
- English; translated term names with
labels
| Header | Value and description |
|---|---|
AuthorizationRequired | Bearer YOUR_API_KEYYour sandbox (sk_test_...) or live (sk_live_...) key. X-API-Key: <key> is accepted instead. |
Content-TypeRequired | application/jsonThe body is JSON. |
Idempotency-KeyOptional | <unique string>Makes retries safe: a repeated key with the same body replays the stored response and is never charged twice. (1 to 200 characters) |
| Field | Description |
|---|---|
datestring | nullOptional | Resolve the UTC offset for this date (DST-aware). Default: Limits: format date Example: |
timestring | nullOptional | Local time, HH:MM; with `date`, resolves one instant. Default: Limits: format local-time, pattern ^\d{2}:\d{2}(:\d{2}(\.\d{1,6})?)?$ Example: |
limitintegerOptional | Default: Limits: minimum 1, maximum 50 |
namestringRequired | City name or part of it. Limits: 2 to 100 characters Example: |
labelsstringOptional | Optional. Adds `meta.labels`: translated display names for the identifiers in the answer. `data` is unchanged. Free. Any other code is refused with 422 unsupported_language. Allowed values: asbndeesfrguhiitknkomlmrnenlorpaplptrusitatetrur |
Response · fields in data
Inferred from the example response: a guide to the shape, not a contract.
query· stringplaces· array of objectcatalogue· object
Example request
curl -X POST https://api.96astro.com/v1/utilities/geo-search \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Delhi",
"date": "1990-10-18",
"time": "14:30"
}'const response = await fetch("https://api.96astro.com/v1/utilities/geo-search", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
"name": "Delhi",
"date": "1990-10-18",
"time": "14:30"
}),
});
const { data, meta } = await response.json();
console.log(data);import { Astro96Client } from "@96astro/api";
const astro = new Astro96Client({ apiKey: "YOUR_API_KEY" });
const { data, meta } = await astro.utilities.geoSearch({
"name": "Delhi",
"date": "1990-10-18",
"time": "14:30"
});
console.log(data);import requests
response = requests.post(
"https://api.96astro.com/v1/utilities/geo-search",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
json={
"name": "Delhi",
"date": "1990-10-18",
"time": "14:30",
},
timeout=60,
)
response.raise_for_status()
data = response.json()["data"]
print(data)from astro96_api import Astro96Client
astro = Astro96Client(api_key="YOUR_API_KEY")
res = astro.utilities.geo_search({
"name": "Delhi",
"date": "1990-10-18",
"time": "14:30",
})
print(res.data)<?php
$ch = curl_init('https://api.96astro.com/v1/utilities/geo-search');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_API_KEY',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Delhi',
'date' => '1990-10-18',
'time' => '14:30',
]),
]);
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);
print_r($result['data']);package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"name": "Delhi",
"date": "1990-10-18",
"time": "14:30"
}`)
req, err := http.NewRequest("POST", "https://api.96astro.com/v1/utilities/geo-search", body)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(res.Status, string(out))
}Example response
{
"data": {
"query": "Delhi",
"places": [
{
"city": "Delhi",
"state": "Delhi",
"country": "India",
"latitude": 28.6139,
"longitude": 77.209,
"timezone": "Asia/Kolkata",
"utc_offset": "+05:30",
"utc_offset_on": "1990-10-18",
"standard_utc_offset": "+05:30",
"dst": false,
"instant": {
"status": "ok",
"utc_offset": "+05:30",
"abbreviation": "IST",
"utc": "1990-10-18T09:00:00Z",
…Captured from the live engine with a sandbox key (so credits_used is 0) and trimmed: long arrays keep their first items.
Error responses
- 400invalid_request
- 401invalid_key, expired_key
- 402payment_required
- 403account_suspended
- 404not_found
- 409idempotency_conflict
- 413payload_too_large
- 422invalid_request, unsupported_language
- 429rate_limited, quota_exhausted, spend_cap_reached, project_budget_exceeded
- 500computation_failed
- 502unavailable
- 503unavailable
- 504deadline_exceeded
Errors are never charged. What each status means and what to do: errors.
Place Search (City + Country)
POSTAvailable
https://api.96astro.com/v1/utilities/geo-search-advancedPlace search narrowed by city and country, with DST-aware offset.
- Credits
- 1 credit
- Input
- Name
- Output
- JSON
- Delivery
- Direct response
- Languages
- English; translated term names with
labels
| Header | Value and description |
|---|---|
AuthorizationRequired | Bearer YOUR_API_KEYYour sandbox (sk_test_...) or live (sk_live_...) key. X-API-Key: <key> is accepted instead. |
Content-TypeRequired | application/jsonThe body is JSON. |
Idempotency-KeyOptional | <unique string>Makes retries safe: a repeated key with the same body replays the stored response and is never charged twice. (1 to 200 characters) |
| Field | Description |
|---|---|
datestring | nullOptional | Resolve the UTC offset for this date (DST-aware). Default: Limits: format date Example: |
timestring | nullOptional | Local time, HH:MM; with `date`, resolves one instant. Default: Limits: format local-time, pattern ^\d{2}:\d{2}(:\d{2}(\.\d{1,6})?)?$ Example: |
limitintegerOptional | Default: Limits: minimum 1, maximum 50 |
citystringOptional | Default: Limits: at most 100 characters Example: |
countrystringOptional | Default: Limits: at most 100 characters Example: |
statestringOptional | Default: Limits: at most 100 characters |
labelsstringOptional | Optional. Adds `meta.labels`: translated display names for the identifiers in the answer. `data` is unchanged. Free. Any other code is refused with 422 unsupported_language. Allowed values: asbndeesfrguhiitknkomlmrnenlorpaplptrusitatetrur |
Response · fields in data
Inferred from the example response: a guide to the shape, not a contract.
query· objectplaces· array of objectcatalogue· object
Example request
curl -X POST https://api.96astro.com/v1/utilities/geo-search-advanced \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"city": "London",
"country": "United Kingdom",
"date": "1990-07-01",
"time": "12:00"
}'const response = await fetch("https://api.96astro.com/v1/utilities/geo-search-advanced", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
"city": "London",
"country": "United Kingdom",
"date": "1990-07-01",
"time": "12:00"
}),
});
const { data, meta } = await response.json();
console.log(data);import { Astro96Client } from "@96astro/api";
const astro = new Astro96Client({ apiKey: "YOUR_API_KEY" });
const { data, meta } = await astro.utilities.geoSearchAdvanced({
"city": "London",
"country": "United Kingdom",
"date": "1990-07-01",
"time": "12:00"
});
console.log(data);import requests
response = requests.post(
"https://api.96astro.com/v1/utilities/geo-search-advanced",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
json={
"city": "London",
"country": "United Kingdom",
"date": "1990-07-01",
"time": "12:00",
},
timeout=60,
)
response.raise_for_status()
data = response.json()["data"]
print(data)from astro96_api import Astro96Client
astro = Astro96Client(api_key="YOUR_API_KEY")
res = astro.utilities.geo_search_advanced({
"city": "London",
"country": "United Kingdom",
"date": "1990-07-01",
"time": "12:00",
})
print(res.data)<?php
$ch = curl_init('https://api.96astro.com/v1/utilities/geo-search-advanced');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_API_KEY',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'city' => 'London',
'country' => 'United Kingdom',
'date' => '1990-07-01',
'time' => '12:00',
]),
]);
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);
print_r($result['data']);package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"city": "London",
"country": "United Kingdom",
"date": "1990-07-01",
"time": "12:00"
}`)
req, err := http.NewRequest("POST", "https://api.96astro.com/v1/utilities/geo-search-advanced", body)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(res.Status, string(out))
}Example response
{
"data": {
"query": {
"city": "London",
"country": "United Kingdom",
"state": ""
},
"places": [
{
"city": "London",
"state": "England",
"country": "United Kingdom",
"latitude": 51.5074,
"longitude": -0.1278,
"timezone": "Europe/London",
"utc_offset": "+01:00",
"utc_offset_on": "1990-07-01",
"standard_utc_offset": "+00:00",
"dst": true,
"instant": {
…Captured from the live engine with a sandbox key (so credits_used is 0) and trimmed: long arrays keep their first items.
Error responses
- 400invalid_request
- 401invalid_key, expired_key
- 402payment_required
- 403account_suspended
- 404not_found
- 409idempotency_conflict
- 413payload_too_large
- 422invalid_request, unsupported_language
- 429rate_limited, quota_exhausted, spend_cap_reached, project_budget_exceeded
- 500computation_failed
- 502unavailable
- 503unavailable
- 504deadline_exceeded
Errors are never charged. What each status means and what to do: errors.
Resolve Birth Instant
POSTAvailable
https://api.96astro.com/v1/utilities/resolve-instantTurns an IANA zone plus local date and time into one UTC instant, or reports that the local time was ambiguous (both candidates returned) or nonexistent across a DST change.
- Credits
- 1 credit
- Input
- Specific input
- Output
- JSON
- Delivery
- Direct response
- Languages
- English; translated term names with
labels
| Header | Value and description |
|---|---|
AuthorizationRequired | Bearer YOUR_API_KEYYour sandbox (sk_test_...) or live (sk_live_...) key. X-API-Key: <key> is accepted instead. |
Content-TypeRequired | application/jsonThe body is JSON. |
Idempotency-KeyOptional | <unique string>Makes retries safe: a repeated key with the same body replays the stored response and is never charged twice. (1 to 200 characters) |
| Field | Description |
|---|---|
timezonestringRequired | IANA time zone, e.g. Europe/London Example: |
datestringRequired | Limits: format date Example: |
timestring | nullOptional | Local time, HH:MM. Without it only the day's offset is given. Default: Limits: format local-time, pattern ^\d{2}:\d{2}(:\d{2}(\.\d{1,6})?)?$ Example: |
labelsstringOptional | Optional. Adds `meta.labels`: translated display names for the identifiers in the answer. `data` is unchanged. Free. Any other code is refused with 422 unsupported_language. Allowed values: asbndeesfrguhiitknkomlmrnenlorpaplptrusitatetrur |
Response · fields in data
Inferred from the example response: a guide to the shape, not a contract.
timezone· stringlocal_date· stringlocal_time· stringstatus· stringutc_offset· nullabbreviation· nullutc· nullcandidates· array of object
Example request
curl -X POST https://api.96astro.com/v1/utilities/resolve-instant \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"timezone": "Europe/London",
"date": "1990-10-28",
"time": "01:30"
}'const response = await fetch("https://api.96astro.com/v1/utilities/resolve-instant", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
"timezone": "Europe/London",
"date": "1990-10-28",
"time": "01:30"
}),
});
const { data, meta } = await response.json();
console.log(data);import { Astro96Client } from "@96astro/api";
const astro = new Astro96Client({ apiKey: "YOUR_API_KEY" });
const { data, meta } = await astro.utilities.resolveInstant({
"timezone": "Europe/London",
"date": "1990-10-28",
"time": "01:30"
});
console.log(data);import requests
response = requests.post(
"https://api.96astro.com/v1/utilities/resolve-instant",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
json={
"timezone": "Europe/London",
"date": "1990-10-28",
"time": "01:30",
},
timeout=60,
)
response.raise_for_status()
data = response.json()["data"]
print(data)from astro96_api import Astro96Client
astro = Astro96Client(api_key="YOUR_API_KEY")
res = astro.utilities.resolve_instant({
"timezone": "Europe/London",
"date": "1990-10-28",
"time": "01:30",
})
print(res.data)<?php
$ch = curl_init('https://api.96astro.com/v1/utilities/resolve-instant');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_API_KEY',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'timezone' => 'Europe/London',
'date' => '1990-10-28',
'time' => '01:30',
]),
]);
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);
print_r($result['data']);package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"timezone": "Europe/London",
"date": "1990-10-28",
"time": "01:30"
}`)
req, err := http.NewRequest("POST", "https://api.96astro.com/v1/utilities/resolve-instant", body)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(res.Status, string(out))
}Example response
{
"data": {
"timezone": "Europe/London",
"local_date": "1990-10-28",
"local_time": "01:30",
"status": "ambiguous",
"utc_offset": null,
"abbreviation": null,
"utc": null,
"candidates": [
{
"utc_offset": "+01:00",
"abbreviation": "BST",
"utc": "1990-10-28T00:30:00Z"
},
{
"utc_offset": "+00:00",
"abbreviation": "GMT",
"utc": "1990-10-28T01:30:00Z"
}
…Captured from the live engine with a sandbox key (so credits_used is 0) and trimmed: long arrays keep their first items.
Error responses
- 400invalid_request
- 401invalid_key, expired_key
- 402payment_required
- 403account_suspended
- 404not_found
- 409idempotency_conflict
- 413payload_too_large
- 422invalid_request, unsupported_language
- 429rate_limited, quota_exhausted, spend_cap_reached, project_budget_exceeded
- 500computation_failed
- 502unavailable
- 503unavailable
- 504deadline_exceeded
Errors are never charged. What each status means and what to do: errors.