# Modrinth API

> Minecraft mods, modpacks, shaders and resource packs: projects, versions, users and categories.

Category: Sports & Gaming. Region: Global. 9 endpoints at `https://api.hoshime.com/v1/modrinth/<endpoint>`, `GET` with query parameters, answering `{data, meta}` (see https://hoshime.com/docs/responses.md). Reference: https://hoshime.com/docs/platforms/modrinth
## GET /v1/modrinth/search

Search Modrinth projects by text, optionally by project type. Pages with cursor.

Scope: `social:read` · Units: 1 · Cached: 10 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `query` | string | no | Text to search for, such as sodium. (e.g. sodium) |
| `projectType` | string | no | Project type. Omit it for all. (one of mod, modpack, resourcepack, shader, plugin, datapack) |
| `limit` | integer | no | Projects per page, from 1 to 100. (default 10; e.g. 2) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `author` (string), `categories` (Label[]), `categories[].name` (string), `description` (string), `downloads` (integer (int64)), `followers` (integer (int64)), `iconUrl` (string), `id` (string), `projectType` (string), `slug` (string), `title` (string), `updatedAt` (string)

```bash
curl "https://api.hoshime.com/v1/modrinth/search?query=sodium&limit=2" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/modrinth/project

One Modrinth project by id or slug: its downloads, loaders, game versions and links.

Scope: `social:read` · Units: 1 · Cached: 30 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | Project id or slug, such as AANobbMI or sodium. (e.g. sodium) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `categories` (Label[]), `categories[].name` (string), `clientSide` (string), `description` (string), `downloads` (integer (int64)), `followers` (integer (int64)), `gameVersions` (Label[]), `gameVersions[].name` (string), `iconUrl` (string), `id` (string), `issuesUrl` (string), `license` (string), `loaders` (Label[]), `loaders[].name` (string), `projectType` (string), `publishedAt` (string), `serverSide` (string), `slug` (string), `sourceUrl` (string), `title` (string), `updatedAt` (string)

```bash
curl "https://api.hoshime.com/v1/modrinth/project?id=sodium" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/modrinth/projectVersions

The versions of a Modrinth project, newest first, with their loaders and Minecraft versions.

Scope: `social:read` · Units: 1 · Cached: 10 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | Project id or slug, such as sodium. (e.g. sodium) |
| `limit` | integer | no | Number of versions, from 1 to 100. (default 20) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `downloads` (integer (int64)), `gameVersions` (Label[]), `gameVersions[].name` (string), `id` (string), `loaders` (Label[]), `loaders[].name` (string), `name` (string), `number` (string), `projectId` (string), `publishedAt` (string)

```bash
curl "https://api.hoshime.com/v1/modrinth/projectVersions?id=sodium" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/modrinth/version

One Modrinth version by id: its changelog, loaders, game versions and downloadable files.

Scope: `social:read` · Units: 1 · Cached: 60 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | Version id, such as g6ju16VJ. (e.g. g6ju16VJ) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `changelog` (string), `downloads` (integer (int64)), `files` (VersionFile[]), `files[].filename` (string), `files[].primary` (boolean), `files[].size` (integer (int64)), `files[].url` (string), `gameVersions` (Label[]), `gameVersions[].name` (string), `id` (string), `loaders` (Label[]), `loaders[].name` (string), `name` (string), `number` (string), `projectId` (string), `publishedAt` (string)

```bash
curl "https://api.hoshime.com/v1/modrinth/version?id=g6ju16VJ" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/modrinth/user

A Modrinth user by username: display name, bio, role and when the account was made.

Scope: `social:read` · Units: 1 · Cached: 60 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `username` | string | yes | Modrinth username or user id. (e.g. Modrinth) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `avatar` (string), `bio` (string), `createdAt` (string), `id` (string), `name` (string), `role` (string), `username` (string)

```bash
curl "https://api.hoshime.com/v1/modrinth/user?username=Modrinth" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/modrinth/projectsByIds

Up to 20 Modrinth projects by id or slug in one call.

Scope: `social:read` · Units: 1 · Cached: 10 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `ids` | string | yes | Comma-separated project ids or slugs, 20 at most. (e.g. AANobbMI,P7dR8mSH) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `categories` (Label[]), `categories[].name` (string), `description` (string), `downloads` (integer (int64)), `followers` (integer (int64)), `id` (string), `projectType` (string), `slug` (string), `title` (string)

```bash
curl "https://api.hoshime.com/v1/modrinth/projectsByIds?ids=AANobbMI%2CP7dR8mSH" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/modrinth/categories

The Modrinth categories, such as adventure or optimization, with the project types each applies to.

Scope: `social:read` · Units: 1 · Cached: 1440 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `kind` (string), `name` (string), `projectTypes` (Label[]), `projectTypes[].name` (string)

```bash
curl "https://api.hoshime.com/v1/modrinth/categories" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/modrinth/loaders

The Modrinth mod loaders, such as fabric, forge or quilt, with the project types each supports.

Scope: `social:read` · Units: 1 · Cached: 1440 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `kind` (string), `name` (string), `projectTypes` (Label[]), `projectTypes[].name` (string)

```bash
curl "https://api.hoshime.com/v1/modrinth/loaders" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/modrinth/statistics

Modrinth's totals: how many projects, versions, authors and files it hosts.

Scope: `social:read` · Units: 1 · Cached: 60 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `authors` (integer (int64)), `files` (integer (int64)), `projects` (integer (int64)), `versions` (integer (int64))

```bash
curl "https://api.hoshime.com/v1/modrinth/statistics" -H "Authorization: Bearer $HOSHIME_TOKEN"
```
