---
title: "Go Modules API: Module versions | Perceptlayer"
description: "Tagged versions of a Go module from the Go module mirror, highest first, with publish dates and retractions."
url: https://perceptlayer.com/apis/go-modules/module-versions
---

[APIs](https://perceptlayer.com/apis) / [Go Modules](https://perceptlayer.com/apis/go-modules) / Module versions

# Go Modules: Module versions

Tagged versions of a Go module from the Go module mirror, highest first, with publish dates and retractions.

GET `/v1/go-modules/module-versions`

## Parameters

Send parameters in the query string.

| Parameter | Type | Required | Allowed values |
| --- | --- | --- | --- |
| `module` | string | Required | Up to 300 characters Module path, for example github.com/gin-gonic/gin. Major versions 2+ are separate modules (…/v2). |
| `prerelease` | boolean | Optional | Any false to leave out pre-release versions. Default true. |
| `page` | integer | Optional | Any Results page, from 1. |
| `per_page` | integer | Optional | Any Versions per page, 1 to 100. Default 20. |

## Example request

Go Modules

GET /v1/go-modules/module-versions?module=github.com%2Fgin-gonic%2Fgin&per\_page=10 

```
{
  "success": true,
  "data": {
    "module": "github.com/gin-gonic/gin",
    "total": 28,
    "page": 1,
    "has_more": true,
    "count": 10,
    "items": [
      {
        "version": "v1.12.0",
        "published_at": "2026-02-28T10:10:09Z",
        "retracted": false,
        "url": "https://pkg.go.dev/github.com/gin-gonic/gin@v1.12.0"
      },
      {
        "version": "v1.11.0",
        "published_at": "2025-09-20T11:38:42Z",
        "retracted": false,
        "url": "https://pkg.go.dev/github.com/gin-gonic/gin@v1.11.0"
      },
      {
        "version": "v1.10.1",
        "published_at": "2025-05-20T09:33:47Z",
        "retracted": false,
        "url": "https://pkg.go.dev/github.com/gin-gonic/gin@v1.10.1"
      }
    ]
  },
  "meta": {
    "request_id": "req_e2f1f956c7344169b5e3a67d650a9fda",
    "credits_charged": 1,
    "credits_remaining": 458
  }
}
```

200 OK JSON X-Credits-Used: 1

Recorded from our API and shortened.

[Run this endpoint in the playground](https://perceptlayer.com/apis/go-modules?try=module-versions#playground) with your own parameters. 1 credit per successful call; failed calls are free.

## Response fields

Each item in `data.items` has these 4 fields, read from a recorded call. The recording leaves out fields that were empty, so a live call can return more.

| Field | Type |
| --- | --- |
| `version` | string |
| `published_at` | string |
| `retracted` | boolean |
| `url` | url |
