Crucial for Kundli Accuracy

Geo Location API

The foundation of accurate astrology. Build fast location search bars, retrieve exact latitudes and longitudes, and automatically resolve historical Timezone and DST offsets for over 200,000 global cities.

Response: /v1/geo/timezone
{
  "city": "London",
  "country": "United Kingdom",
  "coordinates": {
    "lat": 51.5074,
    "lon": -0.1278
  },
  "timezone": {
    "name": "Europe/London",
    "utc_offset": "+01:00",
    "is_dst": true,
    "dst_shift": 60
  }
}

200,000+

Global Cities Database

Historical

Timezone & DST Resolution

Typeahead

Sub-50ms Autocomplete

Coordinate

Exact Lat/Lon Mapping

Built specifically for Astrology Data Entry

Astrology requires mathematical precision. A wrong timezone or an uncalculated Daylight Saving Time (DST) shift completely ruins a birth chart.

Fast Autocomplete Search

Power your frontend "Place of Birth" inputs with our ultra-fast search API. Users type "Lon", and the API instantly returns "London, UK", "Long Beach, CA", etc.

Historical DST Resolution

The hardest part of astrology coding. Pass a birth date (e.g., Aug 15, 1990) and a location. We return the exact timezone offset, factoring in historical DST rules for that specific year.

Exact Coordinates

Every location query returns hyper-accurate Latitude and Longitude floats required by the Swiss Ephemeris to calculate Ascendants and house cusps.

Multi-Language Search

Users can search for locations in multiple languages. Typing "Nueva York" or "New York" will resolve to the exact same geographical entity and coordinates.

Reverse Geocoding

Have the user's GPS coordinates? Pass the Lat/Lon into the API to instantly retrieve the name of the nearest city, state, and timezone.

Massive Database

Our database isn't just major capitals. It includes over 200,000 cities, towns, and villages globally to ensure no user is left unable to find their birthplace.

Predictable Endpoints

Effortlessly power your UI search bars and backend timezone math.

GET /v1/geo/search

Typeahead Search

Designed to be called on every keystroke. Pass a partial string (like "San Fran") and receive a ranked array of matching locations containing city, state, country, and coordinates.

Query Parameters
?q=San%20Fran
&limit=5

GET /v1/geo/timezone

Historical Timezone Resolution

The most critical endpoint for your Kundli engine. Pass a location's coordinates along with a specific historical timestamp. The API evaluates historical timezone databases (TZDB) to return the exact UTC offset that was active at that exact moment in time.

Query Parameters
?lat=37.7749
&lon=-122.4194
&date=1990-08-15
&time=14:30

Frequently Asked Questions

Everything you need to know about integrating the Geo Location API.

What is the Geo Location API?
The Geo Location API by PlanetsXP is a dedicated service designed for developers building astrology platforms. It allows you to search for global cities, retrieve exact latitude/longitude coordinates, and resolve complex historical timezones and DST offsets required for accurate chart generation.
Why is location data so important for an astrology api?
Astrological calculations, especially the Ascendant (Lagna) and House Cusps, rely entirely on the exact physical position on Earth and the precise moment in time relative to UTC. If your astrology api receives an incorrect timezone offset or slightly wrong coordinates, the entire birth chart will be inaccurate.
Does the API handle Daylight Saving Time (DST) automatically?
Yes, this is a major feature. Daylight Saving Time rules change constantly around the world. By passing a birth date, time, and location to the API, it checks historical TZDB records to tell you exactly if DST was active in that specific city on that specific date in history.
Can I use this with the kundli api?
Absolutely. The Geo Location API is the perfect companion to our kundli api. You use the Geo API on your frontend to power the "Place of Birth" search bar, and then you pass the resulting Lat, Lon, and UTC offset directly into the Kundli API to generate the chart.
Do you support historical timezone changes?
Yes. Timezones shift due to political changes (e.g., parts of India changing offsets prior to standardizing IST, or countries altering their UTC offsets). Our API references deep historical databases to ensure the offset returned matches the political reality of the birth year.
How fast is the location search for autocomplete inputs?
The `/v1/geo/search` endpoint is optimized for "typeahead" UI implementations. It is heavily indexed and served via edge caching, typically returning ranked results in under 50 milliseconds, ensuring your users experience a fluid, lag-free search.
Does the API support reverse geocoding?
Yes. If you are building a mobile app that utilizes the user's device GPS, you can pass their exact latitude and longitude to the API. It will reverse geocode those coordinates to return the nearest city name, state, country, and current timezone.
Can I search for small towns and villages?
Our database contains over 200,000 distinct locations globally. While it includes all major metropolises, it is also deeply populated with tier-2 and tier-3 cities, small towns, and regional villages necessary for accurate indian astrology api data entry.
Is this required for the vedic astrology api?
Yes. Our core vedic astrology api endpoints (for calculating planets, houses, and dashas) require you to pass `lat`, `lon`, and `timezone_offset` in the JSON payload. The Geo Location API is the tool you use to fetch that required data easily.
How is the Geo Location API billed?
Because autocomplete search bars can generate a high volume of requests (e.g., one request per keystroke), Geo API requests are billed at a highly discounted rate compared to complex ephemeris calculations. See our Pricing page for specific volume limits.

Ready to build perfect data entry?

Ensure your astrological charts are mathematically flawless by starting with perfect location data. Get your sandbox keys today.