openapi: 3.0.3
info:
  title: ISRC Finder API
  version: "2026-11-04"
  description: |
    Paid ISRC lookup. The homepage lookup stays free and does not use this API.
    One credit is one lookup, including a cache hit or a miss.
    Catalog monitoring is not part of this API.
servers:
  - url: https://isrcfinder.app
paths:
  /api/v1/lookup:
    post:
      summary: Look up one recording
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [q]
              properties:
                q:
                  type: string
                  description: Song and artist, streaming link, ISRC, or UPC/EAN.
      responses:
        "200":
          description: Lookup result. creditsCharged is 1.
        "401":
          description: Missing or invalid API key.
        "402":
          description: No paid plan, or not enough ISRC credits.
        "429":
          description: Plan rate limit exceeded.
  /api/v1/bulk:
    post:
      summary: Look up up to 50 recordings
      description: |
        Bulk skips the MusicBrainz cross-check. One credit per query.
        Send another request for rows beyond 50.
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [queries]
              properties:
                queries:
                  type: array
                  maxItems: 50
                  items:
                    type: string
      responses:
        "200":
          description: One item per query.
        "401":
          description: Missing or invalid API key.
        "402":
          description: No paid plan, or not enough ISRC credits.
        "429":
          description: Plan rate limit exceeded.
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key from Settings → API Keys. Starts with sk_.
