Introduction
Official API documentation for the public API v1 endpoints. Use these endpoints to integrate location services and other features into your applications.
This documentation aims to provide all the information you need to work with our API.
<aside>As you scroll, you'll see code examples for working with the API in different programming languages in the dark area to the right (or as part of the content on mobile).
You can switch the language used with the tabs at the top right (or from the nav menu at the top left on mobile).</aside>
Authenticating requests
This API is not authenticated.
Calendar
Get Hijri Calendar
Get the Hijri calendar for a specific date. Returns all days of the Hijri month along with miqaat events in that month.
Example request:
curl --request GET \
--get "https://mdo.on-forge.com/api/v1/calendar/1447-07-11?greg=true" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"date\": \"2026-02-19T05:00:14\",
\"greg\": \"1\"
}"
const url = new URL(
"https://mdo.on-forge.com/api/v1/calendar/1447-07-11"
);
const params = {
"greg": "true",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"date": "2026-02-19T05:00:14",
"greg": "1"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"hijri_date": "1447-07-11",
"gregorian_date": "2025-12-30",
"hijri_month_name_full": "Rajab al-Asab",
"hijri_month_name_short": "Rajab",
"hijri_month": "07",
"hijri_year": "1447",
"hijri_year_arabic": "١٤٤٧",
"hijri_month_arabic": "٠٧",
"days": [
{
"hijri_date": "1447-07-01",
"gregorian_date": "2025-12-20",
"hijri_day_arabic": "١",
"gregorian_human_readable_date": "Dec 20",
"gregorian_human_readable_date_long": "20th Dec 2025",
"gregorian_day": "20",
"weekday": "saturday",
"date_formatted": "20th Rajab, 1447H",
"date_formatted_long": "20th Rajab al-Asab, 1447H"
},
{
"hijri_date": "1447-07-02",
"gregorian_date": "2025-12-21",
"hijri_day_arabic": "٢",
"gregorian_human_readable_date": "Dec 21",
"gregorian_human_readable_date_long": "21st Dec 2025",
"gregorian_day": "21",
"weekday": "sunday",
"date_formatted": "21st Rajab, 1447H",
"date_formatted_long": "21st Rajab al-Asab, 1447H"
},
{
"hijri_date": "1447-07-11",
"gregorian_date": "2025-12-30",
"hijri_day_arabic": "١١",
"gregorian_human_readable_date": "Dec 30",
"gregorian_human_readable_date_long": "30th Dec 2025",
"gregorian_day": "30",
"weekday": "tuesday",
"date_formatted": "30th Rajab, 1447H",
"date_formatted_long": "30th Rajab al-Asab, 1447H"
}
],
"miqats": [
{
"name": "Test Miqaat Recurring",
"month": "7",
"day": "1",
"hijri_day": "١",
"year": null,
"hijri_date": "1447-07-01",
"gregorian_date": "2025-12-20",
"gregorian_day": "20",
"gregorian_month": "Dec",
"type": {
"name": "Urus"
},
"location": null,
"link_type": "Video",
"local_link": "https://example.com/local",
"external_link": "https://example.com/external"
},
{
"name": "Test Miqaat One Time",
"month": "7",
"day": "15",
"hijri_day": "١٥",
"year": "1447",
"hijri_date": "1447-07-15",
"gregorian_date": "2026-01-03",
"gregorian_day": "3",
"gregorian_month": "Jan",
"type": {
"name": "Urus"
},
"location": null,
"link_type": "Essay",
"local_link": "https://example.com/local",
"external_link": "https://example.com/external"
}
]
}
Example response (422):
{
"message": "The date field is required.",
"errors": {
"date": [
"The date field is required."
]
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Convert Gregorian to Hijri
Converts a Gregorian date to Hijri date.
Example request:
curl --request GET \
--get "https://mdo.on-forge.com/api/v1/convert/to-hijri/2025-12-30" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"date\": \"2026-02-19T05:00:14\"
}"
const url = new URL(
"https://mdo.on-forge.com/api/v1/convert/to-hijri/2025-12-30"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"date": "2026-02-19T05:00:14"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"date": "1447-07-11",
"date_formatted": "11th Rajab, 1447H",
"date_formatted_long": "11th Rajab al-Asab, 1447H"
}
}
Example response (422):
{
"message": "The date field is required.",
"errors": {
"date": [
"The date field is required."
]
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Convert Hijri to Gregorian
Converts a Hijri date to Gregorian date.
Example request:
curl --request GET \
--get "https://mdo.on-forge.com/api/v1/convert/to-gregorian/1447-07-11" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"date\": \"2026-02-19T05:00:14\"
}"
const url = new URL(
"https://mdo.on-forge.com/api/v1/convert/to-gregorian/1447-07-11"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"date": "2026-02-19T05:00:14"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"date": "2025-12-30",
"date_formatted": "30th Dec, 2025",
"date_formatted_long": "30th December, 2025"
}
}
Example response (422):
{
"message": "The date field is required.",
"errors": {
"date": [
"The date field is required."
]
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Month Miqaat
Get all miqaat events for a specific Hijri month. If no date is provided, uses current Hijri month.
Example request:
curl --request GET \
--get "https://mdo.on-forge.com/api/v1/calendar/1448-01-05/miqaat" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"date\": \"2026-02-19T05:00:14\"
}"
const url = new URL(
"https://mdo.on-forge.com/api/v1/calendar/1448-01-05/miqaat"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"date": "2026-02-19T05:00:14"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"name": "Test Miqaat Recurring",
"month": "1",
"day": "1",
"hijri_day": "١",
"year": null,
"hijri_date": "1448-01-1",
"gregorian_date": "2026-06-15",
"gregorian_day": "15",
"gregorian_month": "Jun",
"type": {
"name": "Urus"
},
"location": null,
"link_type": "",
"local_link": "",
"external_link": ""
},
{
"name": "Test Miqaat One Time",
"month": "1",
"day": "2",
"hijri_day": "٢",
"year": "1448",
"hijri_date": "1448-01-2",
"gregorian_date": "2026-06-16",
"gregorian_day": "16",
"gregorian_month": "Jun",
"type": {
"name": "Urus"
},
"location": null,
"link_type": "",
"local_link": "",
"external_link": ""
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Deprecated
Get Hijri Calendar (Deprecated - Old Endpoint)
deprecated:Use /api/v1/calendar/{date} instead
Example request:
curl --request GET \
--get "https://mdo.on-forge.com/api/v1/hijri/calendar/1447-07-11?greg=true" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"date\": \"2026-02-19T05:00:14\",
\"greg\": \"false\"
}"
const url = new URL(
"https://mdo.on-forge.com/api/v1/hijri/calendar/1447-07-11"
);
const params = {
"greg": "true",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"date": "2026-02-19T05:00:14",
"greg": "false"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"hijri_date": "1447-07-11",
"gregorian_date": "2025-12-30",
"hijri_month_name_full": "Rajab al-Asab",
"hijri_month_name_short": "Rajab",
"hijri_month": "07",
"hijri_year": "1447",
"hijri_year_arabic": "١٤٤٧",
"hijri_month_arabic": "٠٧",
"days": [
{
"hijri_date": "1447-07-01",
"gregorian_date": "2025-12-20",
"hijri_day_arabic": "١",
"gregorian_human_readable_date": "Dec 20",
"gregorian_human_readable_date_long": "20th Dec 2025",
"gregorian_day": "20",
"weekday": "saturday",
"date_formatted": "20th Rajab, 1447H",
"date_formatted_long": "20th Rajab al-Asab, 1447H"
},
{
"hijri_date": "1447-07-02",
"gregorian_date": "2025-12-21",
"hijri_day_arabic": "٢",
"gregorian_human_readable_date": "Dec 21",
"gregorian_human_readable_date_long": "21st Dec 2025",
"gregorian_day": "21",
"weekday": "sunday",
"date_formatted": "21st Rajab, 1447H",
"date_formatted_long": "21st Rajab al-Asab, 1447H"
},
{
"hijri_date": "1447-07-11",
"gregorian_date": "2025-12-30",
"hijri_day_arabic": "١١",
"gregorian_human_readable_date": "Dec 30",
"gregorian_human_readable_date_long": "30th Dec 2025",
"gregorian_day": "30",
"weekday": "tuesday",
"date_formatted": "30th Rajab, 1447H",
"date_formatted_long": "30th Rajab al-Asab, 1447H"
}
],
"miqats": [
{
"name": "Test Miqaat Recurring",
"month": "7",
"day": "1",
"hijri_day": "١",
"year": null,
"hijri_date": "1447-07-01",
"gregorian_date": "2025-12-20",
"gregorian_day": "20",
"gregorian_month": "Dec",
"type": {
"name": "Urus"
},
"location": null,
"link_type": "Video",
"local_link": "https://example.com/local",
"external_link": "https://example.com/external"
},
{
"name": "Test Miqaat One Time",
"month": "7",
"day": "15",
"hijri_day": "١٥",
"year": "1447",
"hijri_date": "1447-07-15",
"gregorian_date": "2026-01-03",
"gregorian_day": "3",
"gregorian_month": "Jan",
"type": {
"name": "Urus"
},
"location": null,
"link_type": "Essay",
"local_link": "https://example.com/local",
"external_link": "https://example.com/external"
}
]
}
Example response (422):
{
"message": "The date field is required.",
"errors": {
"date": [
"The date field is required."
]
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Convert Gregorian to Hijri (Deprecated - Old Endpoint)
deprecated:Use /api/v1/convert/to-hijri/{date} instead
Example request:
curl --request GET \
--get "https://mdo.on-forge.com/api/v1/hijri/greg-to-hijri/2025-12-30" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"date\": \"2026-02-19T05:00:14\"
}"
const url = new URL(
"https://mdo.on-forge.com/api/v1/hijri/greg-to-hijri/2025-12-30"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"date": "2026-02-19T05:00:14"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"date": "1447-07-11",
"date_formatted": "11th Rajab, 1447H",
"date_formatted_long": "11th Rajab al-Asab, 1447H"
}
}
Example response (422):
{
"message": "The date field is required.",
"errors": {
"date": [
"The date field is required."
]
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Month Miqaat (Deprecated - Old Endpoint)
deprecated:Use /api/v1/calendar/{date}/miqaat instead
Example request:
curl --request GET \
--get "https://mdo.on-forge.com/api/v1/get-month-miqats/1448-01-05" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"date\": \"2026-02-19T05:00:14\"
}"
const url = new URL(
"https://mdo.on-forge.com/api/v1/get-month-miqats/1448-01-05"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"date": "2026-02-19T05:00:14"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
[
{
"name": "Test Miqaat Recurring",
"month": "1",
"day": "1",
"hijri_day": "١",
"year": null,
"hijri_date": "1448-01-1",
"gregorian_date": "2026-06-15",
"gregorian_day": "15",
"gregorian_month": "Jun",
"type": {
"name": "Urus"
},
"location": null,
"link_type": "",
"local_link": "",
"external_link": ""
},
{
"name": "Test Miqaat One Time",
"month": "1",
"day": "2",
"hijri_day": "٢",
"year": "1448",
"hijri_date": "1448-01-2",
"gregorian_date": "2026-06-16",
"gregorian_day": "16",
"gregorian_month": "Jun",
"type": {
"name": "Urus"
},
"location": null,
"link_type": "",
"local_link": "",
"external_link": ""
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Locations
Get All Locations
Returns a paginated list of all locations in the database. This endpoint does not accept any search parameters.
Example request:
curl --request GET \
--get "https://mdo.on-forge.com/api/v1/location/all?page=1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://mdo.on-forge.com/api/v1/location/all"
);
const params = {
"page": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": 498,
"type": "city",
"parent_id": null,
"slug": "ahmednagar",
"name": "Ahmednagar",
"state": "Maharashtra",
"country_id": "72",
"latitude": 19.096335,
"longitude": 74.740012,
"altitude": null,
"timezone": "Asia/Kolkata",
"created_at": "2020-05-12T14:26:50.000000Z",
"updated_at": "2020-05-12T14:26:50.000000Z",
"country": "India"
},
{
"id": 267,
"type": "city",
"parent_id": null,
"slug": "nagpur",
"name": "Nagpur",
"state": null,
"country_id": "72",
"latitude": 21.155403,
"longitude": 79.108348,
"altitude": null,
"timezone": "Asia/Kolkata",
"created_at": "2020-05-12T14:26:50.000000Z",
"updated_at": "2020-05-12T14:26:50.000000Z",
"country": "India"
}
],
"links": {
"first": "https://mumineen.org/api/v1/location?page=1",
"last": "https://mumineen.org/api/v1/location?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "https://mumineen.org/api/v1/location?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"path": "https://mumineen.org/api/v1/location",
"per_page": 15,
"to": 2,
"total": 2
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Search Locations
Search for locations by name. Optionally provide a search query to filter results. Returns paginated list of locations matching the criteria.
Example request:
curl --request GET \
--get "https://mdo.on-forge.com/api/v1/location?query=nag&page=1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"query\": \"bngz\"
}"
const url = new URL(
"https://mdo.on-forge.com/api/v1/location"
);
const params = {
"query": "nag",
"page": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"query": "bngz"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": 498,
"type": "city",
"parent_id": null,
"slug": "ahmednagar",
"name": "Ahmednagar",
"state": "Maharashtra",
"country_id": "72",
"latitude": 19.096335,
"longitude": 74.740012,
"altitude": null,
"timezone": "Asia/Kolkata",
"created_at": "2020-05-12T14:26:50.000000Z",
"updated_at": "2020-05-12T14:26:50.000000Z",
"country": "India"
},
{
"id": 267,
"type": "city",
"parent_id": null,
"slug": "nagpur",
"name": "Nagpur",
"state": null,
"country_id": "72",
"latitude": 21.155403,
"longitude": 79.108348,
"altitude": null,
"timezone": "Asia/Kolkata",
"created_at": "2020-05-12T14:26:50.000000Z",
"updated_at": "2020-05-12T14:26:50.000000Z",
"country": "India"
}
],
"links": {
"first": "https://mumineen.org/api/v1/location?page=1",
"last": "https://mumineen.org/api/v1/location?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "https://mumineen.org/api/v1/location?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"path": "https://mumineen.org/api/v1/location",
"per_page": 15,
"to": 2,
"total": 2
}
}
Example response (422):
{
"message": "The query field must be at least 2 characters.",
"errors": {
"query": [
"The query field must be at least 2 characters."
]
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Find Nearest Location
Find the nearest location to the given coordinates. This endpoint searches for the closest location in the database and returns its details along with the calculated distance.
Example request:
curl --request GET \
--get "https://mdo.on-forge.com/api/v1/location/nearest?latitude=21.145066&longitude=79.060033" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"latitude\": -89,
\"longitude\": -179
}"
const url = new URL(
"https://mdo.on-forge.com/api/v1/location/nearest"
);
const params = {
"latitude": "21.145066",
"longitude": "79.060033",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"latitude": -89,
"longitude": -179
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": 267,
"type": "city",
"parent_id": null,
"slug": "nagpur",
"name": "Nagpur",
"state": null,
"country_id": "72",
"latitude": 21.155403,
"longitude": 79.108348,
"altitude": null,
"timezone": "Asia/Kolkata",
"created_at": "2020-05-12T14:26:50.000000Z",
"updated_at": "2020-05-12T14:26:50.000000Z",
"distance": 3.1944586063055374,
"country": "India"
}
}
Example response (404):
{
"message": "No locations found"
}
Example response (422):
{
"message": "The latitude field is required. (and 1 more error)",
"errors": {
"latitude": [
"The latitude field is required."
],
"longitude": [
"The longitude field is required."
]
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Salaat
Get Salaat Times
Get daily prayer (salaat) times for a specific date or date range. Returns all five daily prayers along with additional times like sihori, sunrise, zawaal, and nisful layl.
Example request:
curl --request GET \
--get "https://mdo.on-forge.com/api/v1/salaat?start=2025-12-29&end=2025-12-31&latitude=21.155403&longitude=79.108348&timezone=Asia%2FKolkata&altitude=500" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"start\": \"2026-02-19T05:00:14\",
\"end\": \"2052-03-14\",
\"latitude\": -89,
\"longitude\": -180,
\"timezone\": \"America\\/Bahia_Banderas\",
\"altitude\": 4326.41688
}"
const url = new URL(
"https://mdo.on-forge.com/api/v1/salaat"
);
const params = {
"start": "2025-12-29",
"end": "2025-12-31",
"latitude": "21.155403",
"longitude": "79.108348",
"timezone": "Asia/Kolkata",
"altitude": "500",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"start": "2026-02-19T05:00:14",
"end": "2052-03-14",
"latitude": -89,
"longitude": -180,
"timezone": "America\/Bahia_Banderas",
"altitude": 4326.41688
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"2025-12-29": {
"sihori": "2025-12-29 05:33:00",
"fajr": "2025-12-29 06:12:00",
"sunrise": "2025-12-29 06:48:00",
"zawaal": "2025-12-29 12:16:00",
"zohr_end": "2025-12-29 14:03:00",
"asr_end": "2025-12-29 15:52:00",
"maghrib": "2025-12-29 17:42:00",
"maghrib_end": "2025-12-29 17:51:43",
"nisful_layl": "2025-12-30 00:16:00",
"nisful_layl_end": "2025-12-30 01:20:00"
}
},
"meta": {
"timezone": "Asia/Kolkata",
"timezone_offset": 19800,
"timezone_offset_string": "+05:30",
"start": "2025-12-29",
"end": "2025-12-29",
"latitude": "21.155403",
"longitude": "79.108348",
"altitude": 0
}
}
Example response (422):
{
"message": "The start field is required.",
"errors": {
"start": [
"The start field is required."
]
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Salaat Times (Hijri)
Get daily prayer (salaat) times for a specific Hijri date or date range. Input dates should be in Hijri calendar (Y-m-d format). Returns prayer times with Hijri date keys in the response.
Example request:
curl --request GET \
--get "https://mdo.on-forge.com/api/v1/hijri/salaat?start=1446-06-07&end=1446-06-09&latitude=21.155403&longitude=79.108348&timezone=Asia%2FKolkata&altitude=500" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"start\": \"2026-02-19T05:00:14\",
\"end\": \"2052-03-14\",
\"latitude\": -89,
\"longitude\": -180,
\"timezone\": \"America\\/Bahia_Banderas\",
\"altitude\": 4326.41688
}"
const url = new URL(
"https://mdo.on-forge.com/api/v1/hijri/salaat"
);
const params = {
"start": "1446-06-07",
"end": "1446-06-09",
"latitude": "21.155403",
"longitude": "79.108348",
"timezone": "Asia/Kolkata",
"altitude": "500",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"start": "2026-02-19T05:00:14",
"end": "2052-03-14",
"latitude": -89,
"longitude": -180,
"timezone": "America\/Bahia_Banderas",
"altitude": 4326.41688
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"1447-07-10": {
"sihori": "1447-07-10 05:33:00",
"fajr": "1447-07-10 06:12:00",
"sunrise": "1447-07-10 06:48:00",
"zawaal": "1447-07-10 12:16:00",
"zohr_end": "1447-07-10 14:03:00",
"asr_end": "1447-07-10 15:52:00",
"maghrib": "1447-07-10 17:42:00",
"maghrib_end": "1447-07-11 17:51:43",
"nisful_layl": "1447-07-11 00:16:00",
"nisful_layl_end": "1447-07-11 01:20:00"
}
},
"meta": {
"timezone": "Asia/Kolkata",
"timezone_offset": 19800,
"timezone_offset_string": "+05:30",
"start": "1447-07-10",
"end": "1447-07-10",
"latitude": "21.155403",
"longitude": "79.108348",
"altitude": 0
}
}
Example response (422):
{
"message": "The start field is required.",
"errors": {
"start": [
"The start field is required."
]
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.