# 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"}}}}}}}}}}}
```


---

# 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/dataset-apis/list-rows-of-dataset.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.
