Skip to content

Getting Started with The Numerology API

This guide walks you through authentication, base URL, required headers, error handling, and a first working request for the Life Path Number endpoint.


1. Sign Up & Get Your API Key

  1. Go to the RapidAPI dashboard.
  2. Subscribe to a plan (Free tier = 100 req/mo).
  3. Copy your x-rapidapi-key.

2. Base URL & Host Header

Item Value
Base URL https://the-numerology-api.p.rapidapi.com
Host header the-numerology-api.p.rapidapi.com

Tip: Always include both headers – RapidAPI validates the host.


3. Required Headers (All Requests)

x-rapidapi-key: YOUR_RAPIDAPI_KEY
x-rapidapi-host: the-numerology-api.p.rapidapi.com
Content-Type: application/json   (only for POST bodies)

4. First Request – Life Path Number (GET)

curl --request GET \
  --url "https://the-numerology-api.p.rapidapi.com/life_path?birth_year=1990&birth_month=5&birth_day=15" \
  --header "x-rapidapi-key: YOUR_RAPIDAPI_KEY" \
  --header "x-rapidapi-host: the-numerology-api.p.rapidapi.com"

Response

{
  "life_path_number": 7,
  "summary": "The life path number 7 embodies introspection, spirituality and analytical thinking.",
  "detailed_meaning": "Number 7 represents introspection, spirituality..."
}

5. POST Variant (JSON Body)

curl --request POST \
  --url https://the-numerology-api.p.rapidapi.com/life_path/post \
  --header "x-rapidapi-key: YOUR_RAPIDAPI_KEY" \
  --header "x-rapidapi-host: the-numerology-api.p.rapidapi.com" \
  --header "Content-Type: application/json" \
  --data '{
    "birth_year": "1990",
    "birth_month": "5",
    "birth_day": "15"
  }'

6. Language-Specific Snippets

Python (requests)

import requests

url = "https://the-numerology-api.p.rapidapi.com/life_path"
params = {"birth_year": "1990", "birth_month": "5", "birth_day": "15"}
headers = {
    "x-rapidapi-key": "YOUR_RAPIDAPI_KEY",
    "x-rapidapi-host": "the-numerology-api.p.rapidapi.com"
}

response = requests.get(url, headers=headers, params=params)
print(response.json())

PHP (cURL)

<?php
$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => "https://the-numerology-api.p.rapidapi.com/life_path?birth_year=1990&birth_month=5&birth_day=15",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        "x-rapidapi-host: the-numerology-api.p.rapidapi.com",
        "x-rapidapi-key: YOUR_RAPIDAPI_KEY"
    ],
]);

$response = curl_exec($curl);
curl_close($curl);
echo $response;
?>

JavaScript (Fetch)

const url = new URL("https://the-numerology-api.p.rapidapi.com/life_path");
url.searchParams.append("birth_year", "1990");
url.searchParams.append("birth_month", "5");
url.searchParams.append("birth_day", "15");

fetch(url, {
    method: "GET",
    headers: {
        "x-rapidapi-key": "YOUR_RAPIDAPI_KEY",
        "x-rapidapi-host": "the-numerology-api.p.rapidapi.com"
    }
})
.then(r => r.json())
.then(console.log);

Node.js (axios)

const axios = require('axios');

axios.get('https://the-numerology-api.p.rapidapi.com/life_path', {
    params: { birth_year: 1990, birth_month: 5, birth_day: 15 },
    headers: {
        'x-rapidapi-key': 'YOUR_RAPIDAPI_KEY',
        'x-rapidapi-host': 'the-numerology-api.p.rapidapi.com'
    }
})
.then(res => console.log(res.data));

7. Common Errors & Troubleshooting

Code Meaning Fix
400 Missing required param Supply birth_year, birth_month, birth_day (or name fields)
401 Invalid API key Double-check x-rapidapi-key
429 Rate limit exceeded Upgrade plan or wait for next month
500 Server error Retry; report via GitHub Issues

8. Next Steps