> ## Documentation Index
> Fetch the complete documentation index at: https://www.octoparse.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# 데이터셋 레코드 조회

> 데이터셋 레코드 페이지.

**`GET`** `https://api-datahub.octoparse.com/v1/datasets/{dataset_id}/records`

인증: API 키 필요(`Authorization: Bearer <API Key>`).

데이터셋 레코드를 페이지로 읽음. 파라미터는 <a href="/docs/ko/datahub/api/reference/runs/get-run-records">실행 레코드 조회</a>. 가시성 게이트는 <a href="/docs/ko/datahub/api/reference/datasets/get-dataset">데이터셋 상세</a>: 비가시 데이터셋은 `404`.

## 요청

### 경로 파라미터

<ParamField path="dataset_id" type="string" required>
  데이터셋 id.
</ParamField>

### 쿼리 파라미터

<ParamField query="offset" type="integer">
  오프셋. 0부터.
</ParamField>

<ParamField query="limit" type="integer">
  페이지 크기.
</ParamField>

<ParamField query="fields" type="string">
  쉼표 구분 열 프로젝션.
</ParamField>

<ParamField query="format" type="string" default="json">
  `json` / `jsonl` / `csv`.
</ParamField>

### 요청 예시

```bash theme={null}
curl \
  -H "Authorization: Bearer $OCTOPARSE_API_KEY" \
  "https://api-datahub.octoparse.com/v1/datasets/ds_0bd5345d13d0/records?offset=0&limit=100"
```

## 응답

### 200 성공

`format=json`은 `data`에 `items`와 `pagination`. `jsonl`/`csv`는 엔벨로프 없는 원시 텍스트.

### 오류

| HTTP | `code`              | `category`  | 설명              |
| ---- | ------------------- | ----------- | --------------- |
| 401  | `unauthorized`      | `forbidden` | API 키 누락 또는 무효. |
| 404  | `dataset-not-found` | `not_found` | 데이터셋 없거나 비가시.   |

오류 응답은 `{"error": {code, category, message, retryable}}`입니다. <a href="/docs/ko/datahub/api/reference/introduction#errors">오류</a> 참고.

## 클라이언트 라이브러리

<CodeGroup>
  ```python Python theme={null}
  for record in client.iterate_dataset_records("ds_0bd5345d13d0"):
      print(record)
  ```

  ```js JavaScript theme={null}
  for await (const record of client.iterateDatasetRecords("ds_0bd5345d13d0")) {
    console.log(record);
  }
  ```
</CodeGroup>
