> For the complete documentation index, see [llms.txt](https://argos-ci.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://argos-ci.com/docs/api-reference/reference/analytics.md).

# Analytics

Retrieve account-level build and screenshot metrics over time.

## Get account analytics

> Retrieve build and screenshot metrics for an account. The personal access token must be scoped to the account.

````json
{"openapi":"3.2.0","info":{"title":"Argos API","version":"2.0.0"},"tags":[{"name":"Analytics","description":"Retrieve account-level build and screenshot metrics over time."}],"servers":[{"url":"https://api.argos-ci.com/v2","description":"API Endpoint"}],"security":[{"personalAccessToken":[]},{"oauth2":["projects:read"]}],"components":{"securitySchemes":{"personalAccessToken":{"type":"http","scheme":"bearer","bearerFormat":"Personal Access Token","description":"Authenticate as a **user** with a personal access token.\n\nSend it as a bearer token in the `Authorization` header:\n\n```http\nAuthorization: Bearer <personal-access-token>\n```\n\nPersonal access tokens act on behalf of the user that created them\nand are required by endpoints that perform user actions, such as\nreviewing builds and posting comments."},"oauth2":{"type":"oauth2","description":"Authenticate as a **user** via an OAuth 2.1 access token obtained\nthrough the authorization-code (+ PKCE) flow. Used by the CLI and by\nMCP clients/agents. The token acts on behalf of the authorizing user,\nlimited to the granted scopes and organizations.","flows":{"authorizationCode":{"authorizationUrl":"https://app.argos-ci.com/oauth/authorize","tokenUrl":"https://app.argos-ci.com/oauth/token","refreshUrl":"https://app.argos-ci.com/oauth/token","scopes":{"profile":"Read your Argos profile and the list of teams you belong to.","projects:read":"Read your projects, builds, screenshots, diffs, tests, and analytics.","projects:write":"Create and configure projects and their settings.","builds:write":"Create and upload builds and screenshots.","reviews:write":"Approve, reject, or dismiss build reviews and ignore changes.","comments:read":"Read build comments and threads.","comments:write":"Post, edit, and delete comments, add reactions, and manage subscriptions.","account:admin":"Manage organization settings and members."}}}}},"schemas":{"AccountAnalytics":{"type":"object","properties":{"screenshots":{"type":"object","properties":{"series":{"type":"array","items":{"type":"object","properties":{"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"projects":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"description":"Counts keyed by project ID. Use the sibling `projects` array to resolve each project name."},"ts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix timestamp in milliseconds at the start of the period."}},"required":["total","projects","ts"],"additionalProperties":false}},"all":{"type":"object","properties":{"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"projects":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"description":"Counts keyed by project ID. Use the sibling `projects` array to resolve each project name."}},"required":["total","projects"],"additionalProperties":false},"projects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-zA-Z0-9_\\-.]+$"}},"required":["id","name"],"additionalProperties":false}}},"required":["series","all","projects"],"additionalProperties":false},"builds":{"type":"object","properties":{"series":{"type":"array","items":{"type":"object","properties":{"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"projects":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"description":"Counts keyed by project ID. Use the sibling `projects` array to resolve each project name."},"changesDetected":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"noChanges":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"accepted":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rejected":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"ts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix timestamp in milliseconds at the start of the period."}},"required":["total","projects","changesDetected","noChanges","accepted","rejected","ts"],"additionalProperties":false}},"all":{"type":"object","properties":{"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"projects":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"description":"Counts keyed by project ID. Use the sibling `projects` array to resolve each project name."},"changesDetected":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"noChanges":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"accepted":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rejected":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["total","projects","changesDetected","noChanges","accepted","rejected"],"additionalProperties":false},"projects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-zA-Z0-9_\\-.]+$"}},"required":["id","name"],"additionalProperties":false}}},"required":["series","all","projects"],"additionalProperties":false}},"required":["screenshots","builds"],"additionalProperties":false},"Error":{"type":"object","properties":{"error":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false,"description":"Error response"}}},"paths":{"/accounts/{accountSlug}/analytics":{"get":{"operationId":"getAccountAnalytics","summary":"Get account analytics","description":"Retrieve build and screenshot metrics for an account. The personal access token must be scoped to the account.","tags":["Analytics"],"parameters":[{"in":"path","name":"accountSlug","schema":{"type":"string","minLength":1,"description":"Slug of the account to retrieve analytics for."},"required":true,"description":"Slug of the account to retrieve analytics for."},{"in":"query","name":"from","schema":{"description":"Start of the analytics period, as an ISO 8601 datetime.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"required":true,"description":"Start of the analytics period, as an ISO 8601 datetime."},{"in":"query","name":"to","schema":{"description":"End of the analytics period, as an ISO 8601 datetime. Defaults to the current time.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"description":"End of the analytics period, as an ISO 8601 datetime. Defaults to the current time."},{"in":"query","name":"groupBy","schema":{"type":"string","enum":["day","week","month"],"description":"Time period used to group each series data point."},"required":true,"description":"Time period used to group each series data point."},{"in":"query","name":"projectNames","schema":{"description":"Optional project name filter. Pass one value or repeat the parameter for multiple projects.","anyOf":[{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-zA-Z0-9_\\-.]+$"},{"type":"array","items":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-zA-Z0-9_\\-.]+$"}}]},"description":"Optional project name filter. Pass one value or repeat the parameter for multiple projects."}],"responses":{"200":{"description":"Account analytics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountAnalytics"}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
````


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://argos-ci.com/docs/api-reference/reference/analytics.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
