# GoatCounter Stats API

**Canonical:** https://apis.io/apis/goatcounter/goatcounter-stats-api/  
**Provider:** GoatCounter — https://apis.io/providers/goatcounter/  
**Base URL:** https://{code}.goatcounter.com/api/v0  
**Documentation:** https://www.goatcounter.com/help/api

GoatCounter Stats API is one of 9 APIs that [GoatCounter](https://apis.io/providers/goatcounter/) publishes on the [APIs.io](https://apis.io/) network, described by a machine-readable OpenAPI specification. Tagged areas include Stats. The published artifact set on APIs.io includes an OpenAPI specification.

The stats API from GoatCounter — 5 operation(s) for stats.

## Operations (5)

| Method | Path | Summary |
|---|---|---|
| GET | `/api/v0/stats/hits` | Get an overview of pageviews. |
| GET | `/api/v0/stats/hits/{path_id}` | Get an overview of referral information for a path. |
| GET | `/api/v0/stats/total` | Count total number of pageviews for a date range. |
| GET | `/api/v0/stats/{page}` | Get browser/system/etc. stats. |
| GET | `/api/v0/stats/{page}/{id}` | Get detailed stats for an ID. |

## Machine-readable artifacts (1)

- **OpenAPI** — https://raw.githubusercontent.com/api-evangelist/goatcounter/refs/heads/main/openapi/goatcounter-stats-api-openapi.yml

## Other GoatCounter APIs (8)

- [GoatCounter Exports API](https://apis.io/apis/goatcounter/goatcounter-exports-api/)
- [GoatCounter Pageviews API](https://apis.io/apis/goatcounter/goatcounter-pageviews-api/)
- [GoatCounter Paths API](https://apis.io/apis/goatcounter/goatcounter-paths-api/)
- [GoatCounter Sites API](https://apis.io/apis/goatcounter/goatcounter-sites-api/)
- [GoatCounter Statistics API](https://apis.io/apis/goatcounter/goatcounter-statistics-api/)
- [GoatCounter Users API](https://apis.io/apis/goatcounter/goatcounter-users-api/)
- [GoatCounter Count API](https://apis.io/apis/goatcounter/goatcounter-count-api/)
- [GoatCounter Export API](https://apis.io/apis/goatcounter/goatcounter-export-api/)

## Tags

Stats

---

Profiled by [API Evangelist](https://apievangelist.com) and published on [APIs.io](https://apis.io/apis/goatcounter/goatcounter-stats-api/). The API's provider profile, Kin Score and agent-readiness rating are at https://apis.io/providers/goatcounter/.
