# Read owned batch and jobs (/api-reference/data-api/getDataBatchesById)

Reads one batch of this tenant with its jobs and their statuses, without waiting. The id is the batch id returned by data_create_batch or data_list_batches. Use data_wait_batch to block until the batch finishes and data_list_batches to enumerate batches. An unknown id or one owned by another tenant returns 404.

## GET /api/v1/data/batches/{id}

Read owned batch and jobs

- Operation ID: `getDataBatchesById`

- Tags: `Data API`

Reads one batch of this tenant with its jobs and their statuses, without waiting. The id is the batch id returned by data_create_batch or data_list_batches. Use data_wait_batch to block until the batch finishes and data_list_batches to enumerate batches. An unknown id or one owned by another tenant returns 404.

### Security

- Required scope: `requests:read`

- `ApiKey` (apiKey, X-API-Key)

- `ApiKeyBearer` (http)

### Parameters

- `id` (path, required) — string (uuid); UUID of the target request or batch, as returned in the id field when it was created or listed.

### Responses

- **200** — Batch status and normalized nested jobs. Failed jobs include redacted error fields. Error body uses the documented PublicError DTO.

  - `application/json`: #/components/schemas/DataBatch

  - Example: `{
  "items": [],
  "next_cursor": null
}`

- **400** — Invalid public UUID Error body uses the documented PublicError DTO.

  - `application/json`: #/components/schemas/PublicError

  - Example: `{
  "error": "Request failed",
  "code": "VALIDATION_ERROR",
  "message": "Invalid public UUID Error body uses the documented PublicError DTO.",
  "requestId": "req_01J2QG"
}`

- **404** — Not found in this tenant Error body uses the documented PublicError DTO.

  - `application/json`: #/components/schemas/PublicError

  - Example: `{
  "error": "Request failed",
  "code": "VALIDATION_ERROR",
  "message": "Not found in this tenant Error body uses the documented PublicError DTO.",
  "requestId": "req_01J2QG"
}`

- **503** — The public Data API is disabled Error body uses the documented PublicError DTO.

  - `application/json`: #/components/schemas/PublicError

  - Example: `{
  "error": "Request failed",
  "code": "PRICING_NOT_ACTIVE",
  "message": "The public Data API is disabled Error body uses the documented PublicError DTO.",
  "requestId": "req_01J2QG"
}`

### Referenced OpenAPI components

#### `#/components/parameters/PublicId`

```json

{
  "name": "id",
  "in": "path",
  "required": true,
  "description": "UUID of the target request or batch, as returned in the id field when it was created or listed.",
  "schema": {
    "type": "string",
    "format": "uuid"
  }
}

```

#### `#/components/schemas/DataBatch`

```json

{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "id",
    "status",
    "total_jobs",
    "completed_jobs",
    "failed_jobs",
    "base_tokens",
    "protected_tokens",
    "captcha_tokens",
    "created_at",
    "finished_at",
    "jobs"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "status": {
      "type": "string",
      "enum": [
        "pending",
        "running",
        "completed",
        "partial",
        "failed",
        "cancelled"
      ]
    },
    "total_jobs": {
      "type": "integer",
      "minimum": 0
    },
    "completed_jobs": {
      "type": "integer",
      "minimum": 0
    },
    "failed_jobs": {
      "type": "integer",
      "minimum": 0
    },
    "base_tokens": {
      "type": "integer",
      "minimum": 0
    },
    "protected_tokens": {
      "type": "integer",
      "minimum": 0
    },
    "captcha_tokens": {
      "type": "integer",
      "minimum": 0
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "finished_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "jobs": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/DataBatchJob"
      }
    }
  }
}

```

#### `#/components/schemas/PublicError`

```json

{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "error",
    "code",
    "message",
    "requestId"
  ],
  "properties": {
    "error": {
      "type": "string"
    },
    "code": {
      "type": "string",
      "description": "Stable public error code. PROXY_QUOTE_EXPIRED means the optional quote_version supplied at admission is no longer current; refresh the pricing view and submit again."
    },
    "message": {
      "type": "string"
    },
    "requestId": {
      "type": "string"
    }
  }
}

```

#### `#/components/schemas/DataBatchJob`

