API Documentation
Search Names
Search for when a specific name is celebrated across different countries and traditions.
GET
/api/searchQuery Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
q | string | Yes | Search query (minimum 2 characters) |
Example Request
Search for when "John" is celebrated:
curl -X GET 'https://name.birrday.com/api/search?q=John'Search for "Maria":
curl -X GET 'https://name.birrday.com/api/search?q=Maria'Response
A successful response returns all matching nameday celebrations:
{
"results": [
{
"name": "Ιωάννης",
"nameEn": "Ioannis",
"date": "2024-01-07",
"countryCode": "GR",
"countryName": "Greece",
"calendarName": "Greek Orthodox Calendar"
},
{
"name": "Jan",
"nameEn": "John",
"date": "2024-06-24",
"countryCode": "PL",
"countryName": "Poland",
"calendarName": "Polish Catholic Calendar"
}
]
}Response Fields
| Field | Type | Description |
|---|---|---|
name | string | Name in native language |
nameEn | string | null | English translation |
date | string | Nameday date (YYYY-MM-DD) |
countryCode | string | Country code |
countryName | string | Full country name |
calendarName | string | Calendar name |
Search Behavior
Name Matching
The search endpoint uses intelligent matching to find names:
- Case-insensitive: "john", "John", and "JOHN" all match
- Transliteration: Searches both local and English forms
- Partial matching: "Maria" matches "Mary", "Marie", etc.
- Diacritics: Handles accented characters correctly
Multiple Results
The same name may be celebrated on different dates across countries and traditions. Results are sorted by date (earliest first).
Error Responses
Missing or Too Short Query
If the query is missing or less than 2 characters, an empty results array is returned:
{
"results": []
}No Results Found
If no matching names are found, an empty results array is returned:
{
"results": []
}