CurseForge API
Base: https://api.curseforge.com/v1
CurseForge is the largest mod source in the Game Mods Installer and is the default provider in the mod browser. This page documents the calls the plugin makes against api.curseforge.com/v1: searching mods, reading a mod, listing its files and fetching the HTML description. All calls need a CurseForge API key in the x-api-key header. Minecraft uses gameId 432 with classId 6 for mods, Hytale uses gameId 70216 with classId 9137.
/mods/search
Search mods
Searches CurseForge for mods by keyword and returns one page of results with name, summary, authors, download count, logo and categories. This is the call behind the mod browser when CurseForge is selected.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
x-api-key
|
string | Yes | Your CurseForge API key (CURSEFORGE_API_KEY in the plugin settings). Without it the plugin returns empty results instead of an error. |
gameId
|
integer | Yes | Game ID: 432 for Minecraft, 70216 for Hytale. |
classId
|
integer | No | Content class: 6 for Minecraft mods, 9137 for Hytale mods. The plugin sets it automatically. |
searchFilter
|
string | No | Search keyword. Omitted when the search field is empty. |
sortField
|
integer | No | Sort field: 1 featured, 2 popularity, 3 last updated, 4 name, 6 total downloads. |
sortOrder
|
string | No | asc or desc. The plugin always sends desc. |
pageSize
|
integer | No | Results per page, at most 50 on the CurseForge side. Default of the plugin: 20. |
index
|
integer | No | Zero-based offset, calculated as (page minus 1) times pageSize. |
gameVersion
|
string | No | Game version filter, for example 1.20.1. Taken from the version selected in the browser. |
modLoaderType
|
integer | No | Loader filter for Minecraft: 1 Forge, 2 Cauldron, 3 LiteLoader, 4 Fabric, 5 Quilt, 6 NeoForge. |
Response Example
{"data":[{"id":238222,"gameId":432,"name":"Just Enough Items (JEI)","slug":"jei","links":{"websiteUrl":"https://www.curseforge.com/minecraft/mc-mods/jei"},"summary":"View Items and Recipes","downloadCount":195000000,"categories":[{"id":421}],"classId":9137,"authors":[{"name":"mezz"}]}],"pagination":{"index":0,"pageSize":20,"resultCount":1,"totalCount":1}}
cURL
curl -H "x-api-key: YOUR_KEY" "https://api.curseforge.com/v1/mods/search?gameId=432&classId=9137&searchFilter=jei&pageSize=5"
Internal Behavior
The result of a search is cached by the mod browser: 60 seconds when a keyword was entered, 15 minutes for the plain list. Errors such as a wrong key or a timeout are written to the panel log and the browser shows an empty list. The request timeout is MODS_REQUEST_TIMEOUT, 10 seconds by default.
/mods/{modId}
Get mod details
Returns the full record of a single mod: name, summary, download count, main file and the index of the latest files per game version.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
x-api-key
|
string | Yes | Your CurseForge API key (CURSEFORGE_API_KEY in the plugin settings). Without it the plugin returns empty results instead of an error. |
modId
|
integer | Yes | Numeric CurseForge mod ID, for example 238222. |
Response Example
{"data":{"id":238222,"name":"Just Enough Items (JEI)","slug":"jei","summary":"View Items and Recipes","downloadCount":195000000,"mainFileId":5000000,"latestFilesIndexes":[{"gameVersion":"1.20.1","fileId":5000000}]}}
cURL
curl -H "x-api-key: YOUR_KEY" "https://api.curseforge.com/v1/mods/238222"
Internal Behavior
The slug lookup is only made for CurseForge. Modrinth and Modtale already use the ID as the slug and do not need an extra request.
/mods/{modId}/files
Get mod files
Lists the files (versions) of a mod with file name, release date, supported game versions and download URL. The mod browser shows these as the installable versions.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
x-api-key
|
string | Yes | Your CurseForge API key (CURSEFORGE_API_KEY in the plugin settings). Without it the plugin returns empty results instead of an error. |
modId
|
integer | Yes | Numeric CurseForge mod ID, for example 238222. |
gameVersion
|
string | No | Filter by game version. Valid at CurseForge, but not sent by the plugin for this call. |
modLoaderType
|
integer | No | Filter by loader (1 Forge, 4 Fabric, 5 Quilt, 6 NeoForge). Valid at CurseForge, not sent by the plugin for this call. |
pageSize
|
integer | No | Number of files per page. The plugin sends 50. |
Response Example
{"data":[{"id":5000000,"displayName":"jei-1.20.1-15.2.0.27.jar","fileName":"jei-1.20.1-15.2.0.27.jar","releaseType":1,"downloadUrl":"https://edge.forgecdn.net/files/...","gameVersions":["1.20.1","Forge"],"dependencies":[]}]}
cURL
curl -H "x-api-key: YOUR_KEY" "https://api.curseforge.com/v1/mods/238222/files?gameVersion=1.20.1"
Internal Behavior
The installation then calls the same file endpoint once more to get downloadUrl and fileName and downloads the file into the mods folder.
/mods/{modId}/description
Get mod description
Returns the long description of a mod as an HTML string inside the data field.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
x-api-key
|
string | Yes | Your CurseForge API key (CURSEFORGE_API_KEY in the plugin settings). Without it the plugin returns empty results instead of an error. |
modId
|
integer | Yes | Numeric CurseForge mod ID, for example 238222. |
Response Example
{"data":"<h2>Just Enough Items</h2><p>JEI is an item and recipe viewing mod...</p>"}
cURL
curl -H "x-api-key: YOUR_KEY" "https://api.curseforge.com/v1/mods/238222/description"