> For the complete documentation index, see [llms.txt](https://guide.data.gov.sg/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guide.data.gov.sg/developer-guide/dataset-apis/list-rows-of-dataset.md).

# List rows of dataset

{% 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/d_696c994c50745b079b3684f0e90ffc53/list-rows>
  {% endhint %}

## Listing rows for a datasets

This API returns the list of rows of a single dataset

## GET /v2/public/api/datasets/{datasetId}/list-rows

> List rows 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}/list-rows":{"get":{"summary":"List rows 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":{"rows":{"type":"array","items":{"type":"object"},"description":"List of rows"},"resourceId":{"type":"string","description":"The unique identifier of the resource"},"resourceName":{"type":"string","description":"The name of the resource"},"limit":{"type":"integer","description":"The limit of rows per page"},"links":{"type":"object","properties":{"next":{"type":"string","description":"Link to the next page of results"}}}}},"errorMsg":{"type":"string"}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"number"},"name":{"type":"string"},"data":{"type":"object"},"errorMsg":{"type":"string"}}}}}}}}}}}
```