```json

{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "public_id",
    "url",
    "status",
    "is_cache_hit",
    "is_protected",
    "base_tokens",
    "protected_tokens",
    "captcha_tokens",
    "debug_artifacts",
    "error",
    "user_error",
    "result_meta",
    "created_at",
    "finished_at"
  ],
  "properties": {
    "public_id": {
      "type": "string",
      "format": "uuid"
    },
    "url": {
      "type": "string",
      "format": "uri",
      "description": "Target origin only."
    },
    "status": {
      "$ref": "#/components/schemas/DataJobStatus"
    },
    "is_cache_hit": {
      "type": "boolean"
    },
    "is_protected": {
      "type": "boolean"
    },
    "base_tokens": {
      "type": "integer",
      "minimum": 0
    },
    "protected_tokens": {
      "type": "integer",
      "minimum": 0
    },
    "captcha_tokens": {
      "type": "integer",
      "minimum": 0
    },
    "debug_artifacts": {
      "$ref": "#/components/schemas/PublicDebugArtifacts"
    },
    "error": {
      "$ref": "#/components/schemas/PublicRedactedError"
    },
    "user_error": {
      "$ref": "#/components/schemas/PublicTaskError"
    },
    "result_meta": {
      "anyOf": [
        {
          "$ref": "#/components/schemas/DataResultMeta"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "finished_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    }
  }
}

```

#### `#/components/schemas/DataJobStatus`

```json

{
  "type": "string",
  "enum": [
    "pending",
    "running",
    "solving_captcha",
    "completed",
    "failed",
    "cancelled"
  ]
}

```

#### `#/components/schemas/PublicDebugArtifacts`

```json

{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "enabled",
    "state",
    "expires_at"
  ],
  "properties": {
    "enabled": {
      "type": "boolean"
    },
    "state": {
      "type": "string",
      "enum": [
        "not_requested",
        "pending",
        "available",
        "unavailable",
        "not_available",
        "expired"
      ]
    },
    "expires_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    }
  }
}

```

#### `#/components/schemas/PublicRedactedError`

```json

{
  "anyOf": [
    {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "code",
        "message"
      ],
      "properties": {
        "code": {
          "type": "string",
          "description": "Stable public failure code; budget_exhausted means a paid stage was stopped by the request-wide credit ceiling."
        },
        "message": {
          "type": "string"
        }
      }
    },
    {
      "type": "null"
    }
  ]
}

```

#### `#/components/schemas/PublicTaskError`

```json

{
  "anyOf": [
    {
      "$ref": "#/components/schemas/UserError"
    },
    {
      "type": "null"
    }
  ]
}

```

#### `#/components/schemas/DataResultMeta`

