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

# Statistiche app

> Statistiche publisher di un’app: run, success rate, attività recente.

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

Autenticazione: API key obbligatoria (`Authorization: Bearer <API Key>`). Solo autore dell’app.

Aggregati riservati all'autore, calcolati dai bucket giornalieri dei run terminati. Sono ammesse app senza release (traffico di debug). I run di test sono esclusi salvo `include_test=true`. Le metriche senza run terminati nella finestra valgono `null`, non 0.

## Richiesta

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

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

### Esempio di richiesta

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

## Risposta

### 200 successo

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

### Errori

| HTTP | `code`         | `category`  | Descrizione                                                    |
| ---- | -------------- | ----------- | -------------------------------------------------------------- |
| 401  | `unauthorized` | `forbidden` | API key mancante o non valida.                                 |
| 404  | `*-not-found`  | `not_found` | Il target non esiste o è invisibile alla credenziale corrente. |

Le risposte di errore usano `{"error": {code, category, message, retryable}}`. Vedi <a href="/docs/it/datahub/api/reference/introduction#errors">Errori</a>.

## Librerie client

Gli SDK Python e JavaScript non wrappano ancora questo endpoint. Chiama REST direttamente.
