NAV -image
bash javascript

Introduction

This documentation aims to provide all the information you need to work with our API.

Base URL

https://nameday.abalin.net

Authenticating requests

This API is not authenticated.

Endpoints

supported

Example request:

curl -X GET \
    -G "https://nameday.abalin.net/supported" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://nameday.abalin.net/supported"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


<!doctype html>
<html lang="en">
<head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <!-- Bootstrap CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css" rel="stylesheet">

    <title></title>
</head>
<body>
<div class="container">
    <div class="row mt-4">
        <div class="col-sm">
                <p class="h2 text-center">Any of these codes can be used and are currently supported</p>

    <p class="lead text-center">
        <mark>Country</mark>, <mark>Country code</mark> or <mark>Alpha3 code</mark> can be used as parameters in your request
    </p>

    <p class="lead text-center">
        <a href="http://nameday.abalin.net"><button type="button" class="btn btn-info" id="docs">Back to API documentation</button></a>
    </p>

    <table class="table table-striped">
        <thead>
        <tr>

            <th scope="col">Country</th>
            <th scope="col">Country code</th>
            <th scope="col">Alpha3 code</th>
        </tr>
        </thead>
        <tbody>

        <tr>

            <td>Austria</td>
            <td>at</td>
            <td>aut</td>
        </tr>

        <tr>

            <td>Czechia</td>
            <td>cz</td>
            <td>cze</td>
        </tr>

        <tr>

            <td>Finland</td>
            <td>fi</td>
            <td>fin</td>
        </tr>

        <tr>

            <td>Greece</td>
            <td>gr</td>
            <td>grc</td>
        </tr>

        <tr>

            <td>Latvia</td>
            <td>lv</td>
            <td>lva</td>
        </tr>

        <tr>

            <td>Russian Federation</td>
            <td>ru</td>
            <td>rus</td>
        </tr>

        <tr>

            <td>Sweden</td>
            <td>se</td>
            <td>swe</td>
        </tr>

        <tr>

            <td>Bulgaria</td>
            <td>bg</td>
            <td>bgr</td>
        </tr>

        <tr>

            <td>Denmark</td>
            <td>dk</td>
            <td>dnk</td>
        </tr>

        <tr>

            <td>France</td>
            <td>fr</td>
            <td>fra</td>
        </tr>

        <tr>

            <td>Hungary</td>
            <td>hu</td>
            <td>hun</td>
        </tr>

        <tr>

            <td>Lithuania</td>
            <td>lt</td>
            <td>ltu</td>
        </tr>

        <tr>

            <td>Slovakia</td>
            <td>sk</td>
            <td>svk</td>
        </tr>

        <tr>

            <td>United States of America</td>
            <td>us</td>
            <td>usa</td>
        </tr>

        <tr>

            <td>Croatia</td>
            <td>hr</td>
            <td>hrv</td>
        </tr>

        <tr>

            <td>Estonia</td>
            <td>ee</td>
            <td>est</td>
        </tr>

        <tr>

            <td>Germany</td>
            <td>de</td>
            <td>deu</td>
        </tr>

        <tr>

            <td>Italy</td>
            <td>it</td>
            <td>ita</td>
        </tr>

        <tr>

            <td>Poland</td>
            <td>pl</td>
            <td>pol</td>
        </tr>

        <tr>

            <td>Spain</td>
            <td>es</td>
            <td>esp</td>
        </tr>
                </tbody>
    </table>

        </div>
    </div>
</div>

<!-- Option 1: Bootstrap Bundle with Popper -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/js/bootstrap.bundle.min.js"></script>

</body>
</html>

Request      

GET supported

Nameday Endpoints

APIs for retrieving namedays.

Contact author via E-mail or via Telegram

Timezones that can be used

List of Supported Timezones

External libraries

Programming language Repository Author
PHP GitHub VojtΔ›ch Nekvapil
Java Script GitHub Jakub Kot
Java Script NPM Jakub Kot
Java GitHub Degubi

Any of these codes can be used and are currently supported

Get nameday for today

[Retrieves nameday for today]

Example request:

curl -X POST \
    "https://nameday.abalin.net/today" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"country":"hungary","timezone":"Pacific\/Palau"}'