```json

{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "version": {
      "type": "integer",
      "const": 1
    },
    "final_url": {
      "type": [
        "string",
        "null"
      ],
      "description": "Final HTTP(S) response URL. Query string and fragment are preserved; embedded credentials are removed. Invalid or unsupported URLs are omitted."
    },
    "http_status": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 100,
      "maximum": 599
    },
    "content_type": {
      "type": [
        "string",
        "null"
      ]
    },
    "title": {
      "type": [
        "string",
        "null"
      ]
    },
    "redirect_count": {
      "type": "integer",
      "minimum": 0
    },
    "timings_ms": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "navigation": {
          "type": "integer",
          "minimum": 0
        },
        "challenge": {
          "type": "integer",
          "minimum": 0
        },
        "browser_actions": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 0
        },
        "selector_wait": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 0
        },
        "text_wait": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 0
        },
        "extraction": {
          "type": "integer",
          "minimum": 0
        },
        "total": {
          "type": "integer",
          "minimum": 0
        }
      }
    },
    "wait": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "browser_actions": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "configured": {
              "type": "boolean"
            },
            "completed_count": {
              "type": "integer",
              "minimum": 0
            },
            "total_count": {
              "type": "integer",
              "minimum": 0
            }
          }
        },
        "selector": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "configured": {
              "type": "boolean"
            },
            "satisfied": {
              "type": "boolean"
            }
          }
        },
        "text": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "configured": {
              "type": "boolean"
            },
            "satisfied": {
              "type": "boolean"
            },
            "outcome": {
              "type": "string",
              "enum": [
                "not_configured",
                "end_text",
                "stable",
                "timeout_with_text",
                "timeout_empty"
              ]
            }
          }
        }
      }
    },
    "resource_policy": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "requested": {
          "type": "string",
          "enum": [
            "compatible",
            "adaptive"
          ]
        },
        "effective": {
          "type": "string",
          "enum": [
            "compatible",
            "adaptive"
          ]
        },
        "fallback_used": {
          "type": "boolean"
        },
        "blocking_enabled": {
          "type": "boolean"
        },
        "initial_mode": {
          "type": "string",
          "enum": [
            "full",
            "site_light"
          ]
        },
        "final_mode": {
          "type": "string",
          "enum": [
            "full",
            "site_light"
          ]
        },
        "challenge_detected": {
          "type": "boolean"
        },
        "blocked_total": {
          "type": "integer",
          "minimum": 0
        },
        "blocked_by_type": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "document": {
              "type": "integer",
              "minimum": 0
            },
            "script": {
              "type": "integer",
              "minimum": 0
            },
            "stylesheet": {
              "type": "integer",
              "minimum": 0
            },
            "image": {
              "type": "integer",
              "minimum": 0
            },
            "media": {
              "type": "integer",
              "minimum": 0
            },
            "font": {
              "type": "integer",
              "minimum": 0
            },
            "fetch": {
              "type": "integer",
              "minimum": 0
            },
            "xhr": {
              "type": "integer",
              "minimum": 0
            },
            "websocket": {
              "type": "integer",
              "minimum": 0
            },
            "manifest": {
              "type": "integer",
              "minimum": 0
            },
            "wasm": {
              "type": "integer",
              "minimum": 0
            },
            "serviceworker": {
              "type": "integer",
              "minimum": 0
            },
            "other": {
              "type": "integer",
              "minimum": 0
            }
          }
        },
        "blocked_by_reason": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "heavy_type": {
              "type": "integer",
              "minimum": 0
            },
            "known_advertising": {
              "type": "integer",
              "minimum": 0
            },
            "known_analytics": {
              "type": "integer",
              "minimum": 0
            }
          }
        }
      }
    },
    "transport": {
      "type": "string",
      "enum": [
        "browser",
        "http"
      ]
    },
    "execution": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "terminal_engine": {
          "type": "string",
          "enum": [
            "http",
            "browser"
          ]
        },
        "residential": {
          "type": "boolean"
        },
        "fallback_reasons": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "javascript_required",
              "challenge",
              "unsupported_api",
              "invalid_dom",
              "browser_unavailable",
              "protection"
            ]
          }
        },
        "initial_engine": {
          "type": "string",
          "enum": [
            "http",
            "browser"
          ]
        },
        "recommendation_applied": {
          "type": "boolean"
        },
        "total_duration_ms": {
          "type": "integer",
          "minimum": 0
        },
        "stages": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "engine": {
                "type": "string",
                "enum": [
                  "http",
                  "browser"
                ]
              },
              "duration_ms": {
                "type": "integer",
                "minimum": 0
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "completed",
                  "fallback"
                ]
              }
            }
          }
        }
      }
    },
    "storage": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "html": {
          "$ref": "#/components/schemas/ResultStorageMetadata"
        },
        "text": {
          "$ref": "#/components/schemas/ResultStorageMetadata"
        }
      }
    },
    "proxy_usage": {
      "$ref": "#/components/schemas/ProxyUsage"
    },
    "proxy_usage_billing": {
      "$ref": "#/components/schemas/ProxyUsageBilling"
    },
    "request_budget": {
      "$ref": "#/components/schemas/RequestBudget"
    },
    "challenge": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "state",
        "reason"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "captcha",
            "browser_protection",
            "queue",
            "unknown"
          ],
          "description": "Provider-neutral class of the challenge."
        },
        "state": {
          "type": "string",
          "enum": [
            "detected",
            "solving",
            "solved",
            "queued",
            "blocked",
            "unknown"
          ],
          "description": "Public processing state of the challenge."
        },
        "reason": {
          "type": "string",
          "enum": [
            "challenge_detected",
            "queue_detected",
            "unsupported",
            "solver_unavailable",
            "verification_failed",
            "still_blocked",
            "deadline_exceeded",
            "cancelled",
            "unknown"
          ],
          "description": "Provider-neutral outcome reason."
        }
      }
    },
    "markdown": {
      "$ref": "#/components/schemas/MarkdownResultMeta"
    }
  },
  "description": "Result metadata. Challenge metadata contains only provider-neutral type, state and reason. Proxy usage is measured transport traffic; proxy_usage_billing is the post-paid token settlement state."
}

```

