Astrology APIs for Websites and Apps

Add the power of AstroApp to your own website or app: REST APIs, WordPress and Joomla plugins for selected AstroApp features.

With the AstroApp APIs your website or mobile app can request an astrological calculation from AstroApp and show the result as part of your own product. You can choose from three families of API integrations: REST APIs, WordPress and Joomla plugins, and JavaScript APIs. All run on the same infrastructure as AstroApp, in several data centers, and are capable of handling sustained loads of millions of requests a day. White labeling and custom branding are also available.

REST APIs

You send the chart data in a REST call and get back the calculation you asked for. The REST APIs cover the following AstroApp features:

  • Chart data and chart images in several chart styles, Western and Vedic
  • Planets, asteroids and planetoids, houses and aspects, in geocentric or topocentric coordinates, with ecliptic positions converted to right ascension and declination on request
  • Returns: solar, lunar and planetary, returns to natal positions, to a given zodiacal position or to a phase
  • Transits to a natal chart and transits to transits
  • Secondary and minor progressions, filtered by date range, and progressions to the angles
  • Ingresses into signs, nakshatras, lunar mansions, terms and zodiacal degrees
  • The Moon's condition: void of course, lunar mansion, nakshatra, the current and next phases
  • Essential and Accidental dignities, 31 types in total
  • Statistics by sign and by house
  • AstroCartography mapping data
  • Places and time zones: search more than five million places by city, hospital or place name, or by proximity to given coordinates. Each location provides detailed history of its time zone changes

You can authenticate with Basic authentication or with a token. We document every call in a Postman collection, with a worked example in 30 programming languages, including cURL, PHP, Python, JavaScript, Node, Java and C: AstroApp REST API documentation. You can also find a Java SDK, generated from the same definitions, on GitHub.

JavaScript APIs

Use the JavaScript APIs when you want a chart on your web page. Your visitor enters the birth data, and the chart appears in a Western or a Vedic style, with no server-side coding needed on your part. The same library also gives you the data behind the chart:

  • Planets: longitude, latitude and speed for the major planets, the asteroids, the hypothetical planets, the Part of Fortune and the prenatal lunations
  • House cusps
  • Aspects, with applying and separating indicators and the exact value for each
  • Cities database and the Time Zone changes database, with the ability to search by name and coordinates proximity

Some client-side functions need no request at all: midpoints, the aspect between two objects, house and sign placements, distances, and formatting utilities. You can restrict a key to your own web address, so nobody can copy it from your page and use it elsewhere.

Keys and Usage

You can create and manage your keys in the API usage portal within your AstroApp account. There, you can also track your APIs usage.

The JavaScript APIs come with the Pro and Financial Gold editions (for personal use only). The REST APIs and CMS plugins (Joomla and WordPress) are a separate product with its own subscription plans. You start with a free daily allowance and a payment method on file, and your account moves to pay-as-you-go pricing automatically when you first exceed your free daily quota. To sign up, please visit the API section of your AstroApp account, where the plans and the billing rules are set out in full.

Frequently Asked Questions

What do the APIs return?

JSON for every calculation, and an image when you request a chart. The JavaScript APIs also offer the same data as XML feeds if you prefer them.

Do I need a server to use the JavaScript APIs?

No. The server is optional for the JavaScript APIs, as they can work on any static HTML page. As for the REST APIs, you use them from your own server or app, in any programming language that can make an HTTP request.

Can I show the chart in a Vedic style?

Yes. Chart images and the JavaScript wheels come in Western and Vedic styles, and the calculations accept the ayanamsa and the vargas of the Vedic settings.

Do you provide database for Places and geographical locations?

Yes. You can search more than five million locations by name and by proximity to specified geographical places, the searches can be filtered by countries and states. The history of every time zone change is included, so a chart for a past date uses the time zone rules in force on that date.

Can I brand the results as my own?

Yes. White labeling and custom branding are available.

See Also

Compare editions and prices.