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

認証：APIキー必須（`Authorization: Bearer <API Key>`）。

所有データセットと公開プラットフォームのシードを一覧。実行結果はデータセットに入る。既定保持を超えて残すなら retention を立てる。

## リクエスト

### クエリパラメータ

<ParamField query="offset" type="integer">
  オフセット。0 始まり。
</ParamField>

<ParamField query="limit" type="integer">
  ページサイズ。
</ParamField>

### リクエスト例

```bash theme={null}
curl   -H "Authorization: Bearer $OCTOPARSE_API_KEY"   "https://api-datahub.octoparse.com/v1/datasets?limit=50"
```

## レスポンス

### 200 成功

```json theme={null}
{
  "data": {
    "items": [
      {
        "dataset_id": "ds_0bd5345d13d0",
        "row_count": 120,
        "retained": false,
        "created_at": "2026-09-01T08:00:00+00:00"
      }
    ],
    "pagination": {
      "offset": 0,
      "limit": 50,
      "count": 1,
      "total": 1,
      "has_more": false
    }
  }
}
```

### エラー

| HTTP | `code`         | `category`  | Description    |
| ---- | -------------- | ----------- | -------------- |
| 401  | `unauthorized` | `forbidden` | API キー欠落または無効。 |

エラー応答は `{"error": {code, category, message, retryable}}` です。<a href="/docs/jp/datahub/api/reference/introduction#errors">エラー</a> を参照。

## クライアントライブラリ

<CodeGroup>
  ```python Python theme={null}
  page = client.list_datasets(limit=50)
  for ds in page["items"]:
      print(ds["dataset_id"], ds["row_count"], ds["retained"])
  ```

  ```js JavaScript theme={null}
  const page = await client.listDatasets({ limit: 50 });
  for (const ds of page.items) {
    console.log(ds.dataset_id, ds.row_count, ds.retained);
  }
  ```
</CodeGroup>
