discogs-dataset-genres-styles
v1.9.0
Published
A list of genres and styles extracted from the official Discogs Data Dump that's published monthly as a dataset.
Maintainers
Readme
discogs-dataset-genres-styles

A list of genres and styles extracted from the official Discogs Data Dump that's published monthly as a dataset.
Overview
The Discogs API doesn't provide endpoints for retrieving genres and styles used across the Discogs database.
Developers that need the complete dataset must parse the data dump themselves or resort to scraping.
This repository automates downloading the latest monthly Discogs Data Dump for releases, extracting every unique genre and style, and publishing the updates in standardized machine-readable data exchange formats:
- CSV:
dist/genres.csv,dist/styles.csv - JSON:
dist/genres.json,dist/styles.json - XML:
dist/genres.xml,dist/styles.xml
The derived dataset is made available as a tiny, tree-shakable NPM package with ESM, CommonJS, and TypeScript support out of the box.
Installation
NPM:
$ npm install discogs-dataset-genres-stylesUsage
// ESM
import { genres, styles } from 'discogs-dataset-genres-styles';
// CommonJS
const { genres, styles } = require('discogs-dataset-genres-styles');
console.log(genres); // ["Electronic", "Rock", "Jazz", ...]
console.log(styles); // ["House", "Techno", "Alternative Rock", ...]Examples
HTMX
Server-side (Express):
import { genres } from 'discogs-dataset-genres-styles';
app.get('/genres', (req, res) => {
const html = genres.map(genre => `<option>${genre}</option>`).join('');
res.send(html);
});Client-side:
<select hx-get="/genres" hx-trigger="load"></select>React
import { genres } from 'discogs-dataset-genres-styles';
function GenreSelect({ value, onChange }) {
return (
<select value={value} onChange={e => onChange(e.target.value)}>
{genres.map(genre => <option key={genre}>{genre}</option>)}
</select>
);
}Vue
<script setup>
import { genres } from 'discogs-dataset-genres-styles';
</script>
<template>
<select>
<option v-for="genre in genres" :key="genre">{{ genre }}</option>
</select>
</template>Last Updated
This repository is up to date with the Discogs Data Dump last published:
License
Licensed under MIT License, see LICENSE for details.
Copyright (c) 2025-present hasteful
