Skip to content
BestAstroAPI

Errors

Errors use normal HTTP status codes and a JSON body.

  • code is stable. Check this in your code.
  • message is for people. Its wording may change.
400 application/json (real response for tz: Mars/Olympus)
{
  "error": {
    "code": "invalid_tz",
    "message": "invalid \"tz\": use an IANA zone like Asia/Kolkata or an offset like +05:30"
  }
}

Codes

StatusCodeMeaning
400invalid_jsonBody is not valid JSON or has the wrong field types.
400invalid_requestThe request could not be built, for example a compare case with a bad endpoint name.
400invalid_datetimedatetime is not YYYY-MM-DDTHH:MM[:SS].
400invalid_dateinvalid_timeinvalid_fromdate, time or from is missing or malformed.
400invalid_as_ofas_of is not a valid date or datetime. The date of tarabala and the datetime of transits use this code too.
400invalid_latinvalid_lonLatitude or longitude missing or out of range.
400ambiguous_placeSeveral places have this name. error.choices lists them: add the state or district, or send the place_id of one.
400place_not_foundinvalid_placeNo place with this name or id, or place is not text. error.choices lists similar names, if any.
400invalid_qinvalid_countryinvalid_limitinvalid_queryBad place search input: q is empty, country is not a two-letter code, or limit is not 1 to 50.
400invalid_tzMissing or unknown IANA zone, or bad offset.
400out_of_rangeDate is outside 1850 to 2149.
400no_sunriseSunrise or sunset does not occur at this place on this date (polar day or night). Upagrahas need one.
400invalid_purposeUnknown muhurta purpose; see /v1/muhurta/purposes.
400invalid_signSign must be an English sign name such as Aries.
400invalid_yearinvalid_monthinvalid_toinvalid_daysinvalid_yearsrange_too_longBad year, month or date range, or a range longer than the endpoint allows. The message gives the limits.
400invalid_lordsinvalid_depthDasha input: unknown lord in lords, or depth out of range.
400invalid_personinvalid_othersinvalid_nakshatrainvalid_roleinvalid_systemMatching input: a person is not a birth or a nakshatra, others is not 1 to 100 people, or an unknown role or system.
400invalid_planetinvalid_planetsinvalid_aspectsinvalid_orbsinvalid_house_systemUnknown planet, aspect or house system, or an orb outside 0 to 15.
400invalid_kindinvalid_birth_dateinvalid_date_of_birthinvalid_nameFestival kind is not festival, vrat or sankranti, a birth date is missing or malformed, or the numerology name is not in Latin letters.
400invalid_spreadinvalid_seedinvalid_questioninvalid_arcanainvalid_suitTarot input: unknown spread, arcana or suit, a bad seed, or a question over 500 characters.
400invalid_rolloutRollout settings refused, for example an address that is not the vendor's own, or missing credentials.
400invalid_vendorinvalid_casesBad migration compare input.
401invalid_keyMissing or unknown API key.
400invalid_domainA website key needs 1 to 20 domains such as example.com or *.example.com.
401invalid_site_keyPlace box: missing, unknown or removed website key, or a secret key in its place.
403domain_not_allowedPlace box: this page's domain is not listed for the website key.
429box_limit_reachedPlace box: today's box searches are used up. Retry-After says when they reset.
401unauthorizedDashboard call without a valid session.
404not_foundUnknown chart, place id or other resource, for example a key that is not yours.
413body_too_largeRequest body over the limit: 256 KB, 1 MB for MCP, 8 MB for compare.
429rate_limitedToo many requests per second for your plan. Wait for the seconds in Retry-After.
429quota_exceededDaily (Free plan) or monthly calls used up. Retry-After says when they reset; upgrading applies at once.
500internalUnexpected server error. Retrying is safe.
503database_unavailablequota_unavailableplaces_unavailableShort outage on our side. Retry after the seconds in Retry-After.

Vendor-compatible routes

  • Routes under /compat/<vendor> return errors in that vendor's own format.
  • Your existing error handling keeps working.
  • An endpoint we do not have goes to your old vendor, once its login is saved on the Migration page.
  • Without a saved login it answers “not available in compat mode”, in the same format.

Welcome! How will you use it?

We'll show you what matters to you. You can switch any time at the top.