# Lexicon Local API Documentation

**URL:** <https://discuss.lexicondj.com/t/lexicon-local-api-documentation/53>\
**Category:** Developers\
**Created:** [January 10, 2022, 10:25am UTC](https://discuss.lexicondj.com/t/lexicon-local-api-documentation/53 "2022-01-10T10:25:53Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christiaan](https://discuss.lexicondj.com/user_avatar/discuss.lexicondj.com/christiaan/32/10_2.png) [@Christiaan](https://discuss.lexicondj.com/u/Christiaan)\
**Post date:** [January 10, 2022, 10:25am UTC](https://discuss.lexicondj.com/t/lexicon-local-api-documentation/53/1 "2022-01-10T10:25:53Z")

</div>

You can find the interactive Local API documentation [here](https://www.lexicondj.com/docs/developers)

---

<div class="post-metadata">

**Author:** ![Scythe](https://discuss.lexicondj.com/user_avatar/discuss.lexicondj.com/scythe/32/26_2.png) [@Scythe](https://discuss.lexicondj.com/u/Scythe)\
**Post date:** [January 11, 2022, 5:25am UTC](https://discuss.lexicondj.com/t/lexicon-local-api-documentation/53/2 "2022-01-11T05:25:40Z")

</div>

Ooh, this is getting the creative juices flowing. Some ideas for endpoints/parameters and potential usecases:

- title parameter for the track endpoint to search for a specific track rather than specifying the ID.
- Potentially an “inplaylist” parameter for /track/ to only return a track if it’s in a playlist. Alternatively, when we have an endpoint for playlists we could specify specific playlist IDs.

Things like this could power a song request tool for my twitch stream where the song request chatbot could poll Lexicon to verify if I have the song or not

---

<div class="post-metadata">

**Author:** ![Christiaan](https://discuss.lexicondj.com/user_avatar/discuss.lexicondj.com/christiaan/32/10_2.png) [@Christiaan](https://discuss.lexicondj.com/u/Christiaan)\
**Post date:** [January 11, 2022, 8:43am UTC](https://discuss.lexicondj.com/t/lexicon-local-api-documentation/53/3 "2022-01-11T08:43:35Z")

</div>

Absolutely! I’m only just getting started with the API. It will grow over time. I just felt like making the base for it with the docs. More soon! (doing too many things at the same time right now :D)

---

<div class="post-metadata">

**Author:** ![Christiaan](https://discuss.lexicondj.com/user_avatar/discuss.lexicondj.com/christiaan/32/10_2.png) [@Christiaan](https://discuss.lexicondj.com/u/Christiaan)\
**Post date:** [January 12, 2022, 11:24pm UTC](https://discuss.lexicondj.com/t/lexicon-local-api-documentation/53/4 "2022-01-12T23:24:23Z")

</div>



---

<div class="post-metadata">

**Author:** ![s4000](https://discuss.lexicondj.com/user_avatar/discuss.lexicondj.com/s4000/32/33_2.png) [@s4000](https://discuss.lexicondj.com/u/s4000)\
**Post date:** [January 18, 2022, 12:10am UTC](https://discuss.lexicondj.com/t/lexicon-local-api-documentation/53/5 "2022-01-18T00:10:37Z")

</div>

> [@Christiaan](#):
>
> Application\_OpenTags

This looks very good for a first pass.

I was thinking about doing a script that would automate imports when certain criteria are met… I have a few things in mind (rounded BPM, cue point analysis), and it looks like i have almost everything I need…

I think I can do mostly everything with this API…

I think I would query the track endpoint, and get any tracks without cue or tempo markers, and anything incoming… and run processing on those using actions…  
I see the actions rely on selected tracks… I can’t see where I would be able to query, then select tracks based on criteria (incoming = 1)… and other things…

Where would I do that?  
Other than that, I think I could write a pretty decent automation.

---

<div class="post-metadata">

**Author:** ![Christiaan](https://discuss.lexicondj.com/user_avatar/discuss.lexicondj.com/christiaan/32/10_2.png) [@Christiaan](https://discuss.lexicondj.com/u/Christiaan)\
**Post date:** [January 18, 2022, 6:41am UTC](https://discuss.lexicondj.com/t/lexicon-local-api-documentation/53/6 "2022-01-18T06:41:51Z")

</div>

The API is very much in progress so I still have to add lots of endpoints and options.  
I think an endpoint to execute recipes on a list of tracks would be an excellent idea.

Give me some time for that 🙂 I’m building the API when I find some time here and there. There is a lot to document too.

---

<div class="post-metadata">

**Author:** ![burgerga](https://discuss.lexicondj.com/user_avatar/discuss.lexicondj.com/burgerga/32/2655_2.png) [@burgerga](https://discuss.lexicondj.com/u/burgerga)\
**Post date:** [September 26, 2025, 11:36pm UTC](https://discuss.lexicondj.com/t/lexicon-local-api-documentation/53/8 "2025-09-26T23:36:27Z")

</div>

Working on a Python wrapper for the API 🙂

There’s an error in the GET /playlists documentation. The example response body shows the same response as GET /playlist. I.e. it shows a single playlist with track ids, rather than the nested structure and root folder.

Also I’m kind of unclear on how the sort parameters work for GET /tracks.  
The “Try it out” button tries to do “&sort=id&sort=type” but returns an error:  
{  
“message”: “‘sort’ must be an array, value: type”,  
“errorCode”: 5  
}  
I’ve tried all sorts of different ways of formatting this query and can’t get any sorting to return without error…

---

<div class="post-metadata">

**Author:** ![burgerga](https://discuss.lexicondj.com/user_avatar/discuss.lexicondj.com/burgerga/32/2655_2.png) [@burgerga](https://discuss.lexicondj.com/u/burgerga)\
**Post date:** [September 27, 2025, 1:39am UTC](https://discuss.lexicondj.com/t/lexicon-local-api-documentation/53/9 "2025-09-27T01:39:03Z")

</div>

Also found a bug in the GET /playlist API. When choosing the root folder (I believe this is always id:1) trackIds is not de-duplicated. In my library of 2564 tracks, trackIds for root is 34467 items… Any other folder seems to work okay.

---

<div class="post-metadata">

**Author:** ![burgerga](https://discuss.lexicondj.com/user_avatar/discuss.lexicondj.com/burgerga/32/2655_2.png) [@burgerga](https://discuss.lexicondj.com/u/burgerga)\
**Post date:** [September 27, 2025, 5:46pm UTC](https://discuss.lexicondj.com/t/lexicon-local-api-documentation/53/10 "2025-09-27T17:46:11Z")

</div>

Some notes on GET /playlist-by-path:

GET /playlist on the ID of a folder returns a trackIds list with all the tracks it contains, but GET /playlist-by-path on a folder returns empty trackIds.

GET /playlist-by-path requires a type parameter, the documentation seems to say this is optional (at least the dropdown gives an option for --). I get this is because there could be name overlap, but I think it would be nicer to not require a type and instead throw an error if there is a name overlap and no type?

---

<div class="post-metadata">

**Author:** ![Christiaan](https://discuss.lexicondj.com/user_avatar/discuss.lexicondj.com/christiaan/32/10_2.png) [@Christiaan](https://discuss.lexicondj.com/u/Christiaan)\
**Post date:** [September 27, 2025, 9:15pm UTC](https://discuss.lexicondj.com/t/lexicon-local-api-documentation/53/11 "2025-09-27T21:15:30Z")

</div>

Sort works like this: `sort[]=title&sort[]=artist`

I’ll look into the rest

---

<div class="post-metadata">

**Author:** ![burgerga](https://discuss.lexicondj.com/user_avatar/discuss.lexicondj.com/burgerga/32/2655_2.png) [@burgerga](https://discuss.lexicondj.com/u/burgerga)\
**Post date:** [September 28, 2025, 6:13pm UTC](https://discuss.lexicondj.com/t/lexicon-local-api-documentation/53/12 "2025-09-28T18:13:22Z")

</div>

Yeah, that’s one of the things I tried.

Using the example from the documentation and changing the url to have brackets:  
`/search/tracks?source=non-archived&filter[artist]=Daft Punk&filter[bpm]=>%3D120&fields=artist&fields=title&fields=bpm&sort[]=title&sort[]=artist`

Returns:  
{“message”:“‘sort’ must be an array, value: [object Object]”,“errorCode”:5}

---

<div class="post-metadata">

**Author:** ![burgerga](https://discuss.lexicondj.com/user_avatar/discuss.lexicondj.com/burgerga/32/2655_2.png) [@burgerga](https://discuss.lexicondj.com/u/burgerga)\
**Post date:** [January 28, 2026, 2:43am UTC](https://discuss.lexicondj.com/t/lexicon-local-api-documentation/53/13 "2026-01-28T02:43:09Z")

</div>

Hey @Christiaan, in building my python API wrapper I documented all the issues/unexpected behaviors I came across. I have a list here: [lexicon-python/docs/api-issues.md at main · PhotonicVelocity/lexicon-python · GitHub](https://github.com/PhotonicVelocity/lexicon-python/blob/main/docs/api-issues.md)

---

<div class="post-metadata">

**Author:** ![Christiaan](https://discuss.lexicondj.com/user_avatar/discuss.lexicondj.com/christiaan/32/10_2.png) [@Christiaan](https://discuss.lexicondj.com/u/Christiaan)\
**Post date:** [January 28, 2026, 8:09am UTC](https://discuss.lexicondj.com/t/lexicon-local-api-documentation/53/14 "2026-01-28T08:09:51Z")

</div>

Thanks, I will look at them 👍

---

<div class="post-metadata">

**Author:** ![Christiaan](https://discuss.lexicondj.com/user_avatar/discuss.lexicondj.com/christiaan/32/10_2.png) [@Christiaan](https://discuss.lexicondj.com/u/Christiaan)\
**Post date:** [September 18, 2026, 1:12pm UTC](https://discuss.lexicondj.com/t/lexicon-local-api-documentation/53/15 "2026-09-18T13:12:48Z")

</div>

Sorry for the long delay. I’m fixing all your found issues in the next beta update and the website docs.
