Widgets

One script gives you five elements. They inherit nothing from your page's styles, and you can recolour them.

<script src="https://developers.astrologics.in/widgets/v1.js" defer></script>
<astrologics-panchang key="YOUR_PUBLISHABLE_KEY" lat="28.6139" lon="77.209" lang="hi"></astrologics-panchang>
Element Shows Needs
astrologics-panchang Today's tithi, nakshatra, yoga, sunrise and Rahu kaal key or endpoint
astrologics-horoscope One sign's reading and scores. Leave out sign to let visitors choose key or endpoint
astrologics-kundli A birth form, then lagna and planets endpoint
astrologics-match Two birth forms, then the Ashtakoot score endpoint
astrologics-vastu Plot size and direction, then findings endpoint

Publishable key or your own server

A publishable key works in the browser, but only for operations that carry no birth data and only on the domains you list for it. So the kundli, matching and Vastu widgets need endpoint: the address of a server of yours that holds the secret key. The WordPress plugin is one ready-made server.

Your server answers these routes under endpoint, each passing the API's JSON through:

Route Calls
GET /panchang GET /v1/panchang
GET /horoscope/{sign} GET /v1/horoscope/{sign}
GET /places?q= GET /v1/places/search
POST /kundli POST /v1/kundli
POST /match POST /v1/match/ashtakoot
POST /vastu POST /v1/vastu/plot
POST /report/{kundli,match,vastu} The PDF reports, adding your brand. Only with data-report on the element

Each visitor's call spends your credits, so limit calls per visitor on your server. Do not log birth details.

Language and colours

Set lang="hi" for Hindi. Labels, signs, and panchang, horoscope and Vastu text are Hindi. In the kundli and matching results, planet and nakshatra names and matching notes stay in English.

astrologics-kundli { --astro-accent: #1f4e79; --astro-font: Georgia, serif; --astro-radius: 4px; }

You can also set --astro-ink, --astro-muted, --astro-bg and --astro-rule.

On a store: see the Shopify guide and the WordPress plugin.