Public API docs for data.gov.tw

Data.gov.tw is a public data platform for Taiwan's government that provides various datasets for developers to utilize in their applications. The platform also provides APIs for these datasets, enabling developers to integrate the data directly into their applications.

In this blog post, we will explore some of the commonly used APIs on data.gov.tw and provide code examples in JavaScript.

1. Air Quality Index (AQI)

The Air Quality Index (AQI) API provides information on the current air quality index for various cities in Taiwan.

fetch('https://data.gov.tw/api/v1/rest/dataset/348dcf31-d4d0-4625-a5a3-5fb07e5a2db4')
  .then(response => response.json())
  .then(data => console.log(data));

2. Food Safety Alerts

The Food Safety Alerts API provides information on any food safety alerts issued by the government.

fetch('https://data.gov.tw/api/v1/rest/dataset/908c0a63-eb3a-4833-87e0-79c7055a0e6f')
  .then(response => response.json())
  .then(data => console.log(data));

3. Earthquakes

The Earthquakes API provides information on recent earthquakes that have occurred in Taiwan.

fetch('https://data.gov.tw/api/v1/rest/dataset/19c8de39-17b9-4bcb-9aad-9c21f58360a6')
  .then(response => response.json())
  .then(data => console.log(data));

4. Typhoons

The Typhoons API provides information on the current and predicted tracks of typhoons in the region.

fetch('https://data.gov.tw/api/v1/rest/dataset/3ba53d23-2c7b-42f3-bb1d-51a56d4d8a6f')
  .then(response => response.json())
  .then(data => console.log(data));

5. Population

The Population API provides information on Taiwan's population by city and gender.

fetch('https://data.gov.tw/api/v1/rest/dataset/8bf6db3b-a131-4ee9-bbf1-114e45ac6a56')
  .then(response => response.json())
  .then(data => console.log(data));

These are just a few examples of the APIs that can be used from data.gov.tw. Using these APIs, developers can build innovative applications that use real-time data to provide insights to their users.

Happy coding!

Related APIs

Public APIs — A directory of free and public apis

Built by @mddanishyusuf