#### `#/components/schemas/UserError`

```json

{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "code",
    "message",
    "retryable",
    "category"
  ],
  "properties": {
    "code": {
      "type": "string",
      "description": "Stable machine-readable task failure code."
    },
    "message": {
      "type": "string",
      "description": "Redacted display-safe message suitable for the frontend."
    },
    "retryable": {
      "type": "boolean",
      "description": "Whether the frontend may offer the task retry action."
    },
    "category": {
      "type": "string",
      "enum": [
        "page",
        "generation",
        "execution",
        "provider",
        "billing",
        "processing",
        "timeout",
        "target",
        "proxy",
        "readiness",
        "payload",
        "cancelled"
      ]
    },
    "attempts": {
      "type": "integer",
      "minimum": 0,
      "description": "Actual AI-generation attempts made for a recipe failure. Present only for recipe failures."
    },
    "fields": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Deduplicated safe field paths, including output fields such as news.news_date and recipe DSL fields such as dsl.items. Present only when known for a recipe generation failure."
    }
  }
}

```

#### `#/components/schemas/ResultStorageMetadata`

```json

{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "original_bytes",
    "stored_bytes",
    "truncated"
  ],
  "properties": {
    "original_bytes": {
      "type": "integer",
      "minimum": 0
    },
    "stored_bytes": {
      "type": "integer",
      "minimum": 0
    },
    "truncated": {
      "type": "boolean"
    }
  }
}

```

#### `#/components/schemas/ProxyUsage`

```json

{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "requested_type",
    "request_bytes",
    "response_bytes",
    "total_bytes"
  ],
  "properties": {
    "requested_type": {
      "$ref": "#/components/schemas/ProxyNetworkType"
    },
    "request_bytes": {
      "type": "integer",
      "minimum": 0
    },
    "response_bytes": {
      "type": "integer",
      "minimum": 0
    },
    "total_bytes": {
      "type": "integer",
      "minimum": 0
    }
  }
}

```

#### `#/components/schemas/ProxyUsageBilling`

```json

{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "status",
    "requested_type",
    "request_bytes",
    "response_bytes",
    "total_bytes",
    "charged_tokens"
  ],
  "properties": {
    "status": {
      "$ref": "#/components/schemas/ProxyTrafficUsageStatus"
    },
    "requested_type": {
      "$ref": "#/components/schemas/ProxyNetworkType"
    },
    "request_bytes": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 0
    },
    "response_bytes": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 0
    },
    "total_bytes": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 0
    },
    "charged_tokens": {
      "type": "integer",
      "minimum": 0
    },
    "requested_tokens": {
      "type": "integer",
      "minimum": 0,
      "description": "Traffic charge calculated from measured bytes before applying the request budget."
    },
    "budget_limit_credits": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 0,
      "description": "Request-wide credit ceiling captured when the job was accepted."
    },
    "budget_used_credits": {
      "type": "integer",
      "minimum": 0,
      "description": "Credits charged across execution, CAPTCHA and traffic at settlement time."
    },
    "budget_remaining_credits": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 0,
      "description": "Remaining request budget after settlement; null means no request-wide ceiling was set."
    },
    "budget_limit_reached": {
      "type": "boolean",
      "description": "True when the request budget prevented the full traffic charge or another paid stage."
    },
    "measurement_reason": {
      "$ref": "#/components/schemas/ProxyTrafficMeasurementReason"
    }
  }
}

```

#### `#/components/schemas/RequestBudget`

