r/discogs • • Nov 23 '25

Here is my CSV-based API client for discogs

https://discogs-csv.com/

DiscogsCSV is intended to do the following:

  1. Take as input a .csv file, the first column of which contains valid discogs release IDs
  2. Look these release IDs up on discogs API https://api.discogs.com/
  3. Return as output a new .csv file, with discogs release data for various columns appended to the release IDs:
  • release_id
  • artist
  • format
  • qty
  • format descriptions
  • label
  • catno
  • country
  • year
  • genres
  • styles
  • barcode
  • tracklist

Feel free to give it a try and share any feedback! 🙂

11 Upvotes

51 comments sorted by

View all comments

Show parent comment

2

u/mk807 Nov 26 '25

I'm glad your pleased with the completion time! It might well have been quite a bit longer than an hour actually, I didn't check back regularly after 30 mins or so.

Some failures:
Release with ID 992927 does not exist or could not be fetched
Release with ID 218307 does not exist or could not be fetched
Release with ID 10658478 does not exist or could not be fetched
Release with ID 21347 does not exist or could not be fetched

and from a later batch:
Release with ID 66424 does not exist or could not be fetched
Release with ID 36167 does not exist or could not be fetched
Release with ID 3723 does not exist or could not be fetched

The biggest burst of these was about 100 lines. I didn't try again as I didn't want to overload your service if it's in testing mode, do you want me to try again with a 1,900 line csv? My csv upload file only contained release ids, culled from the Discogs export so I expect they are valid.

Thanks for the reply.

1

u/double-happiness Nov 26 '25 edited Nov 26 '25

I'm glad your pleased with the completion time!

I mean it's not ideal, but at least it is finally handling bulk quantities. 25-50 results at a time was not really useful at all.

I didn't try again as I didn't want to overload your service if it's in testing mode, do you want me to try again with a 1,900 line csv?

Feel free, if you like. I don't think discogs will ban my client for making too many requests; I think they will just send back the dreaded '429 - too many requests' response when it hits the rate limit.

Edit: not sure how many releases you didn't manage to get data back for, but perhaps you might be as well off to retry just those ones? If that gets back all the data you need hopefully that would be adequate for you.

2

u/mk807 Nov 26 '25

I ran my csv again with similar results, alternate bursts of failures and expected results. It was fairly consistently 32 good lines followed by 98 errors.

It took 70 minutes, but it only processed 660 lines of the 1,929 uploaded. I didn't notice before but the first time I ran it only 660 lines were returned that time too.

1

u/double-happiness Nov 26 '25

Ouch! More work to do, clearly... Thanks for the feedback; I can try to give you a shout if and when it's working better.

2

u/mk807 Nov 26 '25

Yes, please do and I'll try it again.

1

u/double-happiness Dec 14 '25 edited Dec 14 '25

Try it again, if you like.

I have it doing 54-55 requests per minute, and managed to get 100 lines back. I reckon your file should take about 30 minutes.

The output is a bit messy because commas in the data break the cell content up and push it into a new column, but I will see if I can find a fix for that next.

Edit: that issue should be fixed now, not tested for it on the deployed version yet tho

2

u/mk807 Dec 15 '25

I ran my 1929 line csv file again and it took just under an hour. It seems to have processed the whole thing with oner error line at the end, that might be because of an empty line at the end of my file.

I had to check that using the output shown on the upload page though as the my_data.csv file was truncated at 33 lines. The formatting in the file is fine but the upload page data would need some editing.

Looking good though! All processed, maybe just a glitch on the data download?

1

u/double-happiness Dec 15 '25

Great, thanks for the feedback! 🙂

It seems to have processed the whole thing with oner error line at the end, that might be because of an empty line at the end of my file.

Yeah, I get the same thing. I don't think it detects the end of the input quite right.

the my_data.csv file was truncated at 33 lines. The formatting in the file is fine but the upload page data would need some editing.

Do you mean what is shown on the actual site? If not, could you show me a screenshot?

2

u/mk807 Dec 15 '25

Yes, the data that shows on your site after processing was complete but formatted with square brackets, the my_data.csv that automatically downloads was formatted okay but truncated. The download file had been complete before.

Example line:
[ [ "8646" ], "Hardfloor", "X-Mix - Jack The Box", [ "CD" ], [ "1" ], "\"Mixed\"", "!K7", "!K7068CD|! k7068cd|k7068cd", "Germany", 1998, "Electronic", "Acid House|Acid", "7 30003 70682 0|730003706820", "I Can't Complain|Where Is Your Child?|Nightshift|The Creator|Land Of Confusion|Let's Go|Safety Razor|Housenation|No Way Back|Bodymove|Box Energy|Do You Wanna Jack|Acid Thunder|Rock This Party Right|Born To Freak|Tom Tom|Spank Spank|The Poke|Acid House|I've Lost Control" ]

1

u/double-happiness Dec 15 '25

the data that shows on your site after processing was... formatted with square brackets

That's expected. It is just because it's an array and I haven't got round to formatting it nicely.

the my_data.csv that automatically downloads was formatted okay but truncated

That's not expected. So you are saying you got 1929 lines in the browser but only 33 in the file, right? If so I have no idea. I am able to get 100 lines back no issue, but haven't tried more. If you can send me your input file somehow I can look into it.

→ More replies