aztro API

aztro API

Open Data

Aztro API provides you with daily horoscope (yesterday, today and tomorrow). aztro is for a developer who wants an API that provides horoscope info for sun signs such as Lucky Number, Lucky Color, Mood, Color, Compatibility with other sun signs, description of a sign for that day etc.

Visit API

📚 Documentation & Examples

Everything you need to integrate with aztro API

🚀 Quick Start Examples

aztro API Javascript Examplejavascript
// aztro API API Example
const response = await fetch('https://aztro.readthedocs.io/en/latest/', {
    method: 'GET',
    headers: {
        'Content-Type': 'application/json'
    }
});

const data = await response.json();
console.log(data);

Unleash the Power of Astrology with Aztro!

If you're looking for a reliable astrology API, Aztro is the one for you. Offering a plethora of options and features, Aztro's API is easy to use and integrate into your application. Here's a quick guide on how to use the Aztro API with JavaScript.

Getting Started

Before you can make any requests to the Aztro API, you need to sign up for a free API key. Once you have an API key, you can start making requests to the API. Here's a simple example:

const apiUrl = 'https://aztro.sameerkumar.website/?sign=aquarius&day=today';
const headers = {
  'Content-Type': 'application/json',
  'Access-Control-Allow-Origin': '*'
};

fetch(apiUrl, { headers })
  .then(response => response.json())
  .then(data => console.log(data));

This example fetches the horoscope for Aquarius for today. You can substitute the aquarius parameter with any of the 12 zodiac signs, and the today parameter with either today, yesterday, or tomorrow.

Fetching Multiple Zodiac Signs

You can use Aztro's API to fetch the horoscopes for multiple zodiac signs at once. Here's an example:

const apiUrl = 'https://aztro.sameerkumar.website/batch?sign=aquarius,cancer,capricorn&day=today';
const headers = {
  'Content-Type': 'application/json',
  'Access-Control-Allow-Origin': '*'
};

fetch(apiUrl, { headers })
  .then(response => response.json())
  .then(data => console.log(data));

In this example, we're fetching the horoscopes for Aquarius, Cancer, and Capricorn for today. You can substitute the aquarius,cancer,capricorn parameter with any combination of the 12 zodiac signs.

Customizing the Response

The Aztro API allows you to customize the response based on your needs. You can choose which fields you want to be included in the response by specifying them in the params parameter. Here's an example:

const apiUrl = 'https://aztro.sameerkumar.website/?sign=libra&day=today';
const headers = {
  'Content-Type': 'application/json',
  'Access-Control-Allow-Origin': '*'
};
const params = {
  description: true,
  compatibility: true
};

fetch(`${apiUrl}&${new URLSearchParams(params).toString()}`, { headers })
  .then(response => response.json())
  .then(data => console.log(data));

In this example, we're fetching the horoscope for Libra for today, but we're only including the description and compatibility fields in the response. You can include any of the following fields in the params parameter:

  • date_range: The range of dates for which the horoscope is valid
  • description: A description of the horoscope for the day
  • compatibility: The zodiac sign that is most compatible with the sign for which the horoscope is being fetched
  • mood: The mood for the day
  • color: The lucky color for the day
  • lucky_number: The lucky number for the day
  • lucky_time: The lucky time for the day

Conclusion

That's it! You now have all the knowledge you need to get started with the Aztro API using JavaScript. With its powerful features and flexibility, the Aztro API is the perfect tool for adding astrology to your application.

📊 30-Day Uptime History

Daily uptime tracking showing online vs offline minutes

May 31Jun 2Jun 4Jun 6Jun 8Jun 10Jun 12Jun 14Jun 16Jun 18Jun 20Jun 22Jun 24Jun 26Jun 2904008001440Minutes
Online
Offline

Related APIs in Open Data