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

Fixed Stars List

The Fixed Stars List API returns the catalog of fixed stars available for use in subsequent western astrology computations. This endpoint is useful when you want to know which fixed star identifiers the system supports so you can query them or map them into your own UI.


API Endpoint

POST https://astroapi-8.divineapi.com/western-api/v1/fixed-stars-list

Returns Fixed Stars List in response.


Headers

NameTypeDescription
Authorization*StringYour API Access Token, e.g. Bearer {token}

Request Body

NameTypeDescription
api_key*StringYour API key

200: OK Fixed Stars List Fetched Successfully

{
    "status": "success",
    "code": 200,
    "message": "Request successful",
    "data": [


        "Antares",
        "Betelgeuse",
        "Polaris",
        "Sirius",
        "Vega",
        ....

    ]
}

The data array contains the identifiers/names of fixed stars supported by this API. You can store or display these in your application for selection.


Example Code Implementations

Below are example implementations in various programming environments.


cURL

curl --location 'https://astroapi-8.divineapi.com/western-api/v1/fixed-stars-list' \
--header 'Authorization: Bearer your API Access Token' \
--form 'api_key="your API Key"'

NodeJS

var request = require('request');
var options = {
  'method': 'POST',
  'url': 'https://astroapi-8.divineapi.com/western-api/v1/fixed-stars-list',
  'headers': {
    'Authorization': 'Bearer your API Access Token'
  },
  formData: {
    'api_key': 'your API Key'
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});

JavaScript jQuery AJAX

var form = new FormData();
form.append("api_key", "your API Key");

var settings = {
  "url": "https://astroapi-8.divineapi.com/western-api/v1/fixed-stars-list",
  "method": "POST",
  "timeout": 0,
  "headers": {
    "Authorization": "Bearer your API Access Token"
  },
  "processData": false,
  "mimeType": "multipart/form-data",
  "contentType": false,
  "data": form
};

$.ajax(settings).done(function (response) {
  console.log(response);
});

Python

import requests

url = "https://astroapi-8.divineapi.com/western-api/v1/fixed-stars-list"

payload = {'api_key': 'your API Key'}
files=[

]
headers = {
  'Authorization': 'Bearer your API Access Token'
}

response = requests.request("POST", url, headers=headers, data=payload, files=files)

print(response.text)
Example Code
curl -X POST "https://astroapi-8.divineapi.com/western-api/v1/fixed-stars-list" \
  -H "Authorization: Bearer your API Access Token" \
  --form 'api_key="your API Key"'
const FormData = require('form-data');
const axios = require('axios');

const form = new FormData();
form.append('api_key', 'your API Key');

const response = await axios.post('https://astroapi-8.divineapi.com/western-api/v1/fixed-stars-list', form, {
  headers: {
    ...form.getHeaders(),
    'Authorization': 'Bearer your API Access Token',
  }
});

console.log(response.data);
import requests

url = "https://astroapi-8.divineapi.com/western-api/v1/fixed-stars-list"
headers = {
    "Authorization": "Bearer your API Access Token",
}
payload = {
    "api_key": "your API Key",
}

response = requests.post(url, headers=headers, data=payload)

print(response.json())
const formData = new FormData();
formData.append('api_key', 'your API Key');

const response = await fetch('https://astroapi-8.divineapi.com/western-api/v1/fixed-stars-list', {
  method: 'POST',
  headers: {
      'Authorization': "Bearer your API Access Token",
    },
  body: formData,
});

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

use GuzzleHttp\Client;

$client = new Client();

$response = $client->request('POST', 'https://astroapi-8.divineapi.com/western-api/v1/fixed-stars-list', [
    'headers' => [
        'Authorization' => 'Bearer your API Access Token',
    ],
    'multipart' => [
        ['name' => 'api_key', 'contents' => 'your API Key'],
    ],
]);

echo $response->getBody();
package main

import (
    "bytes"
    "fmt"
    "mime/multipart"
    "net/http"
    "io"
)

func main() {
    body := &bytes.Buffer{}
    writer := multipart.NewWriter(body)
    writer.WriteField("api_key", "your API Key")
    writer.Close()

    req, _ := http.NewRequest("POST", "https://astroapi-8.divineapi.com/western-api/v1/fixed-stars-list", body)
    req.Header.Set("Content-Type", writer.FormDataContentType())
    req.Header.Set("Authorization", "Bearer your API Access Token")

    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 = new MultipartBody.Builder()
            .setType(MultipartBody.FORM)
            .addFormDataPart("api_key", "your API Key")
            .build();

        Request request = new Request.Builder()
            .url("https://astroapi-8.divineapi.com/western-api/v1/fixed-stars-list")
            .post(body)
            .addHeader("Authorization", "Bearer your API Access Token")
            .build();

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

let url = URL(string: "https://astroapi-8.divineapi.com/western-api/v1/fixed-stars-list")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.setValue("Bearer your API Access Token", forHTTPHeaderField: "Authorization")

let boundary = "Boundary-\(UUID().uuidString)"
request.setValue("multipart/form-data; boundary=\(boundary)", forHTTPHeaderField: "Content-Type")

var bodyData = Data()
bodyData.append("--\(boundary)\r\n".data(using: .utf8)!)
bodyData.append("Content-Disposition: form-data; name=\"api_key\"\r\n\r\n".data(using: .utf8)!)
bodyData.append("your API Key\r\n".data(using: .utf8)!)
bodyData.append("--\(boundary)--\r\n".data(using: .utf8)!)
request.httpBody = bodyData

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 = MultipartBody.Builder()
        .setType(MultipartBody.FORM)
        .addFormDataPart("api_key", "your API Key")
        .build()

    val request = Request.Builder()
        .url("https://astroapi-8.divineapi.com/western-api/v1/fixed-stars-list")
        .post(body!!)
        .addHeader("Authorization", "Bearer your API Access Token")
        .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();
        client.DefaultRequestHeaders.Add("Authorization", "Bearer your API Access Token");

        var content = new MultipartFormDataContent();
        content.Add(new StringContent("your API Key"), "api_key");

        var response = await client.PostAsync("https://astroapi-8.divineapi.com/western-api/v1/fixed-stars-list", content);
        var result = await response.Content.ReadAsStringAsync();
        Console.WriteLine(result);
    }
}