Copy page

Copy page as Markdown for LLMs

View as Markdown

View this page as plain text


Open in ChatGPT

Ask ChatGPT about this page

Open in Claude

Ask Claude about this page

Astro ChatBot API

Introducing the Astro ChatBot API, a simple and reliable way to let users ask any astrology question in plain language and get one grounded, chart-based answer back. You send a question and the person's birth details; DivineAPI fetches and compresses their chart, and streams back an answer written for a reader, not a developer. This API is designed for websites, mobile apps, chatbots, CRM dashboards, or astrology portals that want a conversational astrology experience instead of static reports.

It supports seven endpoints: one to ask a question inside a stored conversation, four to manage and inspect those conversations and your account, and one liveness check.


API Endpoint 

GET https://ask.divineapi.com/health

Guide: Liveness check. No key needed, nothing charged. Use it for uptime monitoring.


200: OK Answered Successfully

{ "ok": true }

Example Code Implementations

Below are example implementations in various programming environments.


cURL

curl "https://ask.divineapi.com/health"

 

curl -X GET "https://ask.divineapi.com/health"
const axios = require('axios');

const response = await axios.get('https://ask.divineapi.com/health');

console.log(response.data);
import requests

url = "https://ask.divineapi.com/health"

response = requests.get(url)

print(response.json())
const response = await fetch(
  'https://ask.divineapi.com/health',
  {
    method: 'GET',
  }
);

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

use GuzzleHttp\Client;

$client = new Client();

$response = $client->request('GET', 'https://ask.divineapi.com/health', [
]);

echo $response->getBody();
package main

import (
    "fmt"
    "net/http"
    "io"
)

func main() {
    req, _ := http.NewRequest("GET", "https://ask.divineapi.com/health", nil)

    client := &http.Client{}
    resp, _ := client.Do(req)
    defer resp.Body.Close()

    body2, _ := io.ReadAll(resp.Body)
    fmt.Println(string(body2))
}
import okhttp3.*;
import java.io.IOException;

public class Main {
    public static void main(String[] args) throws IOException {
        OkHttpClient client = new OkHttpClient();

        RequestBody body = null;

        Request request = new Request.Builder()
            .url("https://ask.divineapi.com/health")
            .get()
            .build();

        Response response = client.newCall(request).execute();
        System.out.println(response.body().string());
    }
}
import Foundation

let url = URL(string: "https://ask.divineapi.com/health")!
var request = URLRequest(url: url)
request.httpMethod = "GET"

let task = URLSession.shared.dataTask(with: request) { data, response, error in
    if let data = data {
        print(String(data: data, encoding: .utf8) ?? "")
    }
}
task.resume()
import okhttp3.*

fun main() {
    val client = OkHttpClient()

    val body: RequestBody? = null

    val request = Request.Builder()
        .url("https://ask.divineapi.com/health")
        .get()
        .build()

    client.newCall(request).execute().use { response ->
        println(response.body?.string())
    }
}
using System;
using System.Net.Http;
using System.Threading.Tasks;

class Program {
    static async Task Main() {
        using var client = new HttpClient();

        var response = await client.GetAsync("https://ask.divineapi.com/health");
        var result = await response.Content.ReadAsStringAsync();
        Console.WriteLine(result);
    }
}