> ## Documentation Index
> Fetch the complete documentation index at: https://docs.1up.vision/llms.txt
> Use this file to discover all available pages before exploring further.

# Yearly stats



## OpenAPI

````yaml https://statistics.1up.vision/openapi.json get /v1/streamer/{name}/yearly-streams
openapi: 3.1.0
info:
  title: Vision Stats API
  version: 1.0.0
  description: >-
    REST API for accessing Twitch streamer analytics, stream summaries, partner
    data, and events. All endpoints are read-only and powered by Cloudflare
    Workers + Hyperdrive.
  contact:
    name: Vision Stats
    url: https://1up.vision
servers:
  - url: http://localhost:8787
    description: Local development
security:
  - BearerAuth: []
tags:
  - name: Meta
    description: Operational endpoints
  - name: Streamer
    description: Streamer level information
  - name: Streams
    description: Individual stream analytics
  - name: Leaderboard
    description: Aggregated leaderboards
  - name: Partners
    description: Sponsor and partner information
  - name: Events
    description: Public events
paths:
  /v1/streamer/{name}/yearly-streams:
    get:
      tags:
        - Streamer
      summary: Yearly stats
      parameters:
        - name: name
          in: path
          required: true
          schema:
            type: string
          description: Streamer username/login (lowercase) or numeric Twitch channel id.
        - name: year
          in: query
          required: false
          schema:
            type: integer
            minimum: 2016
          description: Year to summarize. Defaults to current year.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/YearlyStreamStats'
        '401':
          description: Missing or invalid bearer token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limited
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Failed to fetch yearly streams
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    YearlyStreamStats:
      type: object
      properties:
        stream_count:
          type: integer
        total_minutes:
          type: integer
        avg_viewers:
          type: integer
        peak_viewers:
          type: integer
      additionalProperties: false
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
      required:
        - error
      additionalProperties: false
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Token
      description: >-
        Optional bearer token enforced when the Worker is configured with an API
        token.

````