Minimal integration example for the song-search API (this page demos the first two endpoints):
GET /api/search?q=<text>&limit=<1–25> — autocomplete over “artist title” (infix matching, popularity-blended ranking)GET /api/songs/:id — full song: chords (unique, render-ready), sections, unmappedGET /api/search-by-chords?chords=C,Am,F,G&mode=playable|contains&transpose=same|any&limit=<1–50> — reverse search: songs playable with (or practicing) a chord set; each row reports transposition, extra and unmapped chords
The page talks to the API at — by default the origin
it is served from. To point it at another backend, add
?api=https://backend-host to the URL; that server must then allow this
page's origin via its CORS_ORIGINS env var. For local development:
bun server/index.ts → http://localhost:8787/test.html.