A MusicBrainz JSON Web Service Version 2 client
NodeBrainz is a thin wrapper that gives you full access to the MusicBrainz API (Version 2). This includes search, lookup and browse. It has zero dependences, consumes only JSON (no blocking XML parsing), and includes a powerful Lucene search feature.
var NB = require'nodebrainz';// Initialize NodeBrainzvar nb = userAgent:'my-awesome-app/0.0.1 ( )';
Setting a custom
defaultLimit (if not set, the
defaultLimit is 25 and
port is 80);
var nb = host:'localhost' port:8080 basePath:'/path/to/data/' defaultLimit:50;
There are eight entities:
Lookups can be preformed on any of the eight entities.
artist and include their
release-group with no filtering or subqueries
There are different subqueries you can include depending on the entities.
Check out the some of the additional subqueries. Note that the number of linked entities returned is always limited to 25, if you need the remaining results, you will have to perform a
Browse requests are a direct lookup of all the entities directly linked to another entity. For example, if you wanted to look up all the
release-groups for a particularly talented artist:
Browsed entities are always ordered alphabetically by gid. If you need to sort the entities, you will have to fetch all entities and sort them yourself. For pagination, set a
nbbrowse'release-group' artist:'e0140a67-e4d1-4f13-8a01-364355bee46e' type:'album' limit:2 offset:1console.logresponse;;
browse requests are not
searches, in order to browse all the
releases-groups for an
artist, you need to provide the
MBID for the
Provides a way to search for entities. Behind the scenes, results are provided by a search server using Lucene technology.
nbsearch'artist' artist:'tool' country:'US'console.logresponse;;
There are different search fields depending on the entity.
Search for all
releases for the
artists named pink floyd. Limited to 20 and offset by 5
nbsearch'release' artist:'pink floyd' limit:20 offset:5console.logresponse;;
Search for all the studio albums for a specific
artist (identified by their artist ID)
nbsearch'release-group' arid:'e0140a67-e4d1-4f13-8a01-364355bee46e' type:"album"console.logresponse;;
Create powerful queries using
luceneSearch. View the syntax guide
nbluceneSearch'artist'query:'artist:t??l AND -artist:"Jethro Tull"' limit: 2 offset: 1console.logresponse;;