data.gov.my API
Returns Malaysian open data including dataset rows, weather forecasts and warnings, fuel prices, and consumer price indices.
View as Markdown| GET | /datagovmy/catalogue | Rows of one open dataset of data.gov.my, such as the monthly consumer price index (cpi_headline). |
| GET | /datagovmy/weatherForecast | The daily weather forecast of the locations whose name contains the text, from the Malaysian Meteorological Department. |
| GET | /datagovmy/weatherWarnings | The latest weather warnings issued for Malaysia, newest first. |
| GET | /datagovmy/fuelPrices | Weekly retail fuel prices in ringgit per litre: RON95, RON97 and diesel, newest first. |
| GET | /datagovmy/cpiHeadline | Monthly consumer price index of Malaysia (base 2010 = 100) for the overall index and each division, newest first. |
| GET | /datagovmy/cpiState | Monthly consumer price index of each Malaysian state, newest first. |
| GET | /datagovmy/cpiStrata | Monthly consumer price index of Malaysia split into urban and rural areas, for each division, newest first. |
| GET | /datagovmy/labourForce | Monthly labour force survey of Malaysia: labour force, employed and unemployed in thousands, and the rates in per cent. |
| GET | /datagovmy/gdpQuarterly | Quarterly gross domestic product of Malaysia at constant prices, in million ringgit, newest first. |
| GET | /datagovmy/population | Population of each Malaysian state by year, in thousands, newest first; all ages and both sexes. |
catalogue
/v1/datagovmy/catalogueRows of one open dataset of data.gov.my, such as the monthly consumer price index (cpi_headline).
Parameters
idstring required | Data catalogue id, such as cpi_headline. e.g. cpi_headline |
limitinteger | Items per page, 1 to 1000. default 100 |
tunnelstring | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
proxystring | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
profileIdstring | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |
Response data
2 fields
date | string |
values | map |
curl "https://api.hoshime.com/v1/datagovmy/catalogue?id=cpi_headline" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/datagovmy/catalogue?id=cpi_headline", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/datagovmy/catalogue?id=cpi_headline", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "data": [ { "date": "1986-12-01", "values": { "division": "03", "index": "105.5" } }, { "date": "1987-01-01", "values": { "division": "03", "index": "105.4" } } ], "meta": { "cached": false, "endpoint": "catalogue", "fetchedAt": "2026-11-06T09:41:00Z", "pagination": { "nextCursor": "EpcDEgV…", "hasMore": true, "total": null }, "platform": "datagovmy", "requestId": "req_2Xb9kQ…", "units": 1 } }
weatherForecast
/v1/datagovmy/weatherForecastThe daily weather forecast of the locations whose name contains the text, from the Malaysian Meteorological Department.
Parameters
locationstring required | Text in a location name, such as Selangor or Kuala Lumpur. e.g. Selangor |
tunnelstring | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
proxystring | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
profileIdstring | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |
Response data
9 fields
afternoon | string |
date | string |
locationId | string |
locationName | string |
maxTemp | integer (int64) |
minTemp | integer (int64) |
morning | string |
night | string |
summary | string |
curl "https://api.hoshime.com/v1/datagovmy/weatherForecast?location=Selangor" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/datagovmy/weatherForecast?location=Selangor", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/datagovmy/weatherForecast?location=Selangor", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "data": [ { "afternoon": "Ribut petir di beberapa tempat", "date": "2026-11-13", "locationId": "Ds049", "locationName": "Kuala Selangor", "maxTemp": 33, "minTemp": 24, "morning": "Tiada Hujan", "night": "Hujan di beberapa tempat", "summary": "Ribut petir di beberapa tempat" }, { "afternoon": "Ribut petir di beberapa tempat", "date": "2026-11-12", "locationId": "Ds049", "locationName": "Kuala Selangor", "maxTemp": 33, "minTemp": 24, "morning": "Tiada Hujan", "night": "Hujan di beberapa tempat", "summary": "Ribut petir di beberapa tempat" } ], "meta": { "cached": false, "endpoint": "weatherForecast", "fetchedAt": "2026-11-06T09:41:00Z", "pagination": { "nextCursor": "EpcDEgV…", "hasMore": true, "total": null }, "platform": "datagovmy", "requestId": "req_2Xb9kQ…", "units": 1 } }
weatherWarnings
/v1/datagovmy/weatherWarningsThe latest weather warnings issued for Malaysia, newest first.
Parameters
limitinteger | Items per page, 1 to 100. default 10 |
tunnelstring | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
proxystring | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
profileIdstring | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |
Response data
7 fields
endAt | string |
heading | string |
instruction | string |
issuedAt | string |
startAt | string |
text | string |
title | string |
curl "https://api.hoshime.com/v1/datagovmy/weatherWarnings" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/datagovmy/weatherWarnings", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/datagovmy/weatherWarnings", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "data": [ { "endAt": "2026-11-10T15:59:59Z", "heading": "FIRST CATEGORY WARNING ON STRONG WINDS AND ROUGH SEAS", "instruction": "This condition of strong winds and rough seas is dangerous.", "issuedAt": "2026-11-06T16:40:00Z", "startAt": "2026-11-07T16:00:00Z", "text": "SECTION A: FOR MALAYSIAN WATERS [WITHIN 24 NAUTICAL MILES] 1) THUNDERSTORMS WARNING Thunderstorms, heavy rain and strong winds are expected …", "title": "Strong Winds and Rough Seas Warning" }, { "endAt": "2026-11-06T21:00:00Z", "heading": "FIRST CATEGORY WARNING ON STRONG WINDS AND ROUGH SEAS", "instruction": "This condition of strong winds and rough seas is dangerous.", "issuedAt": "2026-11-06T16:40:00Z", "startAt": "2026-11-06T16:00:00Z", "text": "SECTION A: FOR MALAYSIAN WATERS [WITHIN 24 NAUTICAL MILES] 1) THUNDERSTORMS WARNING Thunderstorms, heavy rain and strong winds are expected …", "title": "Strong Winds and Rough Seas Warning" } ], "meta": { "cached": false, "endpoint": "weatherWarnings", "fetchedAt": "2026-11-06T09:41:00Z", "pagination": { "nextCursor": "EpcDEgV…", "hasMore": true, "total": null }, "platform": "datagovmy", "requestId": "req_2Xb9kQ…", "units": 1 } }
fuelPrices
/v1/datagovmy/fuelPricesWeekly retail fuel prices in ringgit per litre: RON95, RON97 and diesel, newest first.
Parameters
limitinteger | Items per page, 1 to 500. default 12 |
tunnelstring | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
proxystring | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
profileIdstring | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |
Response data
4 fields
date | string |
diesel | string |
ron95 | string |
ron97 | string |
curl "https://api.hoshime.com/v1/datagovmy/fuelPrices" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/datagovmy/fuelPrices", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/datagovmy/fuelPrices", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "data": [ { "date": "2026-11-05", "diesel": "5.12", "ron95": "4.27", "ron97": "4.7" }, { "date": "2026-10-29", "diesel": "5.27", "ron95": "4.42", "ron97": "4.9" } ], "meta": { "cached": false, "endpoint": "fuelPrices", "fetchedAt": "2026-11-06T09:41:00Z", "pagination": { "nextCursor": "EpcDEgV…", "hasMore": true, "total": null }, "platform": "datagovmy", "requestId": "req_2Xb9kQ…", "units": 1 } }
cpiHeadline
/v1/datagovmy/cpiHeadlineMonthly consumer price index of Malaysia (base 2010 = 100) for the overall index and each division, newest first.
Parameters
limitinteger | Items per page, 1 to 500. default 12 |
tunnelstring | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
proxystring | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
profileIdstring | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |
Response data
4 fields
date | string |
division | string |
index | number (double) |
state | string |
curl "https://api.hoshime.com/v1/datagovmy/cpiHeadline" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/datagovmy/cpiHeadline", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/datagovmy/cpiHeadline", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "data": [ { "date": "2026-09-01", "division": "07", "index": 125.8, "state": "" }, { "date": "2026-09-01", "division": "10", "index": 132.7, "state": "" } ], "meta": { "cached": false, "endpoint": "cpiHeadline", "fetchedAt": "2026-11-06T09:41:00Z", "pagination": { "nextCursor": "EpcDEgV…", "hasMore": true, "total": null }, "platform": "datagovmy", "requestId": "req_2Xb9kQ…", "units": 1 } }
cpiState
/v1/datagovmy/cpiStateMonthly consumer price index of each Malaysian state, newest first.
Parameters
limitinteger | Items per page, 1 to 500. default 12 |
tunnelstring | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
proxystring | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
profileIdstring | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |
Response data
4 fields
date | string |
division | string |
index | number (double) |
state | string |
curl "https://api.hoshime.com/v1/datagovmy/cpiState" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/datagovmy/cpiState", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/datagovmy/cpiState", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "data": [ { "date": "2026-09-01", "division": "11", "index": 143.6, "state": "Terengganu" }, { "date": "2026-09-01", "division": "11", "index": 182.4, "state": "W.P. Putrajaya" } ], "meta": { "cached": false, "endpoint": "cpiState", "fetchedAt": "2026-11-06T09:41:00Z", "pagination": { "nextCursor": "EpcDEgV…", "hasMore": true, "total": null }, "platform": "datagovmy", "requestId": "req_2Xb9kQ…", "units": 1 } }
cpiStrata
/v1/datagovmy/cpiStrataMonthly consumer price index of Malaysia split into urban and rural areas, for each division, newest first.
Parameters
limitinteger | Items per page, 1 to 500. default 12 |
tunnelstring | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
proxystring | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
profileIdstring | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |
Response data
4 fields
date | string |
division | string |
index | number (double) |
strata | string |
curl "https://api.hoshime.com/v1/datagovmy/cpiStrata" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/datagovmy/cpiStrata", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/datagovmy/cpiStrata", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "data": [ { "date": "…", "division": "…", "index": 0, "strata": "…" } ], "meta": { "cached": false, "endpoint": "cpiStrata", "fetchedAt": "2026-11-06T09:41:00Z", "pagination": { "nextCursor": "EpcDEgV…", "hasMore": true, "total": null }, "platform": "datagovmy", "requestId": "req_2Xb9kQ…", "units": 1 } }
labourForce
/v1/datagovmy/labourForceMonthly labour force survey of Malaysia: labour force, employed and unemployed in thousands, and the rates in per cent.
Parameters
limitinteger | Items per page, 1 to 500. default 12 |
tunnelstring | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
proxystring | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
profileIdstring | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |
Response data
8 fields
date | string |
employed | number (double) |
employmentPopulationRate | number (double) |
labourForce | number (double) |
outsideLabourForce | number (double) |
participationRate | number (double) |
unemployed | number (double) |
unemploymentRate | number (double) |
curl "https://api.hoshime.com/v1/datagovmy/labourForce" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/datagovmy/labourForce", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/datagovmy/labourForce", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "data": [ { "date": "2026-08-01", "employed": 16874.4, "employmentPopulationRate": 68.9, "labourForce": 17386, "outsideLabourForce": 7106, "participationRate": 71, "unemployed": 511.6, "unemploymentRate": 2.9 }, { "date": "2026-07-01", "employed": 16845.6, "employmentPopulationRate": 68.8, "labourForce": 17365.9, "outsideLabourForce": 7110.5, "participationRate": 70.9, "unemployed": 520.3, "unemploymentRate": 3 } ], "meta": { "cached": false, "endpoint": "labourForce", "fetchedAt": "2026-11-06T09:41:00Z", "pagination": { "nextCursor": "EpcDEgV…", "hasMore": true, "total": null }, "platform": "datagovmy", "requestId": "req_2Xb9kQ…", "units": 1 } }
gdpQuarterly
/v1/datagovmy/gdpQuarterlyQuarterly gross domestic product of Malaysia at constant prices, in million ringgit, newest first.
Parameters
limitinteger | Items per page, 1 to 500. default 12 |
tunnelstring | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
proxystring | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
profileIdstring | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |
Response data
3 fields
date | string |
series | string |
value | string |
curl "https://api.hoshime.com/v1/datagovmy/gdpQuarterly" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/datagovmy/gdpQuarterly", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/datagovmy/gdpQuarterly", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "data": [ { "date": "2026-04-01", "series": "growth_yoy", "value": "6" }, { "date": "2026-04-01", "series": "abs", "value": "445896.454" } ], "meta": { "cached": false, "endpoint": "gdpQuarterly", "fetchedAt": "2026-11-06T09:41:00Z", "pagination": { "nextCursor": "EpcDEgV…", "hasMore": true, "total": null }, "platform": "datagovmy", "requestId": "req_2Xb9kQ…", "units": 1 } }
population
/v1/datagovmy/populationPopulation of each Malaysian state by year, in thousands, newest first; all ages and both sexes.
Parameters
statestring | State name, such as Johor. Empty lists every state. e.g. Johor |
limitinteger | Items per page, 1 to 1000. default 100 |
tunnelstring | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
proxystring | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
profileIdstring | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |
Response data
3 fields
date | string |
population | number (double) |
state | string |
curl "https://api.hoshime.com/v1/datagovmy/population?state=Johor" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/datagovmy/population?state=Johor", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/datagovmy/population?state=Johor", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "data": [ { "date": "2023-01-01", "population": 4100.9, "state": "Johor" }, { "date": "2023-01-01", "population": 2187.5, "state": "Kedah" } ], "meta": { "cached": false, "endpoint": "population", "fetchedAt": "2026-11-06T09:41:00Z", "pagination": { "nextCursor": "EpcDEgV…", "hasMore": true, "total": null }, "platform": "datagovmy", "requestId": "req_2Xb9kQ…", "units": 1 } }