GoatCounter Pageviews API

The Pageviews API from GoatCounter — 1 operation(s) for pageviews.

Operations 1

POST /count Count pageviews #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/goatcounter-pageviews-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

goatcounter-pageviews-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: GoatCounter Pageviews API
  description: The GoatCounter API can be used to manage sites, users, count pageviews, export raw data, retrieve statistics, and build custom dashboards on top of GoatCounter web analytics.
  version: '0'
  contact:
    name: GoatCounter
    url: https://www.goatcounter.com/
servers:
- url: https://goatcounter.com/api/v0
  description: Hosted GoatCounter (replace host with your site's subdomain)
security:
- bearerAuth: []
tags:
- name: Pageviews
paths:
  /count:
    post:
      summary: Count pageviews
      description: Send one or more pageview events to GoatCounter for tracking. Accepts a batch of hits per request.
      operationId: count
      tags:
      - Pageviews
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                no_sessions:
                  type: boolean
                hits:
                  type: array
                  items:
                    $ref: '#/components/schemas/Hit'
      responses:
        '202':
          description: Hits accepted.
        '400':
          description: Bad request.
        '401':
          description: Unauthorized.
components:
  schemas:
    Hit:
      type: object
      properties:
        path:
          type: string
        title:
          type: string
        ref:
          type: string
        event:
          type: boolean
        size:
          type: array
          items:
            type: number
        bot:
          type: integer
        user_agent:
          type: string
        location:
          type: string
        ip:
          type: string
        created_at:
          type: string
          format: date-time
        query:
          type: string
        session:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer