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

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

自分が開始した全実行。所有は**アカウント**単位：API キー、SDK、MCP、Web ログイン開始分が同一一覧。開始時刻の新しい順。`pagination.total` はフィルタ後合計。

フィルタは併用可。`status` はカンマ区切り（OR）。`credential` は開始資格情報の非機微安定 id（どのキーが枠を消費するか追跡）。 `created_from` / `created_to` は開始時刻基準（開始 inclusive・終了 exclusive）。語彙は <a href="/docs/jp/datahub/api/reference/account/get-billing">請求集計</a>: pass a billing group key through unchanged to drill into the matching runs.

各項目に `billing` と `usage` があり、実行単位の照合に詳細呼び出しは不要。入力エコーの伏字は実行詳細と同じ。

## リクエスト

### クエリパラメータ

<ParamField query="status" type="string">
  実行状態。カンマ区切り複数値。語彙外は `400`。
</ParamField>

<ParamField query="credential" type="string">
  開始資格情報の安定 id。請求集計 `group_by=credential` → `credential` の値を使う。
</ParamField>

<ParamField query="data_app" type="string">
  App 参照: `<namespace>/<app_name>` または `app_<hex>`。
</ParamField>

<ParamField query="triggered_by" type="string">
  開始チャネル。例: `api` / `sdk` / `mcp` / `cli` / `web`。
</ParamField>

<ParamField query="created_from" type="string">
  開始時刻下限（inclusive）。絶対 ISO-8601。
</ParamField>

<ParamField query="created_to" type="string">
  開始時刻上限（exclusive）。
</ParamField>

<ParamField query="run_kind" type="string">
  通常は `production`。作者デバッグは `test`。

  値: `test` / `production`。
</ParamField>

<ParamField query="offset" type="integer" default="0">
  ページネーションオフセット。

  範囲 ≥ 0。
</ParamField>

<ParamField query="limit" type="integer" default="50">
  Page size, max 200.

  Range 1 to 200.
</ParamField>

### リクエスト例

```bash theme={null}
curl \
  -H "Authorization: Bearer $OCTOPARSE_API_KEY" \
  "https://api-datahub.octoparse.com/v1/runs?data_app=carol/probe-b&status=SUCCEEDED,PARTIALLY_SUCCEEDED&limit=50"
```

## レスポンス

### 200 成功

```json theme={null}
{
  "data": {
    "items": [
      {
        "run_id": "run_3b750088f51c",
        "namespace": "carol",
        "app_name": "probe-b",
        "app_version": "0.1.0",
        "build_id": null,
        "run_kind": "production",
        "state": "RUNNING",
        "input": {
          "product": "p-doc"
        },
        "progress": {
          "done": 0,
          "total": null,
          "status_text": null
        },
        "dataset_id": "ds_ec3ba97b8534",
        "partial": false,
        "cancel_requested": false,
        "triggered_by": "api",
        "upstream_ref": null,
        "created_at": "2026-09-15T07:45:41.876601+00:00",
        "started_at": "2026-09-15T07:45:41.883082+00:00",
        "first_started_at": "2026-09-15T07:45:41.883082+00:00",
        "finished_at": null,
        "usage": {
          "metrics": {
            "records_collected": 0
          },
          "duration_ms": null
        },
        "billing": {
          "events": [],
          "total": 0.0,
          "currency": "USD",
          "charged": false
        },
        "error": null
      },
      "…"
    ],
    "pagination": {
      "offset": 0,
      "limit": 2,
      "count": 2,
      "total": 2,
      "has_more": false
    }
  }
}
```

ペイロードは `data` に包まれます。フィールド:

