Extract a setlist ID from a setlist.fm URL
setlist_id_from_urlExtract the setlist ID from a setlist.fm setlist URL. Handles http/https, with/without www, and extra URL parts, returning the ID for use in other tools.
Instructions
Parse the setlist ID out of a setlist.fm setlist URL so you can paste a link instead of hunting for the ID. Returns {setlistId} (the trailing hex token before .html), ready to feed into setlist_get_setlist / setlist_mark_attended. Scoped to /setlist/ pages — artist (/setlists/) and venue (/venue/) URLs are rejected. Tolerates http/https, with/without www, trailing slash, query/fragment, and a missing .html. Pure local parsing — no network call. Errors if no ID can be parsed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | A setlist.fm setlist URL, e.g. https://www.setlist.fm/setlist/.../...-4ba8a766.html |