```json

{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "budget_limit_credits",
    "budget_used_credits",
    "budget_remaining_credits",
    "budget_limit_reached"
  ],
  "properties": {
    "budget_limit_credits": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 0
    },
    "budget_used_credits": {
      "type": "integer",
      "minimum": 0
    },
    "budget_remaining_credits": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 0
    },
    "budget_limit_reached": {
      "type": "boolean"
    }
  },
  "description": "Request-wide credit budget across execution, protection, CAPTCHA and traffic. Nullable limit and remainder mean no ceiling was supplied."
}

```

#### `#/components/schemas/MarkdownResultMeta`

```json

{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "source",
    "source_truncated",
    "original_bytes",
    "returned_bytes",
    "truncated"
  ],
  "properties": {
    "source": {
      "type": "string",
      "const": "stored_html"
    },
    "source_truncated": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "True or false only when stored result metadata explicitly records whether the source HTML was truncated; null when that metadata is unavailable."
    },
    "original_bytes": {
      "type": "integer",
      "minimum": 0,
      "description": "UTF-8 byte length before the Markdown result limit."
    },
    "returned_bytes": {
      "type": "integer",
      "minimum": 0,
      "description": "UTF-8 byte length returned to the client."
    },
    "truncated": {
      "type": "boolean",
      "description": "Whether the converted Markdown was shortened to fit the result limit."
    }
  }
}

```

#### `#/components/schemas/ProxyNetworkType`

```json

{
  "type": "string",
  "enum": [
    "datacenter",
    "residential",
    "premium"
  ]
}

```

#### `#/components/schemas/ProxyTrafficUsageStatus`

```json

{
  "type": "string",
  "enum": [
    "settled",
    "budget_limited",
    "unavailable"
  ]
}

```

#### `#/components/schemas/ProxyTrafficMeasurementReason`

```json

{
  "type": "string",
  "enum": [
    "transport_bytes_not_collected",
    "transport_bytes_zero"
  ]
}

```

### Complete operation object

```json

{
  "operationId": "getDataBatchesById",
  "tags": [
    "Data API"
  ],
  "summary": "Read owned batch and jobs",
  "x-required-scope": "requests:read",
  "x-mcp-name": "data_get_batch",
  "x-mcp-annotations": {
    "readOnlyHint": true,
    "destructiveHint": false,
    "idempotentHint": true,
    "openWorldHint": false
  },
  "parameters": [
    {
      "$ref": "#/components/parameters/PublicId"
    }
  ],
  "responses": {
    "200": {
      "description": "Batch status and normalized nested jobs. Failed jobs include redacted error fields. Error body uses the documented PublicError DTO.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/DataBatch"
          },
          "example": {
            "items": [],
            "next_cursor": null
          }
        }
      }
    },
    "400": {
      "description": "Invalid public UUID Error body uses the documented PublicError DTO.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/PublicError"
          },
          "example": {
            "error": "Request failed",
            "code": "VALIDATION_ERROR",
            "message": "Invalid public UUID Error body uses the documented PublicError DTO.",
            "requestId": "req_01J2QG"
          }
        }
      },
      "x-docs-retryable": false
    },
    "404": {
      "description": "Not found in this tenant Error body uses the documented PublicError DTO.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/PublicError"
          },
          "example": {
            "error": "Request failed",
            "code": "VALIDATION_ERROR",
            "message": "Not found in this tenant Error body uses the documented PublicError DTO.",
            "requestId": "req_01J2QG"
          }
        }
      },
      "x-docs-retryable": false
    },
    "503": {
      "description": "The public Data API is disabled Error body uses the documented PublicError DTO.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/PublicError"
          },
          "example": {
            "error": "Request failed",
            "code": "PRICING_NOT_ACTIVE",
            "message": "The public Data API is disabled Error body uses the documented PublicError DTO.",
            "requestId": "req_01J2QG"
          }
        }
      },
      "x-docs-retryable": true
    }
  },
  "description": "Reads one batch of this tenant with its jobs and their statuses, without waiting. The id is the batch id returned by data_create_batch or data_list_batches. Use data_wait_batch to block until the batch finishes and data_list_batches to enumerate batches. An unknown id or one owned by another tenant returns 404.",
  "security": [
    {
      "ApiKey": []
    },
    {
      "ApiKeyBearer": []
    }
  ],
  "servers": [
    {
      "url": "https://api.runharvester.com",
      "description": "RunHarvester public API"
    }
  ]
}

```