Wix
Add astrology features to your Wix site with Occult API.
Velo by Wix
Use Velo (Wix's dev platform) to call the API from backend code.
Backend Script
Show a Velo backend script:
import { fetch } from 'wix-fetch';
export async function getHoroscope(sign) {
const apiKey = environment['OCCULT_API_KEY'];
const response = await fetch('https://api.occultapi.com/api/astro/rashifal/daily/', {
method: 'POST',
headers: {
'X-API-Key': apiKey,
'Content-Type': 'application/json',
},
body: JSON.stringify({ rashi: sign }),
});
return response.json();
}Frontend
Use a dataset or custom element to display the result.
Notes
Never expose API keys in frontend code; use backend Velo functions.