Skip to content

Horoscoopweergave

Genereer prachtige SVG- en PNG-horoscoopafbeeldingen.

SVG-horoscopen

Genereer een SVG-geboortehoroscoop met queryparameters:

bash
curl -X GET "https://api.astroapi.cloud/api/chart/image.svg?width=800&height=800&dateTime=1990-06-15T14:30&location.longitude=-0.1278&location.latitude=51.5074&location.timezone=Europe/London" \
  -H "X-Api-Key: your-api-key"

PNG-horoscopen

Converteer naar PNG-formaat:

bash
curl -X GET "https://api.astroapi.cloud/api/chart/image.png?width=800&height=800&dateTime=1990-06-15T14:30&location.longitude=-0.1278&location.latitude=51.5074&location.timezone=Europe/London" \
  -H "X-Api-Key: your-api-key" \
  --output chart.png

Horoscooptypes

EndpointBeschrijving
/api/chart/image.svgGeboortehoroscoop als SVG
/api/chart/image.pngGeboortehoroscoop als PNG
/api/chart/image.svg met transit.* paramsTransit bi-wheel horoscoop
/api/chart/composite.svgComposiethoroscoop (middelpunten)
/api/chart/composite.pngComposiethoroscoop als PNG

Transit bi-wheel horoscoop

Voeg transitparameters toe om een bi-wheel horoscoop te renderen met geboorte (binnenste) en transit (buitenste) wielen:

bash
curl -X GET "https://api.astroapi.cloud/api/chart/image.svg?width=800&height=800&dateTime=1990-06-15T14:30&location.longitude=-0.1278&location.latitude=51.5074&location.timezone=Europe/London&transit.dateTime=2024-01-15T12:00&transit.timezone=Europe/London" \
  -H "X-Api-Key: your-api-key"

Transitparameters

ParameterVerplichtBeschrijving
transit.dateTimeJaTransitdatum/-tijd (YYYY-MM-DDTHH:mm)
transit.timezoneJaTransittijdzone
transit.longitudeNeeTransitlocatie lengtegraad (standaard: geboortelocatie)
transit.latitudeNeeTransitlocatie breedtegraad (standaard: geboortelocatie)

Composiethoroscoop

Genereer een composiethoroscoop met middelpunten tussen twee geboortehoroscopen:

bash
curl -X GET "https://api.astroapi.cloud/api/chart/composite.svg?width=800&height=800&person1.dateTime=1990-06-15T14:30&person1.timezone=Europe/London&person1.longitude=-0.1278&person1.latitude=51.5074&person2.dateTime=1988-03-22T09:15&person2.timezone=Europe/Paris&person2.longitude=2.3522&person2.latitude=48.8566" \
  -H "X-Api-Key: your-api-key"

Queryparameters

Geboortehoroscoop-parameters

ParameterVerplichtBeschrijving
widthJaHoroscoopbreedte in pixels
heightJaHoroscoophoogte in pixels
dateTimeJaGeboortedatum/-tijd (YYYY-MM-DDTHH:mm)
location.longitudeJaGeboortelocatie lengtegraad
location.latitudeJaGeboortelocatie breedtegraad
location.timezoneJaGeboortelocatie tijdzone (IANA-formaat)

Composiethoroscoop-parameters

ParameterVerplichtBeschrijving
widthJaHoroscoopbreedte in pixels
heightJaHoroscoophoogte in pixels
person1.dateTimeJaPersoon 1 geboortedatum/-tijd
person1.timezoneJaPersoon 1 tijdzone
person1.longitudeJaPersoon 1 lengtegraad
person1.latitudeJaPersoon 1 breedtegraad
person2.dateTimeJaPersoon 2 geboortedatum/-tijd
person2.timezoneJaPersoon 2 tijdzone
person2.longitudeJaPersoon 2 lengtegraad
person2.latitudeJaPersoon 2 breedtegraad

Response-headers

Horoscoop-endpoints retourneren de juiste content types:

  • SVG: image/svg+xml
  • PNG: image/png

Horoscopen insluiten

Gebruik de geretourneerde SVG rechtstreeks in HTML:

