Query original release (album) based on artist and track names

musicbrainz
webservice
album
query
Tags: #<Tag:0x00007fe3db1a27e8> #<Tag:0x00007fe3db1a26a8> #<Tag:0x00007fe3db1a2568> #<Tag:0x00007fe3db1a2428>

#1

Hey there!

I’m trying to find the original album i.e. first release that contains a track that’s been specified by title and artist.

What I’ve come up with so far is:

https://musicbrainz.org/ws/2/recording?query=born+to+die%20AND%20artist:lana+del+rey&fmt=json

Unfortunately this gives me gives me a lot of results including compilations and singles.
How do I narrow this down so that it only shows albums? And on top of that how do I sort these results to get the oldest release as first result?