All horoscope endpoints return a data object containing date, period, sign, and horoscope. The period is daily, weekly, or monthly.
Pass one of the 12 supported signs as the required sign query parameter. Values are case-insensitive. A missing or invalid sign returns HTTP 400. An upstream failure or invalid response returns HTTP 502. A timeout returns HTTP 504. See API errors and time limits.
Tithi, nakshatra, yoga, karana and weekday for a location. See the value at the start of the day and each transition time.
Parameters and Response
Parameter
Description
lat, lng
Required latitude and longitude. Longitude aliases: lon, long.
date
Optional YYYY-MM-DD. Defaults to today in the location's timezone.
Response fields include date, location, timezone, window, day_basis, weekday, conventions, tithi, nakshatra, yoga and karana. Each limb has at_start and transitions. Tithi also includes paksha.
The day runs from sunrise to the next sunrise. If sunrise is unavailable, day_basis identifies a local civil-day fallback. The model uses approximate Lahiri calculations; festival and regional observance rules are not included.
Each endpoint returns the original SunMoonTracker JSON fields, without a data wrapper. Invalid parameters return HTTP 400 or 422. If the service is unavailable, the response is HTTP 502 or 503. Coordinates use latitude −90 to 90 and longitude −180 to 180.
Connect an AI agent.
Use MCP tools, the API contract, or the public skill. No API key or account is required.
Connect with MCP
Use an MCP client to call six read-only tools for horoscopes, planetary positions, Panchang, Sun and Moon times, and tarot.
Gives the MCP server name, connection address, and supported capabilities.
The digest is a hash of the skill file. Before you load the skill, calculate the SHA-256 hash of the downloaded bytes. Compare it with the part after sha256: in the index's digest value.
The homepage also returns discovery addresses in Link response headers. Software can read them before it processes the page content.
Read documentation as Markdown
Send Accept: text/markdown to get the page text, links, and examples without the HTML layout. A normal browser request returns HTML.
Use the HTTP status and the error code to handle failed requests.
Errors generated by this API contain an error message and a stable code. Errors are not cached and can be read by browser clients.
400:missing_sign, invalid_sign, or invalid_count. Correct the query parameter.
405:method_not_allowed. Use GET or OPTIONS.
502:upstream_unavailable or invalid_upstream_response. Retry later.
503:service_not_configured. Contact support.
504:upstream_timeout. Retry later.
Horoscope calls have a 10-second limit. Calculation calls have a 30-second limit. Each limit includes the full response body. Responses must be JSON and must not exceed 1 MiB. Successful data is checked against the OpenAPI schemas. Invalid data returns 502.
Horoscope checks include the requested sign and period, a non-empty reading, and a valid date or month. The date is the provider's reading label; these checks do not guarantee freshness.
Calculation service errors keep their status and structured JSON body. Parameter errors can use a detail array with HTTP 422. Correct these parameters before you retry. For 502 or 504, use a limited number of retries with increasing delays.
{
"error": "The upstream service took too long to respond. Try again later.",
"code": "upstream_timeout"
}