Skip to content

Node.js Code Snippets for Dakidarts Numerology API

These examples demonstrate how to call Core, Karmic, Cycles, and Horoscope endpoints using Node.js and your RapidAPI key.


Setup

const axios = require('axios');

const headers = {
    'x-rapidapi-key': 'YOUR_RAPIDAPI_KEY',
    'Content-Type': 'application/json'
};

async function getRequest(url, params = {}) {
    const response = await axios.get(url, { params, headers });
    return response.data;
}

async function postRequest(url, payload = {}) {
    const response = await axios.post(url, payload, { headers });
    return response.data;
}

Example 1: Attitude Number

const url = "https://the-numerology-api.p.rapidapi.com/attitude_number";
const params = { birth_day: "14", birth_month: "3" };

getRequest(url, params).then(console.log).catch(console.error);

Example 2: Challenge Number

const url = "https://the-numerology-api.p.rapidapi.com/challenge_number/post";
const payload = { birth_year: 1990, birth_month: 5, birth_day: 15 };

postRequest(url, payload).then(console.log).catch(console.error);

Example 3: Karmic Debt

const url = "https://the-numerology-api.p.rapidapi.com/karmic_debt";
const params = { birth_year: "2023", birth_month: "6", birth_day: "28" };

getRequest(url, params).then(console.log).catch(console.error);

Example 4: Karmic Lessons

const url = "https://the-numerology-api.p.rapidapi.com/karmic_lessons";
const params = { full_name: "John Doe Smith" };

getRequest(url, params).then(console.log).catch(console.error);

Example 5: Life Path Number

const url = "https://the-numerology-api.p.rapidapi.com/life_path";
const params = { birth_year: "1990", birth_month: "5", birth_day: "12" };

getRequest(url, params).then(console.log).catch(console.error);

Example 6: Personality Number

const url = "https://the-numerology-api.p.rapidapi.com/personality_number/post";
const payload = { first_name: "John", middle_name: "Robert", last_name: "Doe" };

postRequest(url, payload).then(console.log).catch(console.error);

Example 7: Destiny Number

const url = "https://the-numerology-api.p.rapidapi.com/destiny_number";
const params = { first_name: "John", middle_name: "Doe", last_name: "Smith" };

getRequest(url, params).then(console.log).catch(console.error);

Example 8: Heart Desire Number

const url = "https://the-numerology-api.p.rapidapi.com/heart_desire";
const params = { first_name: "John", middle_name: "Robert", last_name: "Doe" };

getRequest(url, params).then(console.log).catch(console.error);

Example 9: Personal Year

const url = "https://the-numerology-api.p.rapidapi.com/personal_year";
const params = { prediction_year: "2023", birth_month: "12", birth_day: "3" };

getRequest(url, params).then(console.log).catch(console.error);

Example 10: Ancestor Reading

const url = "https://the-numerology-api.p.rapidapi.com/ancestor-reading";
const params = { family_name: "Etuge" };

getRequest(url, params).then(console.log).catch(console.error);

Example 11: Planes Of Expression

const url = "https://the-numerology-api.p.rapidapi.com/planes-of-expression";
const payload = { fullname: "Jesus Christ" };

postRequest(url, payload).then(console.log).catch(console.error);

Example 12: Today Horoscope

const url = "https://the-numerology-api.p.rapidapi.com/horoscope/today";
const params = { dob: "2002-02-22" };

getRequest(url, params).then(console.log).catch(console.error);

Example 13: Today Career Horoscope

const url = "https://the-numerology-api.p.rapidapi.com/horoscope/career/today";
const payload = { dob: "1995-08-20" };

postRequest(url, payload).then(console.log).catch(console.error);

Example 14: Today Health Horoscope

const url = "https://the-numerology-api.p.rapidapi.com/horoscope/health/today";
const params = { dob: "1995-08-20" };

getRequest(url, params).then(console.log).catch(console.error);

Example 15: Planetary Daily Horoscope

const url = "https://the-numerology-api.p.rapidapi.com/horoscope/planetary/daily";
const params = { dob: "1990-01-01", day: "today" };

getRequest(url, params).then(console.log).catch(console.error);

Example 16: Essence Cycle

const url = "https://the-numerology-api.p.rapidapi.com/essence-cycle";
const params = { full_name: "Alexander Graham Bell", dob: "1847-03-03", start_year: "1847" };

getRequest(url, params).then(console.log).catch(console.error);

Example 17: Transits

const url = "https://the-numerology-api.p.rapidapi.com/transits";
const payload = { full_name: "Alexander Graham Bell", dob: "1847-03-03" };

postRequest(url, payload).then(console.log).catch(console.error);

Note

  • Replace "YOUR_RAPIDAPI_KEY" with your valid RapidAPI key.
  • Use GET for endpoints with query parameters and POST for endpoints requiring JSON payload.
  • All endpoints follow a consistent structure across Core, Karmic, Cycles, and Horoscope data.