AstrologyAPI

Use access token to call astrology api.

Learn More

Geo Details

POSThttps://json.astrologyapi.com/v1/geo_details
Copy

Fetches latitude, longitude, timezone, and country details for a given place name, enabling accurate location data for astrological calculations.

POST/geo_details
Copy
1curl --location 'https://json.astrologyapi.com/v1/geo_details' \
2  --header 'Content-Type: application/json' \
3  --header 'x-astrologyapi-key: <YOUR_ACCESS_TOKEN>' \
4  --data '{
5    "place": "mum",
6    "maxRows": "2"
7}'
8
200Response
Copy
1{
2  "geonames": [
3    {
4      "place_name": "Mumbai",
5      "latitude": 19.07283,
6      "longitude": "72.88261",
7      "timezone_id": "Asia/Kolkata",
8      "country_code": "IN"
9    },
10    {
11      "place_name": "Navi Mumbai",
12      "latitude": 19.03681,
13      "longitude": "73.01582",
14      "timezone_id": "Asia/Kolkata",
15      "country_code": "IN"
16    }
17  ]
18}

Request Headers

x-astrologyapi-key

string

required

API Access Token to authenticate requests. Send your access token in this custom header.

Accept-Language

string

Preferred language for the response content

Properties

English - en

Request Body (JSON)

place

string

required

place , eg: 'mumbai'

maxRows

int

required

number of result at time, eg: 2

Errors

400
Bad Request

Something is wrong with your request format or parameters.

401
Unauthorized

Your API key is missing or invalid.

403
Forbidden

You don't have permission to access this specific resource.

404
Not Found

The API endpoint you're trying to reach doesn't exist.

500
Internal Server Error

Our server is having a temporary glitch.