🌍 Astrocartography API and ✋ Palmistry API are now live. Ship them in your app today.Get Started

Introduction

This reference is your key to a complete understanding of Astrology API. If this is your first time at AstrologyAPI, we recommend beginning with the Getting Started Guide.

Conventions

The base URL to send all API requests is https://json.astrologyapi.com/v1/. HTTPS is required for all API requests.

The Astrology API follows RESTful conventions when possible, with most operations performed via POST requests on resources. Request and response bodies are encoded as JSON.

Code samples & SDKs

Sample requests and responses are shown for each endpoint. Requests are shown using the AstrologyAPI JavaScript SDK and cURL. These samples make it easy to copy, paste, and modify as you build your integration.

Astrology API SDKs are open-source projects that you can install to easily start building. You may also choose any other language or library that allows you to make HTTP requests.

Authentication

Requests use the HTTP headers to both authenticate and authorize operations. We support two primary methods of authentication depending on the API suite you are using.

1. Using Access Token

For modern API suites like Chat or specific wallet features, you can use an Access Token (Wallet Token). This is passed as a custom header named x-astrologyapi-key, with your Access Token as its value.

2. Using User ID and API Key (Basic Auth)

The Astrology API accepts Basic Auth in the Authorization header. This is used for our core astrological endpoints. Basic Auth uses a username and password provided to you when you sign up at AstrologyAPI — your User Id is the username and your API Key is the password.

Error Codes

Responses from the API use HTTP response codes to indicate general classes of success and error. Error responses contain more detail about the error in the response body, in the code and message properties.

API sections

Every endpoint lives under a single authentication header. Pick a suite to browse its full reference.