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

# Collection-listening cross-reference

> Cross-references vinyl collection with Last.fm listening data showing play counts and match confidence.



## OpenAPI

````yaml get /v1/collecting/cross-reference
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/collecting/cross-reference:
    get:
      tags:
        - Collecting
      summary: Collection-listening cross-reference
      description: >-
        Cross-references vinyl collection with Last.fm listening data showing
        play counts and match confidence.
      operationId: getCollectingCrossReference
      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
            default: plays
          required: false
          name: sort
          in: query
        - schema:
            type: string
            default: all
          required: false
          name: filter
          in: query
      responses:
        '200':
          description: Cross-reference data with summary stats
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        collection:
                          type: object
                          properties:
                            id:
                              type: number
                            discogs_id:
                              type: number
                            title:
                              type: string
                            artists:
                              type: array
                              items:
                                type: string
                            year:
                              type:
                                - number
                                - 'null'
                            format:
                              type: string
                            genres:
                              type: array
                              items:
                                type: string
                            styles:
                              type: array
                              items:
                                type: string
                            image:
                              $ref: '#/components/schemas/ImageAttachment'
                            date_added:
                              type:
                                - string
                                - 'null'
                            rating:
                              type:
                                - number
                                - 'null'
                            discogs_url:
                              type:
                                - string
                                - 'null'
                          required:
                            - id
                            - discogs_id
                            - title
                            - artists
                            - year
                            - format
                            - genres
                            - styles
                            - image
                            - date_added
                            - rating
                            - discogs_url
                        listening:
                          type: object
                          properties:
                            album_name:
                              type:
                                - string
                                - 'null'
                            artist_name:
                              type:
                                - string
                                - 'null'
                            play_count:
                              type:
                                - number
                                - 'null'
                            last_played:
                              type:
                                - string
                                - 'null'
                            match_type:
                              type:
                                - string
                                - 'null'
                            match_confidence:
                              type:
                                - number
                                - 'null'
                          required:
                            - album_name
                            - artist_name
                            - play_count
                            - last_played
                            - match_type
                            - match_confidence
                      required:
                        - collection
                        - listening
                  summary:
                    type: object
                    properties:
                      total_matches:
                        type: number
                      listen_rate:
                        type: number
                      unlistened_count:
                        type: number
                    required:
                      - total_matches
                      - listen_rate
                      - unlistened_count
                  pagination:
                    $ref: '#/components/schemas/PaginationMeta'
                required:
                  - data
                  - summary
                  - pagination
              example:
                data:
                  - collection:
                      id: 1
                      discogs_id: 6872464
                      title: Nevermind
                      artists:
                        - Nirvana
                      year: 1991
                      format: Vinyl
                      genres:
                        - Rock
                      styles:
                        - Grunge
                      image: null
                      date_added: '2026-03-11T16:05:58-07:00'
                      rating: 0
                      discogs_url: https://www.discogs.com/release/6872464
                    listening:
                      album_name: Nevermind
                      artist_name: Nirvana
                      play_count: 333
                      last_played: '2026-02-15T20:00:00Z'
                      match_type: exact
                      match_confidence: 1
                summary:
                  total_matches: 50
                  listen_rate: 0.72
                  unlistened_count: 14
                pagination:
                  page: 1
                  limit: 20
                  total: 50
                  total_pages: 3
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    ImageAttachment:
      type:
        - object
        - 'null'
      properties:
        url:
          type: string
          format: uri
          example: https://cdn.rewind.rest/...
        thumbhash:
          type:
            - string
            - 'null'
          example: YJqGPQw7d4...
        dominant_color:
          type:
            - string
            - 'null'
          example: '#1a1a2e'
        accent_color:
          type:
            - string
            - 'null'
          example: '#e94560'
      required:
        - url
        - thumbhash
        - dominant_color
        - accent_color
    PaginationMeta:
      type: object
      properties:
        page:
          type: integer
          example: 1
        limit:
          type: integer
          example: 20
        total:
          type: integer
          example: 150
        total_pages:
          type: integer
          example: 8
      required:
        - page
        - limit
        - total
        - total_pages
    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.

````