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

# Prepared latest music and movie

> Returns one prepared pair for the authenticated user. No live provider requests. Keep the whole response fixed for the page visit; refresh only for a new visit. Music is the last completed scrobble, not live playback. Returns 503 until the first background publication.



## OpenAPI

````yaml get /v1/lately
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/lately:
    get:
      tags:
        - Feed
      summary: Prepared latest music and movie
      description: >-
        Returns one prepared pair for the authenticated user. No live provider
        requests. Keep the whole response fixed for the page visit; refresh only
        for a new visit. Music is the last completed scrobble, not live
        playback. Returns 503 until the first background publication.
      operationId: getLately
      responses:
        '200':
          description: Prepared snapshot
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LatelySnapshot'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  status:
                    type: number
                required:
                  - error
                  - status
        '503':
          description: Snapshot not ready
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  status:
                    type: number
                required:
                  - error
                  - status
      security:
        - bearerAuth: []
components:
  schemas:
    LatelySnapshot:
      type: object
      properties:
        schema_version:
          type: number
          enum:
            - 1
        version:
          type: integer
          exclusiveMinimum: 0
        as_of:
          type: string
          format: date-time
        music_checked_at:
          type:
            - string
            - 'null'
          format: date-time
        movie_checked_at:
          type:
            - string
            - 'null'
          format: date-time
        music:
          type:
            - object
            - 'null'
          properties:
            event_id:
              type: string
            track_id:
              type:
                - integer
                - 'null'
            name:
              type: string
            artist:
              type: string
            album:
              type:
                - string
                - 'null'
            scrobbled_at:
              type: string
              format: date-time
            image:
              type:
                - object
                - 'null'
              properties:
                cdn_url:
                  type: string
                  format: uri
                width:
                  type: integer
                  exclusiveMinimum: 0
                height:
                  type: integer
                  exclusiveMinimum: 0
                thumbhash:
                  type:
                    - string
                    - 'null'
                dominant_color:
                  type:
                    - string
                    - 'null'
                accent_color:
                  type:
                    - string
                    - 'null'
              required:
                - cdn_url
                - width
                - height
                - thumbhash
                - dominant_color
                - accent_color
          required:
            - event_id
            - track_id
            - name
            - artist
            - album
            - scrobbled_at
            - image
        movie:
          type:
            - object
            - 'null'
          properties:
            event_id:
              type: string
            movie_id:
              type: integer
            title:
              type: string
            year:
              type:
                - integer
                - 'null'
            directors:
              type: array
              items:
                type: string
            content_rating:
              type:
                - string
                - 'null'
            runtime_minutes:
              type:
                - integer
                - 'null'
            watched_at:
              type: string
              format: date-time
            user_rating:
              type:
                - number
                - 'null'
            image:
              type:
                - object
                - 'null'
              properties:
                cdn_url:
                  type: string
                  format: uri
                width:
                  type: integer
                  exclusiveMinimum: 0
                height:
                  type: integer
                  exclusiveMinimum: 0
                thumbhash:
                  type:
                    - string
                    - 'null'
                dominant_color:
                  type:
                    - string
                    - 'null'
                accent_color:
                  type:
                    - string
                    - 'null'
              required:
                - cdn_url
                - width
                - height
                - thumbhash
                - dominant_color
                - accent_color
          required:
            - event_id
            - movie_id
            - title
            - year
            - directors
            - content_rating
            - runtime_minutes
            - watched_at
            - user_rating
            - image
      required:
        - schema_version
        - version
        - as_of
        - music_checked_at
        - movie_checked_at
        - music
        - movie
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key. Read keys (rw_live_...) access GET endpoints. Admin keys
        (rw_admin_...) access all endpoints.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.