# API overview

There are two types of APIs on data.gov.sg.&#x20;

1. **Real-Time APIs:**&#x20;

{% hint style="info" %}
Please find a list of our real-time APIs [here](https://beta.data.gov.sg/datasets?formats=API)
{% endhint %}

These are specific use-case APIs that allow you to query data such as weather and traffic conditions

2. **Collection and Dataset APIs:**

{% hint style="info" %}
API documentation can be found below
{% endhint %}

These APIs allow you to query both collections and datasets, as well as to retrieve metadata and listings.<br>

The API used to query a specific dataset for data can be found on the page `API v1`, under `Dataset Search`.

***

## Nomenclature

**Collection:**

A grouping of datasets, generally thematically

`collection_id` can be found in the URL of the dataset in this manner `https://data.gov.sg/collections/{collection_id}/view`

> For example - <https://data.gov.sg/collections/1/view> has the `collection_id` of `1`

**Dataset:**

A single unit of data, which can be tabular (e.g. csv, xlsx) or otherwise (e.g. geojson, kml)\ <br>

`dataset_id` can be found in the URL of the dataset in this manner `https://data.gov.sg/datasets/{dataset_id}/view`

> For example - <https://data.gov.sg/datasets/1/view> has the `dataset_id` of `1`

## API Key

All Data.gov.sg APIs are public and can be accessed without an API key for testing purposes.

However, if you are using the APIs and datasets for **production workflows**, we strongly recommend you to use an **API key.**

This will grant you **higher rate limits**, **prioritised support** and **maintenance updates**<br>

<table data-view="cards"><thead><tr><th></th><th data-type="content-ref"></th></tr></thead><tbody><tr><td></td><td><a href="/pages/i0oxYbU4QPRnj8KGNTXw">/pages/i0oxYbU4QPRnj8KGNTXw</a></td></tr><tr><td></td><td><a href="/pages/PtUj68W9cYdqiWA9CIW7">/pages/PtUj68W9cYdqiWA9CIW7</a></td></tr><tr><td></td><td><a href="/pages/nXS7hhABBqAPHZHbN7Zl">/pages/nXS7hhABBqAPHZHbN7Zl</a></td></tr><tr><td></td><td><a href="/pages/qK2MVSt7VZUpxN0Y5cA6">/pages/qK2MVSt7VZUpxN0Y5cA6</a></td></tr></tbody></table>

For further queries feel free to reach out to us: [Contact the Data.gov.sg team](https://form.gov.sg/6449e5c3664c1b001249acf1)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://guide.data.gov.sg/developer-guide/api-overview.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
