Does Looperman have an API?

No. Looperman publishes no public API, no developer keys and no documented endpoints. What it has is an advanced-search form served as HTML, which any browser can read. LoopHaven reads that form — it is a wrapper, not a client of something official. Anything sold as “the Looperman API” is a scraper with a friendlier name.

Verified against the live site on 16 November 2026

This matters before anything else: there is no key to request, no rate-limit header to read, no changelog to watch. A change to the site's markup is a breaking change for every tool built on it, with no notice. That is the whole reason the parsing notes in this project are public rather than hidden.

What Looperman serves instead

The advanced-search dialog is not rendered into the page. It is fetched:

POST https://www.looperman.com/ajax/ajax_adv_search_modal
Content-Type: application/x-www-form-urlencoded
X-Requested-With: XMLHttpRequest
Referer: https://www.looperman.com/loops

item_type=loops&query_filter_params=<base64>&csrftoken=<32 chars>

Three details decide whether this works at all:

What the form gives you that URLs do not

Reading the form is what makes a wrapper correct rather than approximately correct. Four things are only knowable from it:

FilterReality
Genres69 values, each with a numeric gid
Categories40 values, cid
Keys24 values, mkey — flats do not exist
TempoA range: ftempo and ttempo. There is no bpm= parameter.

The key encoding is the one that surprises people: the site writes accidentals the way a programmer would, so F# is fs and F#m is fsm — but there is no flat spelling at all. Bb is stored as am, which is musically the same pitch class. A wrapper that passes bb through gets an unfiltered page rather than an error.

Three traps that silently corrupt a wrapper

None of these throws. Each one produces a plausible page with wrong data, which is why they take a week to notice.

1. Every result card shares the same parent element

The listing cards all sit inside one div.col-12. The obvious approach — find the container, then read fields inside it — returns the same ancestor for all 25 items, so every field you read belongs to the first one. The reliable segmentation is the per-item [data-mp3] marker, in document order.

2. The detail page contains other loops' download links

A loop detail page holds 16 links to /getfiles/ when you are logged in — the loop itself, plus every recommended loop below it. Taking the first one is not “usually right”; it depends on the order the recommendations are rendered. Indexing by element identity rather than list position fixes it.

3. The result count only exists on page one

“Loops 1 - 25 of 5,000” appears on page one and then disappears. The number is capped at 5,000 even when there are more, and very small result sets are phrased differently (“Showing 4 … loops”). Any scraper that reports a total on page two is inventing it. LoopHaven reports the ceiling on page one and null afterwards, instead of guessing:

Requesttotalpagination.total_capped
Page 1, 5,000+ matches5000true
Page 1, fewer matchesthe real countfalse
Page 2 and beyondnullfalse

What LoopHaven exposes instead

A small HTTP surface over the same site, with the vocabulary resolved for you:

RouteWhat it does
GET /api/filtersThe full vocabulary as JSON
GET /api/searchLoop search; accepts labels, ids or slugs
GET /api/acapellas/searchAcapella search plus licence wording
GET /api/loop/{id}One loop, parsed from the page's JSON-LD
GET /api/download/info/{kind}/{id}What a download would give you, without spending quota
GET /api/download/audio/{kind}/{id}The file itself
curl "http://127.0.0.1:8000/api/search?genre=Trap&bpm=140&limit=1"

{
  "success": true,
  "count": 1,
  "total": 5000,
  "pagination": { "from": 1, "to": 25, "total": 5000, "total_capped": true },
  "resolved": { "genre": { "id": 54, "label": "Trap" } },
  "looperman_url": "https://www.looperman.com/loops?gid=54&ftempo=140&ttempo=140",
  "info": "MP3 previews need no session. WAV requires a session (POST /api/auth/login)."
}

Unknown filter values return 422 with suggestions rather than an empty result page — the difference between “no loops match” and “you spelled the genre wrong”.

Can I build on this without asking Looperman?

The code is MIT. The audio is not: loops and acapellas belong to the people who uploaded them and are offered under Looperman's own terms, which allow use inside a derivative work but not redistribution as-is. Reading public pages at human pace is what a browser does; bulk harvesting is a different act, and this project does not do it.

Deeper detail. The endpoint, the CSRF extraction and the full filter dump are written up as public notes: the hidden search form, the DOM traps, checking a session honestly.

Next: downloading the actual file with Python, or the filter reference.