*** title: Metrics and analytics description: Metrics available in AISquare and how to retrieve them using the API. ---------------------------------------------------------------------------------- This guide explains the metrics available in AISquare and how to retrieve them using the API. *** ## Overview AISquare provides endpoints to retrieve engagement and activity metrics for AI Studios (publications). These metrics are available in two contexts: * **Owner / co-creator metrics** * **Public impact metrics** *** ## Owner and co-creator metrics This endpoint provides detailed analytics for users who have access to a publication as: * Owner * Co-creator ### Endpoint ``` POST /api/v1/aistudios/metrics/ ``` ### Request body ```json { "url": "ai-research-studio" } ``` ### Access control * Requires authentication * Restricted to publication owners or co-creators * Returns `403` if access is not allowed ### Response includes **Publication details** * `id` * `name` * `custom_url` * `created_at` * `allow_bookings` **Experience counts** Counts of different experience types: * `AI_EXPERT` * `AI_NOTE` * `QUEST` * `PODCAST` * `total` **Engagement metrics** Aggregated metrics across the publication: * `total_views` * `total_likes` * `total_bookmarks` * `total_shares` * `total_comments` * `total_appointments` **Activity metrics** * `monthly_active_users` **Social metrics** * `followers_count` * `following_count` **Metadata** * `generated_at` *** ## Public impact metrics This endpoint provides public engagement metrics for a publication. ### Endpoint ``` POST /api/v1/aistudios/public-impact/ ``` ### Request body ```json { "url": "ai-research-studio" } ``` ### Access control * Requires authentication * Available to any authenticated user ### Response includes **Publication info** * `id` * `name` * `custom_url` **Metrics** * `total_plays` * `likes_count` * `completion_rate` * `active_users` * `saves_count` * `influence_score` **Metadata** * `time_period_days` (fixed at 30 days) * `generated_at` ### Time window * Public impact metrics are calculated over a fixed **30-day period** * Owner metrics are not explicitly scoped to a fixed window in the spec *** ## Data characteristics Based on the API: * Metrics are aggregated at the publication level * Responses include computed values (e.g. `completion_rate`, `influence_score`) * No per-user breakdown is provided in these endpoints *** ## When to use each endpoint | Use case | Endpoint | | ------------------------ | --------------------------- | | Internal dashboards | `/aistudios/metrics/` | | Public analytics display | `/aistudios/public-impact/` | *** ## Error responses | Status | Meaning | | ------ | -------------------------------------------------- | | `403` | User is not owner or co-creator (metrics endpoint) | | `404` | Publication not found | | `400` | Invalid or missing `url` | *** ## Notes * Both endpoints require a `url` field in the request body * Both endpoints return aggregated metrics for a publication * Access control differs between endpoints *** ## Related pages * [AI Studios](/docs/product/ai-studios) — publication-scoped endpoints * [Working with creators](/docs/insights/working-with-creators) — owner and co-creator profiles * [Permissions and access control](/docs/data-ux-guides/permissions-and-access-control) — access validation * [Authentication](/docs/getting-started/authentication) — required for all endpoints * [Core Concepts](/docs/getting-started/core-concepts) — metrics in the entity model * [Errors](/docs/reference/errors) — handle 403, 404 responses