MENU navbar-image

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."
        ]
    }
}
 

Request      

GET api/v1/calendar/{date}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

date   string     

The date in Y-m-d format. Example: 1447-07-11

Query Parameters

greg   string  optional    

If true or 1, the date parameter is treated as a Gregorian date. If false, 0, or absent, treated as a Hijri date. Example: true

Body Parameters

date   string     

Must be a valid date. Example: 2026-02-19T05:00:14

greg   string  optional    

Example: 1

Must be one of:
  • true
  • 1
  • false
  • 0
  • true
  • 1
  • false
  • 0

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."
        ]
    }
}
 

Request      

GET api/v1/convert/to-hijri/{date}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

date   string     

The Gregorian date in Y-m-d format. Example: 2025-12-30

Body Parameters

date   string     

Must be a valid date. Example: 2026-02-19T05:00:14

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."
        ]
    }
}
 

Request      

GET api/v1/convert/to-gregorian/{date}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

date   string     

The Hijri date in Y-m-d format. Example: 1447-07-11

Body Parameters

date   string     

Must be a valid date. Example: 2026-02-19T05:00:14

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": ""
        }
    ]
}
 

Request      

GET api/v1/calendar/{date?}/miqaat

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

date   string  optional    

The Hijri date in Y-m-d format (e.g., 1448-01-05). If not provided, uses current Hijri date. Example: 1448-01-05

Body Parameters

date   string  optional    

Must be a valid date. Example: 2026-02-19T05:00:14

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."
        ]
    }
}
 

Request      

GET api/v1/hijri/calendar/{date}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

date   string     

The date in Y-m-d format. Example: 1447-07-11

Query Parameters

greg   string  optional    

If true or 1, the date parameter is treated as a Gregorian date. If false, 0, or absent, treated as a Hijri date. Example: true

Body Parameters

date   string     

Must be a valid date. Example: 2026-02-19T05:00:14

greg   string  optional    

Example: false

Must be one of:
  • true
  • 1
  • false
  • 0
  • true
  • 1
  • false
  • 0

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."
        ]
    }
}
 

Request      

GET api/v1/hijri/greg-to-hijri/{date}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

date   string     

The Gregorian date in Y-m-d format. Example: 2025-12-30

Body Parameters

date   string     

Must be a valid date. Example: 2026-02-19T05:00:14

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": ""
    }
]
 

Request      

GET api/v1/get-month-miqats/{date?}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

date   string  optional    

The Hijri date in Y-m-d format (e.g., 1448-01-05). If not provided, uses current Hijri date. Example: 1448-01-05

Body Parameters

date   string  optional    

Must be a valid date. Example: 2026-02-19T05:00:14

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": "&laquo; Previous",
                "active": false
            },
            {
                "url": "https://mumineen.org/api/v1/location?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next &raquo;",
                "active": false
            }
        ],
        "path": "https://mumineen.org/api/v1/location",
        "per_page": 15,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/v1/location/all

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

page   integer  optional    

The page number for pagination. Example: 1

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": "&laquo; Previous",
                "active": false
            },
            {
                "url": "https://mumineen.org/api/v1/location?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next &raquo;",
                "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."
        ]
    }
}
 

Request      

GET api/v1/location

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

query   string  optional    

Optional search query to filter locations by name. Minimum 2 characters. If not provided, returns all locations. Example: nag

page   integer  optional    

The page number for pagination. Example: 1

Body Parameters

query   string  optional    

Must be at least 2 characters. Example: bngz

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."
        ]
    }
}
 

Request      

GET api/v1/location/nearest

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

latitude   number     

The latitude coordinate. Must be between -90 and 90. Example: 21.145066

longitude   number     

The longitude coordinate. Must be between -180 and 180. Example: 79.060033

Body Parameters

latitude   number     

Must be between -90 and 90. Example: -89

longitude   number     

Must be between -180 and 180. Example: -179

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."
        ]
    }
}
 

Request      

GET api/v1/salaat

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

start   string     

The start date in any parseable format (e.g., Y-m-d, m/d/Y). Example: 2025-12-29

end   string  optional    

optional The end date in any parseable format. If not provided, only the start date is returned. Must be within 1 year of start date. Example: 2025-12-31

latitude   number     

The latitude coordinate. Must be between -90 and 90. Example: 21.155403

longitude   number     

The longitude coordinate. Must be between -180 and 180. Example: 79.108348

timezone   string  optional    

optional The PHP timezone identifier (e.g., Asia/Kolkata, America/New_York). Defaults to UTC. Example: Asia/Kolkata

altitude   string  optional    

numeric optional The altitude in meters. Defaults to 0. Example: 500

Body Parameters

start   string     

Must be a valid date. Example: 2026-02-19T05:00:14

end   string  optional    

Must be a valid date. Must be a date after or equal to start. Example: 2052-03-14

latitude   number     

Must be between -90 and 90. Example: -89

longitude   number     

Must be between -180 and 180. Example: -180

timezone   string  optional    

Must be a valid time zone, such as Africa/Accra. Example: America/Bahia_Banderas

altitude   number  optional    

Example: 4326.41688

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."
        ]
    }
}
 

Request      

GET api/v1/hijri/salaat

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

start   string     

The start Hijri date in Y-m-d format (e.g., 1446-06-07). Example: 1446-06-07

end   string  optional    

optional The end Hijri date in Y-m-d format. If not provided, only the start date is returned. Must be within 1 year of start date. Example: 1446-06-09

latitude   number     

The latitude coordinate. Must be between -90 and 90. Example: 21.155403

longitude   number     

The longitude coordinate. Must be between -180 and 180. Example: 79.108348

timezone   string  optional    

optional The PHP timezone identifier (e.g., Asia/Kolkata, America/New_York). Defaults to UTC. Example: Asia/Kolkata

altitude   string  optional    

numeric optional The altitude in meters. Defaults to 0. Example: 500

Body Parameters

start   string     

Must be a valid date. Example: 2026-02-19T05:00:14

end   string  optional    

Must be a valid date. Must be a date after or equal to start. Example: 2052-03-14

latitude   number     

Must be between -90 and 90. Example: -89

longitude   number     

Must be between -180 and 180. Example: -180

timezone   string  optional    

Must be a valid time zone, such as Africa/Accra. Example: America/Bahia_Banderas

altitude   number  optional    

Example: 4326.41688