Skip to content

Instantly share code, notes, and snippets.

@crapStone
Last active June 12, 2023 10:14
Show Gist options
  • Star 40 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save crapStone/9a423f7e97e64a301e88a2f6a0f3e4d9 to your computer and use it in GitHub Desktop.
Save crapStone/9a423f7e97e64a301e88a2f6a0f3e4d9 to your computer and use it in GitHub Desktop.

Curse API

⚠️ This is the old API and may not work

@MDReal32
Copy link

Thanks For that api doc.

@ryankhart
Copy link

Wow, this is amazing! I didn't know an API like this existed. I searched all over Curseforge's website and couldn't find anything. I noticed that MuliMC implemented a Curseforge search feature, so that told me that this was somehow possible. It just took me several hours combing through their source code to find a URL like those above. Then, a simple Google search away brought me here.

Thank you so much for compiling this here. I'm going to have some fun developing my own tools for deciding which Minecraft modpack to play, and maybe it'll be good enough for the public to try it out sometime.

@Coloradohusky
Copy link

Coloradohusky commented Jul 2, 2021

For some reason, some files aren't showing up (this shows that there are files https://www.curseforge.com/terraria/maps/builders-workshop/files, but https://addons-ecs.forgesvc.net/api/v2/addon/30800/files doesn't show any files), I know it's not Minecraft, but I'll see if there are any Minecraft ones that don't work
Edit: WorldEdit for Bukkit doesn't work (https://www.curseforge.com/minecraft/bukkit-plugins/worldedit/files, https://addons-ecs.forgesvc.net/api/v2/addon/31043/files)

@crapStone
Copy link
Author

I think Minecraft mods are a special case. The files are empty even with texture packs (https://www.curseforge.com/minecraft/mc-addons/f8thful-bedrock/files, https://addons-ecs.forgesvc.net/api/v2/addon/383141/files).
If you look at https://addons-ecs.forgesvc.net/api/v2/addon/30800 latestFiles and gameVersionLatestFiles are both empty and here https://addons-ecs.forgesvc.net/api/v2/addon/238222 they are filled. It's the same with every other "non minecraft mod" addon I checked.

@datemike972
Copy link

Is there any api to get Spigot/Bukkit/Paper server versions?

@Nice-Hosting
Copy link

Is there any api to get Spigot/Bukkit/Paper server versions?

https://serverjars.com/

@Nice-Hosting
Copy link

It seems there is no official documentation for the CurseForge API - I did some testing to find more sections.

Tested from sectionId 0 to 5000. Results:

sectionId Content
6 Mods
12 Resource packs
17 Worlds
4471 Modpacks

Usage: (X = sectionId)
Get content: addons-ecs.forgesvc.net/api/v2/addon/search?gameId=432&index=0&pageSize=25&sectionId=X
Get categories: addons-ecs.forgesvc.net/api/v2/category/section/X

@MasterGordon
Copy link

If you wannt to filter search by modLoader (Fabric or Forge) you need to add the parameter modLoaderType

modLoaderType modLoader
1 Forge
4 Fabric

@ShayBox
Copy link

ShayBox commented Jan 10, 2022

There used to be a nice doc page for this but they removed it

@datemike972
Copy link

Hi!
Thanks for the previous help - How can I get the Curseforge map list?

@HellBz
Copy link

HellBz commented Jan 13, 2022

Is Just in Developing, collecting all Server-Jars on one place

http://api.hellbz.de/tests/mc/?get=purpur

Next is Sponge-Vanilla and Sponge-Forge and Magma-MC

And yes ServerJars API work also good..
https://serverjars.com/documentation

@datemike972
Please have a look at the New Curseforge API,
because the "addons-ecs.forgesvc.net/api/v2/" is working very slow last Days...
( There you found the Old Curse-API https://curseapidoc.docs.apiary.io/ )

https://docs.curseforge.com/

@Alzarath
Copy link

response headers -> ETag = MD5 of file

This does not always seem to be the case. It mostly is, but larger files seem to give differing results. I've started fetching the md5 using the individual file json (from e.g. https://addons-ecs.forgesvc.net/api/v2/addon/228404/file/2683366) hashes entry (md5 = algorithm 2).

@ShayBox
Copy link

ShayBox commented Jan 14, 2022

Don't use the new Curseforge API if you need full mod support, the new api allows developers to opt-out of their mods being downloaded, because curseforge doesn't monetize downloads through the new api, only the old api, additionally, using the old api will help developers out.

@quat1024
Copy link

quat1024 commented Jan 26, 2022

If you POST directly to https://addons-ecs.forgesvc.net/api/v2/addon/ where the request body is a JSON-formatted array of project IDs (e.g. [228525,452344,238222]), you will receive a JSON array of information for each of those project IDs. Careful, it can be pretty big.

If you have a lot of mods to request information for, that's the way to do it, you can get them all in one request.

@MDReal32
Copy link

MDReal32 commented Feb 7, 2022

Guys. Forgot about addons-ecs.forgesvc.net. Overwolf made a well documented and similar but good api system. Overwolf Curseforge API

@ShayBox
Copy link

ShayBox commented Feb 7, 2022

That's not a new api, it's just newly rebranded, doesn't support everything forgesvc does and also doesn't count towards downloads/rewards for mod creators, only forgesvc does because it's used by the launcher.

@Blasto33
Copy link

Thanks for the documentation, it helped me so much!

Copy link

ghost commented Mar 15, 2022

How do I convert a slug to an ID for use in the API?

@Miniontoby
Copy link

It seems they have protected the api, since it now gives a 403 error.

Copy link

ghost commented May 17, 2022

It seems they have protected the api, since it now gives a 403 error.

Great /s! Now almost every single app not made by Curse will error when trying to download mods/modpacks from CurseForge.

@Nice-Hosting
Copy link

Great! Now almost every single app not made by Curse will error when trying to download mods/modpacks from CurseForge. /s

Can confirm...

@Miniontoby
Copy link

Miniontoby commented May 17, 2022 via email

@Nice-Hosting
Copy link

Nice-Hosting commented May 17, 2022

Switching to the new API is not too difficult - most of the structure and fields are the same.
The new API requires an API-key - this is fine, however, I am not able to find any information about rate-limiting. Fingers crossed it's not too restrictive.

Anyone know why they've restricted access to classId 5? It is not returning any data.. (Bukkit plugins)

@AnzhiZhang
Copy link

AnzhiZhang commented Jun 24, 2022

When I use API today, I got a 503 error, is it means this API will no longer provides or just a temporary error?

@MDReal32
Copy link

When I use API today, I got a 503 error, is it means this API will no longer provides or just a temporary error?

use new api. Curse Forge new API Docs

@AnzhiZhang
Copy link

use new api. Curse Forge new API Docs

The offical API requires register and provides API key, is there any third-party API does not requires API key?

@Artiesy
Copy link

Artiesy commented Jul 31, 2022

is there any third-party API does not requires API key?

Unfortunately no. You must mail to curseforge developers to get key. You can't use given API Key from your profile in Core.

@MDReal32
Copy link

MDReal32 commented Jul 31, 2022

use new api. Curse Forge new API Docs

The offical API requires register and provides API key, is there any third-party API does not requires API key?

I registered and get API key easyly. Dont worry about it.

@Miniontoby
Copy link

Miniontoby commented Jul 31, 2022 via email

@KorewaLidesu
Copy link

KorewaLidesu commented Aug 22, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment