# Go Module Proxy API

> Returns Go module versions, publish info, go.mod files and recently indexed module versions from the Go module proxy.

Category: Developer & Tech. Region: global. 5 endpoints at `https://api.hoshime.com/v1/goproxy/<endpoint>`, `GET` with query parameters, answering `{data, meta}` (see https://hoshime.com/docs/responses.md). Reference: https://hoshime.com/docs/platforms/goproxy
## GET /v1/goproxy/latest

The latest version of a Go module on the module proxy.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `module` | string | yes | Module path, such as golang.org/x/net. (e.g. golang.org/x/net) |
| `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: `commit` (string), `module` (string), `publishedAt` (string), `version` (string)

```bash
curl "https://api.hoshime.com/v1/goproxy/latest?module=golang.org%2Fx%2Fnet" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/goproxy/versions

Every published version of a Go module, as the module proxy lists them.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `module` | string | yes | Module path, such as golang.org/x/net. (e.g. golang.org/x/net) |
| `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: `version` (string)

```bash
curl "https://api.hoshime.com/v1/goproxy/versions?module=golang.org%2Fx%2Fnet" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/goproxy/info

The publish time and source commit of one Go module version.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `module` | string | yes | Module path, such as golang.org/x/net. (e.g. golang.org/x/net) |
| `version` | string | yes | Version, such as v0.38.0. (e.g. v0.38.0) |
| `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: `commit` (string), `module` (string), `publishedAt` (string), `version` (string)

```bash
curl "https://api.hoshime.com/v1/goproxy/info?module=golang.org%2Fx%2Fnet&version=v0.38.0" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/goproxy/mod

The go.mod file of one module version: its Go version and requirements.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `module` | string | yes | Module path, such as golang.org/x/net. (e.g. golang.org/x/net) |
| `version` | string | yes | Version, such as v0.38.0. (e.g. v0.38.0) |
| `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: `goVersion` (string), `module` (string), `requires` (Requirement[]), `requires[].indirect` (boolean), `requires[].path` (string), `requires[].version` (string), `version` (string)

```bash
curl "https://api.hoshime.com/v1/goproxy/mod?module=golang.org%2Fx%2Fnet&version=v0.38.0" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/goproxy/recent

Module versions the Go module index received after a time, oldest first. Page with cursor.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `limit` | integer | no | Items per page, 1 to 500. (default 100) |
| `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: `indexedAt` (string), `module` (string), `version` (string)

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