Introduction
Welcome to the Ethiopian Events API! This API allows you to retrieve holidays and events for Ethiopia for any given year. You can use this API to integrate Ethiopian holiday data into your applications, websites, and more.
Base URL
https://api.ethioall.com/events/api
Try the API
Click the button below to fetch Ethiopian events for 2024:
Response:
Click the button to see the response here...
Example API Response Format
[
{
"date": "2024-01-07",
"name": "Ethiopian Christmas (Genna)",
"type": "Public"
},
{
"date": "2024-01-19",
"name": "Epiphany (Timkat)",
"type": "Public"
},
{
"date": "2024-03-02",
"name": "Adwa Victory Day",
"type": "Public"
}
]
Fields in the Response:
- date: The date of the event in
YYYY-MM-DDformat. - name: The name of the event or holiday.
- type: The type of event (e.g., "Public").
How to Use the Ethiopian Events API
You can access the API by making a GET request to the following endpoint:
https://api.ethioall.com/events/api?country=ET&year=2024
Parameters:
- country: The country code (e.g.,
ETfor Ethiopia). - year: The year for which you want to fetch events (e.g.,
2024).
Example Request with cURL
curl -X GET "https://api.ethioall.com/events/api?country=ET&year=2024"
Examples in Different Programming Languages
PHP Example
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.ethioall.com/events/api?country=ET&year=2024");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
if ($response !== false) {
$data = json_decode($response, true);
print_r($data);
}
curl_close($ch);
?>
Python Example
import requests
url = "https://api.ethioall.com/events/api?country=ET&year=2024"
response = requests.get(url)
if response.status_code == 200:
data = response.json()
print(data)
JavaScript (Node.js) Example
const axios = require('axios');
axios.get('https://api.ethioall.com/events/api?country=ET&year=2024')
.then((response) => {
console.log(response.data);
});
Ruby Example
require 'net/http'
require 'json'
url = URI.parse("https://api.ethioall.com/events/api?country=ET&year=2024")
response = Net::HTTP.get(url)
data = JSON.parse(response)
puts data
Error Handling
The API responds with an HTTP status code. Common error codes:
- 400 Bad Request: The request was not formatted properly.
- 404 Not Found: The requested resource could not be found.
- 500 Internal Server Error: An error occurred on the server.
Use Cases
- Integrate into websites to display Ethiopian holidays.
- Use in mobile applications to show event calendars.
- Develop cultural and religious applications.
- Provide educational platforms with Ethiopian event details.
- Create tools for event planning and scheduling.