http://mpt.i906.my/mpt.json
Returns a list of current month's prayer times for a specific location.
This API is deprecrated. Use https://mpt.i906.my/api/prayer/<code>
or https://mpt.i906.my/api/prayer/<latitude>,<longitude>
instead. Also this website should be upgraded soon. Also everything will be open sourced here!
The parameters are passed using GET method.
Parameter | Sample | description | ||||||
---|---|---|---|---|---|---|---|---|
code | kdh-4 | Required. The location code or the location name which prayer times to be obtained. | ||||||
filter | 3 |
One of the values below. If no value is specified, defaults to 3.
|
||||||
appid | mpt-json-api | Used for statistical purposes. The name of the application using this API. | ||||||
appurl | http://mpt.i906.my | Used for statistical purposes. The url of the application using this API. |
code | Returns 200 if the request was successful. Returns 400 if any error occurred. |
||||||||
errorType |
Returns one of the values below if there an error occured.
|
||||||||
errorDescription | The description of the error that has occured. |
times | The prayer times formatted in UNIX timestamp. |
place | The name of the location. |
code | The location code used. |
jakim | The code used to retrieve data from www.esolat.gov.my. |
A sample response from http://mpt.i906.my/mpt.json?code=kdh-4&filter=2
.
{ "meta": { "code": 200 }, "response": { "times": [ [ 1352065560, 1352070180, 1352091840, 1352103840, 1352113200, 1352117460 ], [ 1352151960, 1352156640, 1352178240, 1352190300, 1352199600, 1352203860 ], [ 1352238360, 1352243040, 1352264640, 1352276700, 1352286000, 1352290320 ], [ 1352324760, 1352329440, 1352351040, 1352363100, 1352372400, 1352376720 ], [ 1352411220, 1352415840, 1352437440, 1352449500, 1352458800, 1352463120 ], [ 1352497620, 1352502240, 1352523840, 1352535900, 1352545200, 1352549520 ], [ 1352584020, 1352588700, 1352610240, 1352622300, 1352631600, 1352635920 ] ], "place": "Kubang Pasu", "code": "kdh-4", "jakim": "kdh02" } }