Skip to content

data.gov.my API

10 endpointsGovernment & Open DataMYsocial:read9 real examples

Returns Malaysian open data including dataset rows, weather forecasts and warnings, fuel prices, and consumer price indices.

View as Markdown
GET/datagovmy/catalogueRows of one open dataset of data.gov.my, such as the monthly consumer price index (cpi_headline).
GET/datagovmy/weatherForecastThe daily weather forecast of the locations whose name contains the text, from the Malaysian Meteorological Department.
GET/datagovmy/weatherWarningsThe latest weather warnings issued for Malaysia, newest first.
GET/datagovmy/fuelPricesWeekly retail fuel prices in ringgit per litre: RON95, RON97 and diesel, newest first.
GET/datagovmy/cpiHeadlineMonthly consumer price index of Malaysia (base 2010 = 100) for the overall index and each division, newest first.
GET/datagovmy/cpiStateMonthly consumer price index of each Malaysian state, newest first.
GET/datagovmy/cpiStrataMonthly consumer price index of Malaysia split into urban and rural areas, for each division, newest first.
GET/datagovmy/labourForceMonthly labour force survey of Malaysia: labour force, employed and unemployed in thousands, and the rates in per cent.
GET/datagovmy/gdpQuarterlyQuarterly gross domestic product of Malaysia at constant prices, in million ringgit, newest first.
GET/datagovmy/populationPopulation of each Malaysian state by year, in thousands, newest first; all ages and both sexes.

catalogue

GET/v1/datagovmy/catalogue

Rows of one open dataset of data.gov.my, such as the monthly consumer price index (cpi_headline).

scope social:read1 unitcached 1 hpaginated

Parameters

id
string
required
Data catalogue id, such as cpi_headline.
e.g. cpi_headline
limit
integer
Items per page, 1 to 1000.
default 100
tunnel
string
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.
proxy
string
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.
profileId
string
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
datestring
valuesmap
curl "https://api.hoshime.com/v1/datagovmy/catalogue?id=cpi_headline" \
  -H "Authorization: Bearer $HOSHIME_TOKEN"
200 Real response
{
  "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

GET/v1/datagovmy/weatherForecast

The daily weather forecast of the locations whose name contains the text, from the Malaysian Meteorological Department.

scope social:read1 unitcached 30 minpaginated

Parameters

location
string
required
Text in a location name, such as Selangor or Kuala Lumpur.
e.g. Selangor
tunnel
string
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.
proxy
string
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.
profileId
string
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
afternoonstring
datestring
locationIdstring
locationNamestring
maxTempinteger (int64)
minTempinteger (int64)
morningstring
nightstring
summarystring
curl "https://api.hoshime.com/v1/datagovmy/weatherForecast?location=Selangor" \
  -H "Authorization: Bearer $HOSHIME_TOKEN"
200 Real response
{
  "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

GET/v1/datagovmy/weatherWarnings

The latest weather warnings issued for Malaysia, newest first.

scope social:read1 unitcached 10 minpaginated

Parameters

limit
integer
Items per page, 1 to 100.
default 10
tunnel
string
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.
proxy
string
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.
profileId
string
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
endAtstring
headingstring
instructionstring
issuedAtstring
startAtstring
textstring
titlestring
curl "https://api.hoshime.com/v1/datagovmy/weatherWarnings" \
  -H "Authorization: Bearer $HOSHIME_TOKEN"
200 Real response
{
  "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

GET/v1/datagovmy/fuelPrices

Weekly retail fuel prices in ringgit per litre: RON95, RON97 and diesel, newest first.

scope social:read1 unitcached 6 hpaginated

Parameters

limit
integer
Items per page, 1 to 500.
default 12
tunnel
string
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.
proxy
string
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.
profileId
string
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
datestring
dieselstring
ron95string
ron97string
curl "https://api.hoshime.com/v1/datagovmy/fuelPrices" \
  -H "Authorization: Bearer $HOSHIME_TOKEN"
200 Real response
{
  "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

GET/v1/datagovmy/cpiHeadline

Monthly consumer price index of Malaysia (base 2010 = 100) for the overall index and each division, newest first.

scope social:read1 unitcached 6 hpaginated

Parameters

limit
integer
Items per page, 1 to 500.
default 12
tunnel
string
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.
proxy
string
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.
profileId
string
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
datestring
divisionstring
indexnumber (double)
statestring
curl "https://api.hoshime.com/v1/datagovmy/cpiHeadline" \
  -H "Authorization: Bearer $HOSHIME_TOKEN"
200 Real response
{
  "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

GET/v1/datagovmy/cpiState

Monthly consumer price index of each Malaysian state, newest first.

scope social:read1 unitcached 6 hpaginated

Parameters

limit
integer
Items per page, 1 to 500.
default 12
tunnel
string
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.
proxy
string
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.
profileId
string
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
datestring
divisionstring
indexnumber (double)
statestring
curl "https://api.hoshime.com/v1/datagovmy/cpiState" \
  -H "Authorization: Bearer $HOSHIME_TOKEN"
200 Real response
{
  "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

GET/v1/datagovmy/cpiStrata

Monthly consumer price index of Malaysia split into urban and rural areas, for each division, newest first.

scope social:read1 unitcached 6 hpaginated

Parameters

limit
integer
Items per page, 1 to 500.
default 12
tunnel
string
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.
proxy
string
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.
profileId
string
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
datestring
divisionstring
indexnumber (double)
stratastring
curl "https://api.hoshime.com/v1/datagovmy/cpiStrata" \
  -H "Authorization: Bearer $HOSHIME_TOKEN"
200 Response shape
{
  "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

GET/v1/datagovmy/labourForce

Monthly labour force survey of Malaysia: labour force, employed and unemployed in thousands, and the rates in per cent.

scope social:read1 unitcached 6 hpaginated

Parameters

limit
integer
Items per page, 1 to 500.
default 12
tunnel
string
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.
proxy
string
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.
profileId
string
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
datestring
employednumber (double)
employmentPopulationRatenumber (double)
labourForcenumber (double)
outsideLabourForcenumber (double)
participationRatenumber (double)
unemployednumber (double)
unemploymentRatenumber (double)
curl "https://api.hoshime.com/v1/datagovmy/labourForce" \
  -H "Authorization: Bearer $HOSHIME_TOKEN"
200 Real response
{
  "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

GET/v1/datagovmy/gdpQuarterly

Quarterly gross domestic product of Malaysia at constant prices, in million ringgit, newest first.

scope social:read1 unitcached 24 hpaginated

Parameters

limit
integer
Items per page, 1 to 500.
default 12
tunnel
string
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.
proxy
string
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.
profileId
string
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
datestring
seriesstring
valuestring
curl "https://api.hoshime.com/v1/datagovmy/gdpQuarterly" \
  -H "Authorization: Bearer $HOSHIME_TOKEN"
200 Real response
{
  "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

GET/v1/datagovmy/population

Population of each Malaysian state by year, in thousands, newest first; all ages and both sexes.

scope social:read1 unitcached 24 hpaginated

Parameters

state
string
State name, such as Johor. Empty lists every state.
e.g. Johor
limit
integer
Items per page, 1 to 1000.
default 100
tunnel
string
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.
proxy
string
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.
profileId
string
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
datestring
populationnumber (double)
statestring
curl "https://api.hoshime.com/v1/datagovmy/population?state=Johor" \
  -H "Authorization: Bearer $HOSHIME_TOKEN"
200 Real response
{
  "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
  }
}
esc
↑↓ move↵ open