# Curseforge — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Search and explore CurseForge game mods and projects, retrieve detailed information about specific mods, access file listings and versions, and track dependencies between projects. Find mods across different games and categories to discover exactly what you need for your gaming setup.

**Category:** Developer Tools | **Website:** [curseforge.com/](https://curseforge.com/) | **Docs:** [parse.bot/marketplace/c9438ed3-2957-4d16-acdd-fdbdc239f4ba/curseforge-com-api](https://parse.bot/marketplace/c9438ed3-2957-4d16-acdd-fdbdc239f4ba/curseforge-com-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-curseforge-com-api-c9438ed3/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_categories

List all available categories for a game/class combination. Category slugs can be used as the category filter in search_projects.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `class` | string | No | Project class slug. |
| `game` | string | No | Game slug. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-curseforge-com-api-c9438ed3/get_categories \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"class":"<string>","game":"<string>"}'
```

### get_files_by_ids

Retrieve file details for specific file IDs within a project. Makes one request per file ID to fetch name, type, size, date, version, loader, downloads, and download URL. Returns partial results when some IDs are valid and others are not (404 entries include an error field). File IDs are available from get_project_files results URLs.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `class` | string | Yes | Project class slug (e.g., mc-mods). |
| `file_ids` | string | Yes | Comma-separated list of numeric file IDs (e.g., '8583564,8583563'). File IDs are found in get_project_files result URLs. |
| `game` | string | Yes | Game slug (e.g., minecraft). |
| `slug` | string | Yes | Project slug from search_projects results (e.g., jei). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-curseforge-com-api-c9438ed3/get_files_by_ids \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"class":"<string>","file_ids":"<string>","game":"<string>","slug":"<string>"}'
```

### get_project_details

Retrieve full details for a specific project including description HTML, categories, game versions, and mod loaders. Requires game, class, and slug which are available from search_projects results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `class` | string | Yes | Project class slug (e.g., mc-mods). |
| `game` | string | Yes | Game slug (e.g., minecraft). |
| `slug` | string | Yes | Project slug from search_projects results (e.g., jei, geckolib). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-curseforge-com-api-c9438ed3/get_project_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"class":"<string>","game":"<string>","slug":"<string>"}'
```

### get_project_files

Retrieve all downloadable files for a project with version, loader, size, date, and download count. Returns the most recent page of files (up to 20). An optional name filter narrows results client-side to files whose name contains the keyword (case-insensitive).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `class` | string | Yes | Project class slug (e.g., mc-mods). |
| `filter` | string | No | Case-insensitive keyword to filter files by name (e.g., 'server pack', 'Forge', 'Fabric'). Only files whose name contains this keyword are returned. |
| `game` | string | Yes | Game slug (e.g., minecraft). |
| `slug` | string | Yes | Project slug from search_projects results (e.g., jei). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-curseforge-com-api-c9438ed3/get_project_files \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"class":"<string>","filter":"<string>","game":"<string>","slug":"<string>"}'
```

### get_project_relations

Get project relations - dependencies (mods this project requires) or dependents (mods that require this project). Returns up to 20 results per page. Some projects may have no dependencies.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `class` | string | Yes | Project class slug (e.g., mc-mods). |
| `game` | string | Yes | Game slug (e.g., minecraft). |
| `relation_type` | string | No | Type of relations to retrieve. |
| `slug` | string | Yes | Project slug from search_projects results (e.g., geckolib, jei). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-curseforge-com-api-c9438ed3/get_project_relations \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"class":"<string>","game":"<string>","relation_type":"<string>","slug":"<string>"}'
```

### list_games

List all games supported on CurseForge with their mod counts and total download stats. Returns all games in a single page. Each game has a slug usable as input to other endpoints.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-curseforge-com-api-c9438ed3/list_games \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### search_projects

Search for projects within a game and class (e.g., mc-mods, modpacks, texture-packs). Returns up to 20 results per page. Results include the game and class_slug context for navigating to detail/files/relations endpoints.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category` | string | No | Category slug filter from get_categories (e.g., magic, technology, storage). |
| `class` | string | No | Project class slug (e.g., mc-mods, modpacks, texture-packs, bukkit-plugins). |
| `game` | string | No | Game slug from list_games (e.g., minecraft, wow, sims4). |
| `page` | integer | No | Page number for pagination. |
| `query` | string | No | Search query keyword. |
| `sort_by` | string | No | Sort order for results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-curseforge-com-api-c9438ed3/search_projects \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"category":"<string>","class":"<string>","game":"<string>","page":"<integer>","query":"<string>","sort_by":"<string>"}'
```