html
<div class="chart-container">
  <!-- SVG-inhoud van de API -->
</div>

Of gebruik als afbeeldingsbron met data-URL:

html
<img src="data:image/svg+xml;base64,..." alt="Geboortehoroscoop" />

Chart2 - Volgende generatie horoscopen

AstroAPI biedt een hooscoopweergave-engine van de volgende generatie met themaondersteuning en animaties.

Endpoints

EndpointBeschrijvingVereiste module
/api/chart2/natal.svgGeboortehoroscoop (SVG)module:natal-calc
/api/chart2/natal.pngGeboortehoroscoop (PNG)module:natal-calc
/api/chart2/transit.svgTransit bi-wheel (SVG)module:transit-calc
/api/chart2/transit.pngTransit bi-wheel (PNG)module:transit-calc
/api/chart2/synastry.svgSynastriehoroscoop (SVG)module:synastry-calc
/api/chart2/synastry.pngSynastriehoroscoop (PNG)module:synastry-calc
/api/chart2/composite.svgComposiethoroscoop (SVG)module:synastry-calc
/api/chart2/composite.pngComposiethoroscoop (PNG)module:synastry-calc
/api/chart2/animated-transit.svgGeanimeerde transit (SVG)module:transit-calc

Basisgebruik

bash
curl -X GET "https://api.astroapi.cloud/api/chart2/natal.svg?width=800&height=800&dateTime=1990-06-15T14:30&location.longitude=4.89&location.latitude=52.37&location.timezone=Europe/Amsterdam&theme=dark" \
  -H "X-Api-Key: your-api-key"

Themapresets

ThemaBeschrijving
defaultKlassiek met witte achtergrond en gekleurde elementen
classicTraditionele astrologische uitstraling
darkModern donker thema met levendige kleuren
minimalSchoon, minder visuele ruis
colorfulLevendige planeetkleuren
nextgenModern met gebogen aspectlijnen, glow-effecten en verlopen
vintageOud perkament-/manuscriptstijl met sepiatinten
neonCyberpunk met felle neonkleuren op zwart
pastelZachte, rustgevende pastelkleuren
printHoog contrast zwart/wit, geoptimaliseerd voor afdrukken

Thema-overschrijvingen

Pas individuele thema-eigenschappen aan via queryparameters:

ParameterBeschrijving
theme.backgroundAchtergrondkleur (hex)
theme.foregroundVoorgrondkleur (hex)
theme.strokeOnlyAlleen lijnmodus (true/false)
theme.symbolScaleSchaalfactor voor symbolen
theme.showDegreesGradenlabels tonen (true/false)
theme.showHouseNumbersHuisnummers tonen (true/false)
theme.showRulerLiniaal tonen (true/false)
theme.signBackgroundOpacityAchtergrondopaciteit van tekens (0-1)

Synastrie- & composiethoroscopen

bash
curl -X GET "https://api.astroapi.cloud/api/chart2/synastry.svg?width=800&height=800&person1.dateTime=1990-06-15T14:30&person1.timezone=Europe/Amsterdam&person1.longitude=4.89&person1.latitude=52.37&person2.dateTime=1992-03-20T09:15&person2.timezone=Europe/London&person2.longitude=-0.12&person2.latitude=51.50" \
  -H "X-Api-Key: your-api-key"

Geanimeerde transit

Genereer een geanimeerde SVG die transitprogressie over tijd toont:

bash
curl -X GET "https://api.astroapi.cloud/api/chart2/animated-transit.svg?width=800&height=800&dateTime=1990-06-15T14:30&location.longitude=4.89&location.latitude=52.37&location.timezone=Europe/Amsterdam&transit.dateTime=2025-01-01T12:00&transit.timezone=Europe/Amsterdam&target.dateTime=2025-12-31T23:59&animation.duration=3000" \
  -H "X-Api-Key: your-api-key"
ParameterBeschrijving
target.dateTimeEinddatum voor animatie
animation.durationAnimatieduur in milliseconden
animation.easingEasing-functie (standaard: easeInOut)
animation.loopAnimatie herhalen (standaard: false)

AstroAPI Documentation