/api/astro/geocode/1 creditPlace lookup
Turns a place name into the coordinates and UTC offset the other endpoints need. Send a GET with an `address` query parameter such as 'Jaipur, India' and you get back `latitude`, `longitude`, the IANA `timezone_name`, the `timezone_offset` in hours as a decimal, the geocoder's own `address` string and the `source` that answered. The offset already accounts for daylight saving where the provider reports it, so it is the current offset for that place, not necessarily the offset that applied on a historical birth date. For a birth chart, pass these coordinates into /api/astro/date_time/ with the actual date and let that endpoint resolve the offset for the right moment. `source` tells you which provider answered: 'google' when a Google Maps key is configured for the deployment, otherwise 'nominatim', the OpenStreetMap service used as a fallback. A place that cannot be found returns 404, and a missing `address` returns 400.
https://yogataraapi.prahlad.app/api/astro/geocode/Authentication
Send your key in the X-API-Key header. Keys are server-side credentials — never put one in browser JavaScript or a mobile app.
X-API-Key: yt_live_a1b2c3d4_…Query parameters (1)
Passed in the URL. All optional unless marked, and they combine — filter, then page, then sort.
| Parameter | Type | Example | What it does | |
|---|---|---|---|---|
| address | string | required | Jaipur, Rajasthan, India | The city/place name to search A place name to look up. Free text - a city is usually enough; add the state or country to disambiguate. |
Example request
curl "https://yogataraapi.prahlad.app/api/astro/geocode/?address=Jaipur" \
-H "X-API-Key: $OCCULT_API_KEY"Response
{
"address": "Jaipur, Rajasthan, India",
"latitude": 26.9124336,
"longitude": 75.7872709,
"timezone_name": "Asia/Calcutta",
"timezone_offset": 5.5,
"source": "google"
}Captured from a real call using the exact request above. Results sit under data.
Errors
Metering errors return { "error": "…", "message": "<code>", "is_error": true }. Show error to people and branch on message. See the error reference.