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

# App stats

> Publisher stats for one app: runs, success rate, recent activity.

**`GET`** `https://api-datahub.octoparse.com/v1/data-apps/{app_id}/stats`

Authentication: API key required (`Authorization: Bearer <API Key>`). App author only.

Author-only aggregates from terminal-run day buckets. Zero-Release apps are allowed (debug traffic). Test runs excluded unless `include_test=true`. Metrics with no terminal runs in-window are `null`, not 0.

## Request

<ParamField path="app_id" type="string" required>
  field
</ParamField>

<ParamField query="include_test" type="boolean" default="False">
  field
</ParamField>

### Example request

```bash theme={null}
curl \
  -H "Authorization: Bearer $OCTOPARSE_API_KEY" \
  "https://api-datahub.octoparse.com/v1/data-apps/carol/reviews-query/stats"
```

## Response

### 200 success

```json theme={null}
{
  "data": {
    "namespace": "carol",
    "app_name": "probe-b",
    "total_runs": 2,
    "last_run_at": "2026-09-15T07:45:42.326823+00:00",
    "runs_30d": 2,
    "success_rate_30d": 1.0,
    "runs_7d": 2,
    "success_rate_7d": 1.0,
    "calls_7d": [
      0,
      0,
      "…"
    ],
    "avg_duration_ms_30d": 422,
    "credits_30d": 0.04
  }
}
```

### Errors

| HTTP | `code`         | `category`  | Description                                                      |
| ---- | -------------- | ----------- | ---------------------------------------------------------------- |
| 401  | `unauthorized` | `forbidden` | Missing or invalid API key.                                      |
| 404  | `*-not-found`  | `not_found` | Target does not exist or is invisible to the current credential. |

Error responses use `{"error": {code, category, message, retryable}}`. See <a href="/docs/en/datahub/api/reference/introduction#errors">Errors</a>.

## Client libraries

The Python and JavaScript SDKs do not wrap this endpoint yet. Call REST directly.
