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

# List activities

> Returns a paginated, filterable list of running activities.



## OpenAPI

````yaml get /v1/running/activities
openapi: 3.1.0
info:
  title: Rewind API
  version: 1.0.0
  description: >-
    Personal data aggregation API. Syncs and serves data from Last.fm, Apple
    Music, Strava, Plex, Letterboxd, Discogs, Trakt, Instapaper, Google
    Calendar, and Gmail.


    ## Domains


    | Domain | Source | Description |

    |--------|--------|-------------|

    | **Listening** | Last.fm, Apple Music | Scrobbles, top
    artists/albums/tracks, streaks, stats |

    | **Running** | Strava | Activities, splits, gear, personal records, year
    summaries |

    | **Watching** | Plex, Letterboxd | Movies, TV shows, watch history,
    ratings, reviews |

    | **Collecting** | Discogs, Trakt | Vinyl/CD collection, physical media,
    wantlist |

    | **Reading** | Instapaper | Articles, highlights, reading progress, word
    count |

    | **Attending** | Google Calendar, Gmail | Live events, tickets, sports
    games, concerts, venues |


    ## Authentication


    All endpoints require a Bearer token. There are two key types:


    - **Read keys** (`rw_live_...`) — access all GET endpoints

    - **Admin keys** (`rw_admin_...`) — access all endpoints including sync
    triggers and data management


    Pass your key in the Authorization header: `Authorization: Bearer
    rw_live_...`


    ## Pagination


    List endpoints return paginated responses:


    ```json

    {
      "data": [...],
      "pagination": { "page": 1, "limit": 20, "total": 150, "total_pages": 8 }
    }

    ```


    The activity feed uses cursor-based pagination instead.


    ## Quick Start


    ```bash

    # Check the API is up

    curl https://api.rewind.rest/v1/health


    # Fetch recent scrobbles (requires read key)

    curl -H "Authorization: Bearer rw_live_..." \
      https://api.rewind.rest/v1/listening/recent

    # Fetch running stats

    curl -H "Authorization: Bearer rw_live_..." \
      https://api.rewind.rest/v1/running/stats
    ```


    ## Errors


    All errors follow the same envelope:


    ```json

    { "error": "Not found", "status": 404 }

    ```


    Common status codes: 400 (bad request), 401 (unauthorized), 404 (not found),
    500 (server error).
  contact:
    url: https://github.com/pdugan20/rewind
servers:
  - url: https://api.rewind.rest
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Listening
    description: Last.fm scrobbles, top charts, streaks, and stats.
  - name: Running
    description: Strava activities, splits, gear, records, and year summaries.
  - name: Watching
    description: >-
      Movies, TV shows, watch history, ratings, and reviews from Plex and
      Letterboxd.
  - name: Collecting
    description: Vinyl/CD collection from Discogs and physical media from Trakt.
  - name: Reading
    description: Articles, highlights, and reading stats from Instapaper.
  - name: Attending
    description: >-
      Live events you bought tickets for — sports games, concerts, theater.
      Sourced from Google Calendar and ticket-vendor email.
  - name: Feed
    description: Cross-domain activity feed with cursor-based pagination.
  - name: Search
    description: Full-text search across all domains.
  - name: Images
    description: Image proxy with on-the-fly transforms via Cloudflare Images.
  - name: System
    description: Health checks and sync status.
  - name: Admin
    description: >-
      API key management, sync triggers, and data administration. Requires admin
      key.
  - name: Webhooks
    description: Inbound webhook receivers for Strava and Plex. No auth required.
paths:
  /v1/running/activities:
    get:
      tags:
        - Running
      summary: List activities
      description: Returns a paginated, filterable list of running activities.
      operationId: listRunningActivities
      parameters:
        - schema:
            type: integer
            minimum: 1
            default: 1
          required: false
          name: page
          in: query
        - schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
          required: false
          name: limit
          in: query
        - schema:
            type: string
          required: false
          name: year
          in: query
        - schema:
            type: string
          required: false
          name: type
          in: query
        - schema:
            type: string
          required: false
          name: city
          in: query
        - schema:
            type: string
          required: false
          name: min_distance
          in: query
        - schema:
            type: string
          required: false
          name: max_distance
          in: query
        - schema:
            type: string
            default: date
          required: false
          name: sort
          in: query
        - schema:
            type: string
            default: desc
          required: false
          name: order
          in: query
        - schema:
            type: string
            pattern: ^\d{4}-\d{2}-\d{2}$
            description: Single day (YYYY-MM-DD). Overrides from/to.
            example: '2025-02-17'
          required: false
          description: Single day (YYYY-MM-DD). Overrides from/to.
          name: date
          in: query
        - schema:
            type: string
            description: Range start, inclusive (ISO 8601)
            example: '2025-02-01T00:00:00Z'
          required: false
          description: Range start, inclusive (ISO 8601)
          name: from
          in: query
        - schema:
            type: string
            description: Range end, inclusive (ISO 8601)
            example: '2025-02-28T23:59:59Z'
          required: false
          description: Range end, inclusive (ISO 8601)
          name: to
          in: query
      responses:
        '200':
          description: Paginated activity list
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: number
                        strava_id:
                          type: number
                        name:
                          type: string
                        date:
                          type: string
                        distance_mi:
                          type: number
                        duration:
                          type: string
                        duration_s:
                          type: number
                        pace:
                          type: string
                        elevation_ft:
                          type: number
                        heartrate_avg:
                          type:
                            - number
                            - 'null'
                        heartrate_max:
                          type:
                            - number
                            - 'null'
                        cadence:
                          type:
                            - number
                            - 'null'
                        calories:
                          type:
                            - number
                            - 'null'
                        suffer_score:
                          type:
                            - number
                            - 'null'
                        city:
                          type:
                            - string
                            - 'null'
                        state:
                          type:
                            - string
                            - 'null'
                        polyline:
                          type:
                            - string
                            - 'null'
                        is_race:
                          type: boolean
                        workout_type:
                          type: string
                        strava_url:
                          type:
                            - string
                            - 'null'
                      required:
                        - id
                        - strava_id
                        - name
                        - date
                        - distance_mi
                        - duration
                        - duration_s
                        - pace
                        - elevation_ft
                        - heartrate_avg
                        - heartrate_max
                        - cadence
                        - calories
                        - suffer_score
                        - city
                        - state
                        - polyline
                        - is_race
                        - workout_type
                        - strava_url
                  pagination:
                    type: object
                    properties:
                      page:
                        type: number
                      limit:
                        type: number
                      total:
                        type: number
                      total_pages:
                        type: number
                    required:
                      - page
                      - limit
                      - total
                      - total_pages
                required:
                  - data
                  - pagination
              example:
                data:
                  - id: 17748681520
                    strava_id: 17748681520
                    name: Monday Evening Run
                    date: '2026-03-16T17:00:05Z'
                    distance_mi: 4.49
                    duration: '36:02'
                    duration_s: 2162
                    pace: 8:02/mi
                    elevation_ft: 370.73
                    heartrate_avg: null
                    heartrate_max: null
                    cadence: 75.2
                    calories: 525
                    suffer_score: null
                    city: null
                    state: null
                    polyline: _wfbHb|niVD_@TEd@...
                    is_race: false
                    workout_type: default
                    strava_url: https://www.strava.com/activities/17748681520
                pagination:
                  page: 1
                  limit: 20
                  total: 1350
                  total_pages: 68
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          example: Not found
        status:
          type: integer
          example: 404
      required:
        - error
        - status
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key. Read keys (rw_live_...) access GET endpoints. Admin keys
        (rw_admin_...) access all endpoints.

````