# Go Packages API

> Go Packages returns Go module versions, licenses, and metadata as a workflow and API.

Go Packages looks up a Go module by its path, a pkg.go.dev link, or a familiar name. Get module returns version, license, publication date, and available root package information; it needs a module path, link, or name.

- Page: https://fous.com/tools/go-packages
- Handle: `@go-packages`
- Category: [Developer tools](https://fous.com/tools/category/developer-tools)
- Source website: https://pkg.go.dev
- Last verified: Sep 29, 2026

## Methods

### Get module

Operation `get_module`, version 1. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.

Look up a Go module by path or name. For a name, reports the module containing the top package search result. Import counts and synopses may be unavailable for modules without a root package.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `module` | string | yes | `"gin"` | Go module path, pkg.go.dev link, or familiar name, such as github.com/gin-gonic/gin or cobra. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "module"
  ],
  "properties": {
    "module": {
      "type": "string",
      "minLength": 1,
      "description": "Go module path, pkg.go.dev link, or familiar name, such as github.com/gin-gonic/gin or cobra.",
      "examples": [
        "gin",
        "cobra",
        "github.com/spf13/cobra"
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "module": "gin"
    },
    {
      "module": "cobra"
    },
    {
      "module": "github.com/spf13/cobra"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `stable` | boolean | `true` | Whether the shown version is v1 or later. |
| `license` | string or null | `"MIT"` | License shown for the module. |
| `synopsis` | string or null | `"Package gin implements a HTTP web framework called gin."` | Brief root package synopsis, if available. |
| `module_path` | string | `"github.com/gin-gonic/gin"` | Go module path matched on Go Packages. |
| `latest_version` | string or null | `"v1.12.0"` | Latest version shown for the module. |
| `published_date` | string or null | `"2026-02-28"` | Publication date of the shown version. |
| `pkg_go_dev_link` | string | `"https://pkg.go.dev/github.com/gin-gonic/gin"` | Public Go Packages page for the module. |
| `repository_link` | string or null | `"https://github.com/gin-gonic/gin"` | Repository link shown for the module. |
| `imported_by_count` | integer or null | `183243` | Number of packages known to import the root package, if available. |

**Example input**

```json
{
  "module": "gin"
}
```

**Example output**

```json
{
  "stable": true,
  "license": "MIT",
  "synopsis": "Package gin implements a HTTP web framework called gin.",
  "module_path": "github.com/gin-gonic/gin",
  "latest_version": "v1.12.0",
  "published_date": "2026-02-28",
  "pkg_go_dev_link": "https://pkg.go.dev/github.com/gin-gonic/gin",
  "repository_link": "https://github.com/gin-gonic/gin",
  "imported_by_count": 183243
}
```

## Quick start

Replace `YOUR_API_KEY` with a Fous API key. To create one, open Developers at the bottom of Fous Studio, turn on Developer mode, then go to API keys (https://app.fous.com/keys). Change the values in `input` to run the same tool on new data.

```bash
curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 180 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "api": "@go-packages",
  "visibility": "public",
  "operation": "get_module",
  "version": 1,
  "input": {
    "module": "gin"
  },
  "response": {
    "format": "json"
  }
}'
```

```python
# Save as fous.py and run with python3 fous.py. No packages needed.
import json
import urllib.error
import urllib.request

api_key = "YOUR_API_KEY"

body = json.loads("{\n  \"api\": \"@go-packages\",\n  \"visibility\": \"public\",\n  \"operation\": \"get_module\",\n  \"version\": 1,\n  \"input\": {\n    \"module\": \"gin\"\n  },\n  \"response\": {\n    \"format\": \"json\"\n  }\n}")
request = urllib.request.Request(
    "https://api.fous.com/v1/query",
    data=json.dumps(body).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {api_key}",
        "Content-Type": "application/json",
    },
    method="POST",
)
try:
    with urllib.request.urlopen(request, timeout=180) as response:
        result = json.load(response)
except urllib.error.HTTPError as error:
    raise RuntimeError(f"HTTP {error.code}: {error.read().decode('utf-8', errors='replace')}") from error
if result.get("success") is False:
    raise RuntimeError(result.get("error", {}).get("message", "Request failed"))
print(json.dumps(result["data"]["output"], indent=2))
```

```typescript
// Save as fous.mts and run with npx tsx fous.mts.
const apiKey = "YOUR_API_KEY";

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(180_000),
  body: JSON.stringify({
  "api": "@go-packages",
  "visibility": "public",
  "operation": "get_module",
  "version": 1,
  "input": {
    "module": "gin"
  },
  "response": {
    "format": "json"
  }
}),
});
type ApiResult = { success: boolean; data?: { output: unknown }; error?: { message: string } };
const result: ApiResult = await response.json();
if (!response.ok || result.success === false) {
  throw new Error(result.error?.message ?? `HTTP ${response.status}`);
}
if (!result.data) throw new Error("Missing API response data");
console.log(result.data.output);
```

## Use from an AI assistant

Connect this tool to Claude Code, Claude Desktop, Cursor, VS Code, Codex and any MCP client as its own MCP server. Each method is a typed tool whose arguments are the method’s input.

- Server URL: `https://api.fous.com/mcp/tools/go-packages`
- Authorization: `Authorization: Bearer <Fous API key>`

**Tools**

- `get_module`: Get module. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.
- `fous_get_run`: the result of a run that was still going, by its `request_id`. Free.

Claude Code:

```bash
claude mcp add --scope user --transport http fous-go-packages https://api.fous.com/mcp/tools/go-packages --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"
```

To give the assistant every tool, connect `https://api.fous.com/mcp`: it finds one with `fous_search_tools` and runs it with `fous_run_tool`. Setup for other clients: https://fous.com/llms-full.txt.

## Use cases

- Check a module’s latest shown version and license
- Find a module’s repository link
- Review a module’s publication date
- Check how many packages import a root package
- Look up a module from a familiar name

## FAQ

### Can I run it with my own inputs?

Yes. Change the inputs in Studio and press Run, or send new inputs from your code, or ask a connected AI assistant.

### Can I call this Go Packages tool as an API?

Yes. Send a POST request to /v1/query with your Fous API key and the inputs, and get JSON back.

### How much does it cost?

Each completed run costs 1 credit. Failed runs without a completed receipt are free; completed work can remain charged if delivery is interrupted. With pay as you go, a credit costs 1¢. Monthly plans cost less per credit.

### Do I need a Go Packages account?

No. You only need a Fous account.

### How current is the data?

Fous gets the data from pkg.go.dev when you run it. Some results are reused for up to 24 hours, and results that use your account or key are never reused. It was last verified on Sep 29, 2026.

### What is the latest version shown for a module?

Get module returns the latest version shown for the matched module.

### What license does a module show?

Get module returns the license shown for the module.

### How many packages import a module’s root package?

Get module returns the known importer count when available.

## Related

- [NuGet API](https://fous.com/tools/nuget.md): The .NET package gallery for discovering and sharing packages.
- [npm API](https://fous.com/tools/npm.md): npm provides package details, search results and latest versions, plus weekly download and publish data; daily and historical download counts may lag by a day or more.
- [GitHub API](https://fous.com/tools/github.md): GitHub returns public repository matches and details, up to 25 trending projects, issues, pull requests, and newest-first published releases; release or commit dates may be unavailable.
- [crates.io API](https://fous.com/tools/crates-io.md): crates.io is the Rust community package registry, returning current crate details and recent releases or up to 100 keyword-matched crates with version, download, and update information.
- [PyPI API](https://fous.com/tools/pypi.md): PyPI provides package metadata, links, and current/latest plus 10 recent versions; release dates reflect first file uploads, and keyword searches return up to 100 packages.
- [RubyGems API](https://fous.com/tools/rubygems.md): Discover and share Ruby gems.
- [VS Code Marketplace API](https://fous.com/tools/vs-code-marketplace.md): Public listings for Visual Studio Code extensions.
- [Maven Central API](https://fous.com/tools/maven-central.md): Find Java libraries, releases, and dependency coordinates on Maven Central.
- [All Developer tools tools](https://fous.com/tools/category/developer-tools)
