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

> Publisher-Stats einer App: Runs, Erfolgsrate, jüngste Aktivität.

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

Authentifizierung: API-Schlüssel erforderlich (`Authorization: Bearer <API Key>`). Nur App-Autor.

Nur für Autoren: Aggregate aus Tages-Buckets beendeter Runs. Apps ohne Release sind erlaubt (Debug-Traffic). Test-Runs sind ausgeschlossen, außer bei `include_test=true`. Kennzahlen ohne beendete Runs im Zeitfenster sind `null`, nicht 0.

## Anfrage

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

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

### Beispielanfrage

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

## Antwort

### 200 Erfolg

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

### Fehler

| HTTP | `code`         | `category`  | Beschreibung                                                          |
| ---- | -------------- | ----------- | --------------------------------------------------------------------- |
| 401  | `unauthorized` | `forbidden` | Fehlender oder ungültiger API-Schlüssel.                              |
| 404  | `*-not-found`  | `not_found` | Ziel existiert nicht oder ist für die aktuelle Credential unsichtbar. |

Fehlerantworten nutzen `{"error": {code, category, message, retryable}}`. Siehe <a href="/docs/de/datahub/api/reference/introduction#errors">Fehler</a>.

## Client-Bibliotheken

Die Python- und JavaScript-SDKs wrappen diesen Endpoint noch nicht. REST direkt aufrufen.
