Skip to content

Content & Interpretations

Access the comprehensive library of astrological interpretations.

Overview

The Content API provides access to interpretation texts for:

  • Planet in sign placements
  • Planet in house placements
  • Aspects between planets
  • Transit interpretations
  • Synastry interpretations

Listing Content

List content by horoscope type and content type:

bash
curl -X GET "https://api.astroapi.cloud/api/content/natal/planet-in-sign?page[size]=20" \
  -H "X-Api-Key: your-api-key"

Content Types

TypeDescription
planet-in-signPlanet placement in zodiac sign
planet-in-housePlanet placement in house
aspectAspect between two planets
transitTransit interpretation
synastrySynastry aspect interpretation

Horoscope Types

TypeDescription
natalNatal chart interpretations
transitTransit interpretations
synastrySynastry interpretations
compositeComposite chart interpretations

Fetching by ID

bash
curl -X GET "https://api.astroapi.cloud/api/content/natal/planet-in-sign/abc123" \
  -H "X-Api-Key: your-api-key"

Response

json
{
  "data": {
    "type": "content",
    "id": "abc123",
    "attributes": {
      "title": "Sun in Gemini",
      "body": "With your Sun in Gemini, you possess a quick, curious mind...",
      "urn": "urn:content:1:natal:planet-in-sign:sun:gemini:en"
    }
  }
}

Markdown Format

The body field in content responses is formatted as Markdown. This allows for rich text formatting including headings, bold/italic text, lists, and more.

If you want to display the content as HTML in your application, you'll need to convert the Markdown to HTML using a markdown parser library.

JavaScript/TypeScript

javascript
import { marked } from "marked";

const html = marked.parse(content.body);

Or with markdown-it:

javascript
import MarkdownIt from "markdown-it";

const md = new MarkdownIt();
const html = md.render(content.body);

Python

python
import markdown

html = markdown.markdown(content["body"])

PHP

php
use League\CommonMark\CommonMarkConverter;

$converter = new CommonMarkConverter();
$html = $converter->convert($content['body']);

Filtering by Title

Search content by title using the filter query parameter:

bash
curl -X GET "https://api.astroapi.cloud/api/content/natal/planet-in-sign?filter=title:*sun*" \
  -H "X-Api-Key: your-api-key"

Including Interpretations with Calculations

The recommended way to get interpretation texts is to include them directly with your calculation requests using the includeText parameter:

bash
curl -X POST "https://api.astroapi.cloud/api/calc/natal" \
  -H "X-Api-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "dateTime": "1990-06-15T14:30",
    "location": {
      "latitude": 51.5074,
      "longitude": -0.1278,
      "timezone": "Europe/London"
    },
    "includeText": true,
    "language": "en"
  }'

This enriches your calculation response with interpretation texts for each placement and aspect.

Pagination

Use JSON:API pagination parameters:

bash
curl -X GET "https://api.astroapi.cloud/api/content/natal/planet-in-sign?page[size]=10&page[number]=0" \
  -H "X-Api-Key: your-api-key"

The response includes a links.next URL for the next page of results.

AstroAPI Documentation