Counter Account API

The Account API from Counter — 4 operation(s) for account.

Operations 4

POST /resettoken Reset the account read token. #
POST /login Log in and establish a session. #
POST /register Register a new account. #
POST /logout Log out of the current session. #

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/counter-dev-account-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

counter-dev-account-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Counter Account API
  description: Counter (counter.dev) is an open-source, privacy-friendly web analytics service. This specification documents the real HTTP surface of the Counter server as implemented in the AGPL-3.0 source at https://github.com/ihucos/counter.dev. The tracking/collect endpoints are public and unauthenticated and are called by the browser tracking snippet. The stats endpoints return aggregated data and are protected either by a session cookie or by a user + token pair (sessionless, read-only). The account endpoints back the dashboard UI and are not a formally published developer API. Endpoint paths are derived directly from the server source; request/response schemas beyond the documented query parameters are not formally published by the project, so responses are described rather than fully schematized.
  termsOfService: https://counter.dev/
  contact:
    name: Counter (ihucos)
    url: https://github.com/ihucos/counter.dev
  license:
    name: AGPL-3.0
    url: https://github.com/ihucos/counter.dev/blob/master/LICENSE
  version: '1.0'
servers:
- url: https://t.counter.dev
  description: Default hosted tracking / collect host (configurable via data-server).
- url: https://counter.dev
  description: Hosted dashboard, stats, and account host. Self-hosted deployments use their own host.
tags:
- name: Account
paths:
  /resettoken:
    post:
      operationId: resetToken
      tags:
      - Account
      summary: Reset the account read token.
      description: Resets the authenticated account's read-only API token, invalidating the previous token. Requires an authenticated session.
      responses:
        '200':
          description: Token reset.
  /login:
    post:
      operationId: login
      tags:
      - Account
      summary: Log in and establish a session.
      description: Authenticates a user with username and password and sets a session cookie. Body is application/x-www-form-urlencoded.
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
              - user
              - password
              properties:
                user:
                  type: string
                password:
                  type: string
      responses:
        '200':
          description: Logged in; session cookie set and account returned.
        '400':
          description: Missing input or wrong username/password.
  /register:
    post:
      operationId: register
      tags:
      - Account
      summary: Register a new account.
      description: Creates a new account with a username and password, optional email, and UTC offset preference, then establishes a session. Body is application/x-www-form-urlencoded.
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
              - user
              - password
              properties:
                user:
                  type: string
                password:
                  type: string
                mail:
                  type: string
                utcoffset:
                  type: string
      responses:
        '200':
          description: Account created; session cookie set and account returned.
        '400':
          description: Missing input or account already exists.
  /logout:
    post:
      operationId: logout
      tags:
      - Account
      summary: Log out of the current session.
      responses:
        '200':
          description: Session cleared.
components:
  securitySchemes:
    sessionCookie:
      type: apiKey
      in: cookie
      name: session
      description: Session cookie set on login/register, used by the dashboard UI.
    apiToken:
      type: apiKey
      in: query
      name: token
      description: Read-only account token, paired with the user query parameter, for sessionless access to /query and /dump.