> ## 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.

# Previous stream



## OpenAPI

````yaml https://statistics.1up.vision/openapi.json get /v1/streams/{id}/before
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/streams/{id}/before:
    get:
      tags:
        - Streams
      summary: Previous stream
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StreamSummary'
        '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 previous stream
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    StreamSummary:
      type: object
      properties:
        id:
          type: string
        streamer_id:
          type: string
        avg_viewers:
          type: integer
          nullable: true
        peak_viewers:
          type: integer
          nullable: true
        live_views:
          type: integer
          nullable: true
        live_views_final:
          type: integer
          nullable: true
        vod_id:
          type: string
          nullable: true
        game_name:
          type: string
          nullable: true
        started_at:
          type: string
          format: date-time
        ended_at:
          type: string
          format: date-time
          nullable: true
        is_live:
          type: boolean
        title:
          type: string
          nullable: true
        tags:
          type: array
          items:
            type: string
          nullable: true
        updated_at:
          type: string
          format: date-time
          nullable: true
        watchtime:
          type: integer
          nullable: true
        thumbnail:
          type: string
          format: uri
          nullable: true
        unique_chatters:
          type: integer
          nullable: true
        user_profile_image:
          type: string
          format: uri
          nullable: true
        user_display_name:
          type: string
          nullable: true
      additionalProperties: true
    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.

````