# Get dataset metadata

{% hint style="info" %}
To find the dataset\_id, refer to the URL of dataset.\
\
For this dataset:\
<https://data.gov.sg/collections/522/datasets/d_11e68bba3b3c76733475a72d09759eeb/view> \
or \
<https://data.gov.sg/datasets/d_11e68bba3b3c76733475a72d09759eeb/view>\
\
\
The datasetId is:\
`d_11e68bba3b3c76733475a72d09759eeb`\ <br>

For staging, note that the dataset\_id might differ between staging and production:

* Domain: [https://api-staging.data.gov.sg/](https://api-staging.data.gov.sg/v2/public/api/datasets/d_696c994c50745b079b3684f0e90ffc53/list-rows)
* Example: [https://api-staging.data.gov.sg/v2/public/api/datasets/{datasetId}/metadata](https://api-production.data.gov.sg/v2/public/api/datasets/%7BdatasetId%7D/metadata)
  {% endhint %}

### Dataset Metadata

This API returns the metadata of a single dataset

## GET /v2/public/api/datasets/{datasetId}/metadata

> Get metadata for a dataset

```json
{"openapi":"3.0.3","info":{"title":"beta.data.gov.sg Public API","version":"1.0.11"},"tags":[{"name":"datasets"}],"servers":[{"url":"https://api-production.data.gov.sg"}],"paths":{"/v2/public/api/datasets/{datasetId}/metadata":{"get":{"summary":"Get metadata for a dataset","tags":["datasets"],"parameters":[{"in":"path","name":"datasetId","required":true,"schema":{"type":"string"},"description":"The unique identifier of the dataset"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer"},"data":{"type":"object","properties":{"datasetId":{"type":"string"},"createdAt":{"type":"string"},"name":{"type":"string"},"format":{"type":"string"},"lastUpdatedAt":{"type":"string"},"managedBy":{"type":"string"},"coverageStart":{"type":"string"},"coverageEnd":{"type":"string"},"columnMetadata":{"type":"object","properties":{"order":{"type":"array","items":{"type":"string"}},"map":{"type":"object","additionalProperties":{"type":"string"}},"metaMapping":{"type":"object","additionalProperties":{"type":"object","properties":{"name":{"type":"string"},"columnTitle":{"type":"string"},"dataType":{"type":"integer"},"index":{"type":"string"}}}}}}}},"errorMsg":{"type":"string"}}}}}}}}}}}
```