<ResponseField name="items" type="object[]" required>
  実行一覧。各項目は実行詳細フィールドと同じ（`sample_records` なし）。

  <Expandable title="fields">
    <ResponseField name="run_id" type="string" required>
      —
    </ResponseField>

    <ResponseField name="namespace" type="string">
      —
    </ResponseField>

    <ResponseField name="app_name" type="string">
      —
    </ResponseField>

    <ResponseField name="app_version" type="string">
      —
    </ResponseField>

    <ResponseField name="build_id" type="string">
      —
    </ResponseField>

    <ResponseField name="run_kind" type="string">
      —
    </ResponseField>

    <ResponseField name="state" type="enum" required>
      値: `PENDING` / `QUEUED` / `RUNNING` / `SUCCEEDED` / `PARTIALLY_SUCCEEDED` / `FAILED` / `CANCELLED` / `EXPIRED`。
    </ResponseField>

    <ResponseField name="input" type="object">
      —
    </ResponseField>

    <ResponseField name="progress" type="object">
      —

      <Expandable title="fields">
        <ResponseField name="done" type="integer">
          —
        </ResponseField>

        <ResponseField name="total" type="integer">
          —
        </ResponseField>

        <ResponseField name="status_text" type="string">
          —
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="dataset_id" type="string">
      —
    </ResponseField>

    <ResponseField name="partial" type="boolean">
      —
    </ResponseField>

    <ResponseField name="cancel_requested" type="boolean">
      取消要求済みで収束中なら `true`（協調停止／部分結果回収）。終端では常に `false`（サーバ正規化）。`state` から導出不要。
    </ResponseField>

    <ResponseField name="triggered_by" type="string">
      —
    </ResponseField>

    <ResponseField name="upstream_ref" type="string">
      —
    </ResponseField>

    <ResponseField name="created_at" type="string">
      —
    </ResponseField>

    <ResponseField name="started_at" type="string">
      —
    </ResponseField>

    <ResponseField name="first_started_at" type="string">
      ワーカーが初めて実行を引き受けた時刻。`started_at` と違いリトライで上書きされないため壁時計の基準: queued = `first_started_at - created_at`、総壁時間 = `finished_at - first_started_at`。`started_at` から queued を取ると以前の試行を待ちと誤算。未割当のみ `null`。
    </ResponseField>

    <ResponseField name="finished_at" type="string">
      —
    </ResponseField>

    <ResponseField name="usage" type="object">
      客観使用量: 実行が何をしたか。課金と分離。評価比較の基準。

      <Expandable title="fields">
        <ResponseField name="metrics" type="object">
          —
        </ResponseField>

        <ResponseField name="duration_ms" type="integer">
          —
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="billing" type="object">
      課金台帳 = 使用量 × 料金 × 課金ルール。

      <Expandable title="fields">
        <ResponseField name="events" type="object[]">
          —
        </ResponseField>

        <ResponseField name="total" type="number">
          —
        </ResponseField>

        <ResponseField name="currency" type="string">
          —
        </ResponseField>

        <ResponseField name="charged" type="boolean">
          —
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="error" type="object">
      —

      <Expandable title="fields">
        <ResponseField name="code" type="string" required>
          —
        </ResponseField>

        <ResponseField name="category" type="string">
          —
        </ResponseField>

        <ResponseField name="message" type="string" required>
          —
        </ResponseField>

        <ResponseField name="retryable" type="boolean">
          —
        </ResponseField>

        <ResponseField name="retry_after" type="number">
          —
        </ResponseField>

        <ResponseField name="item_index" type="integer">
          —
        </ResponseField>

        <ResponseField name="details" type="object[]">
          —
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="pagination" type="object">
  Pagination object.

  <Expandable title="fields">
    <ResponseField name="offset" type="integer">
      —
    </ResponseField>

    <ResponseField name="limit" type="integer">
      —
    </ResponseField>

    <ResponseField name="count" type="integer">
      —
    </ResponseField>

    <ResponseField name="total" type="integer">
      —
    </ResponseField>

    <ResponseField name="has_more" type="boolean">
      —
    </ResponseField>
  </Expandable>
</ResponseField>

### エラー

| HTTP | `code`           | `category`      | Description      |
| ---- | ---------------- | --------------- | ---------------- |
| 401  | `unauthorized`   | `forbidden`     | API キー欠落または無効。   |
| 400  | `invalid-status` | `invalid_input` | `status` に語彙外の値。 |

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

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

<CodeGroup>
  ```python Python theme={null}
  # Auto-paginate
  for r in client.iterate_runs(data_app="carol/probe-b", created_from="2026-09-01T00:00:00+08:00"):
      print(r["run_id"], r["state"], r["billing"]["total"])

  # Use the page form when you need totals
  page = client.list_runs_page(status="QUEUED,RUNNING", limit=50)
  print(page["pagination"]["total"])
  ```

  ```js JavaScript theme={null}
  // Auto-paginate
  for await (const r of client.iterateRuns({ dataApp: "carol/probe-b", createdFrom: "2026-09-01T00:00:00+08:00" })) {
    console.log(r.run_id, r.state, r.billing.total);
  }

  // Use the page form when you need totals
  const page = await client.listRunsPage({ status: "QUEUED,RUNNING", limit: 50 });
  console.log(page.pagination.total);
  ```
</CodeGroup>