const url = new URL(
    "https://nameday.abalin.net/today"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "country": "hungary",
    "timezone": "Pacific\/Palau"
}

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):

{
    "status": "Success",
    "data": {
        "month": 4,
        "day": 14,
        "namedays": {
            "at": "Elmo, Erna, Ernestine"
        }
    }
}

Example response (404):

{
    "status": "Error",
    "message": "Wrong country code, check documentation."
}

Example response (404):

{
    "status": "Error",
    "message": "Invalid timezone europe\/Londonn"
}

Request      

POST today

Body Parameters

country  string optional  
Country code or country name.

timezone  string optional  
Timezones supported by PHP

Get nameday for tomorrow

[Retrieves nameday for tomorrow]

Example request:

curl -X POST \
    "https://nameday.abalin.net/tomorrow" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"country":"hungary","timezone":"Pacific\/Palau"}'
const url = new URL(
    "https://nameday.abalin.net/tomorrow"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "country": "hungary",
    "timezone": "Pacific\/Palau"
}

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):

{
    "status": "Success",
    "data": {
        "month": 4,
        "day": 14,
        "namedays": {
            "at": "Elmo, Erna, Ernestine"
        }
    }
}

Example response (404):

{
    "status": "Error",
    "message": "Wrong country code, check documentation."
}

Example response (404):

{
    "status": "Error",
    "message": "Invalid timezone europe\/Londonn"
}

Request      

POST tomorrow

Body Parameters

country  string optional  
Country code or country name.

timezone  string optional  
Timezones supported by PHP

Get nameday for yesterday

[Retrieves nameday for yesterday]

Example request:

curl -X POST \
    "https://nameday.abalin.net/yesterday" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"country":"hungary","timezone":"Pacific\/Palau"}'
const url = new URL(
    "https://nameday.abalin.net/yesterday"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "country": "hungary",
    "timezone": "Pacific\/Palau"
}

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):

{
    "status": "Success",
    "data": {
        "month": 4,
        "day": 14,
        "namedays": {
            "at": "Elmo, Erna, Ernestine"
        }
    }
}

Example response (404):

{
    "status": "Error",
    "message": "Wrong country code, check documentation."
}

Example response (404):

{
    "status": "Error",
    "message": "Invalid timezone europe\/Londonn"
}

Request      

POST yesterday

Body Parameters

country  string optional  
Country code or country name.

timezone  string optional  
Timezones supported by PHP

Search nameday date by name

[Retrieves date for given name and country]

Example request:

curl -X POST \
    "https://nameday.abalin.net/getdate" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"name":"vojtech","country":"sk"}'
const url = new URL(
    "https://nameday.abalin.net/getdate"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "vojtech",
    "country": "sk"
}

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):

{
    "status": "Success",
    "data": {
        "resultCount": 1,
        "namedays": [
            {
                "day": 23,
                "month": 4,
                "name": "Vojtech",
                "countryCode": "SK",
                "countryName": "Slovakia"
            }
        ]
    }
}

Example response (200):

{
    "status": "Success",
    "data": {
        "resultCount": 0,
        "namedays": []
    }
}

Example response (404):

{
    "status": "Error",
    "message": "Wrong country code, check documentation"
}

Request      

POST getdate

Body Parameters

name  string  
Name to search for

country  string  
Country code or country name.

Get name day for a specific day

[Retrieves name day for specific day. Can be filtered by country]

Example request:

curl -X POST \
    "https://nameday.abalin.net/namedays" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"country":"swe","day":28,"month":2}'
const url = new URL(
    "https://nameday.abalin.net/namedays"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "country": "swe",
    "day": 28,
    "month": 2
}

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):

{
    "status": "Success",
    "data": {
        "date": "02\/28",
        "namedays": {
            "se": "Maria"
        }
    }
}

Example response (200):

{
    "status": "Success",
    "data": {
        "date": "02\/29",
        "namedays": {
            "se": "n\/a"
        }
    }
}

Example response (404):

{
    "status": "Error",
    "message": "Wrong country code, check documentation"
}

Example response (404):

{
    "status": "Error",
    "message": "Invalid date provided"
}

Request      

POST namedays

Body Parameters

country  string  
Country code or country name.

day  integer  
Day in month

month  integer  
Month in year