Skip to main content
POST
/
api
/
golang
/
packages
/golang/packages
curl --request POST \
  --url https://api.anysite.io/api/golang/packages \
  --header 'Content-Type: application/json' \
  --header 'access-token: <api-key>' \
  --data '
{
  "package": "<string>",
  "timeout": 300,
  "version": "<string>"
}
'
[
  {
    "import_path": "<string>",
    "@type": "GolangPackage",
    "module_path": "",
    "name": "",
    "description": "<string>",
    "version": "",
    "published_at": 123,
    "license": "<string>",
    "repository_url": "<string>",
    "imports_count": 123,
    "imported_by_count": 123,
    "go_version": "<string>",
    "commit_hash": "<string>",
    "vcs_ref": "<string>",
    "dependencies": [],
    "is_redistributable": false,
    "has_valid_go_mod": false,
    "is_tagged_version": false,
    "has_stable_version": false,
    "web_url": ""
  }
]

Authorizations

access-token
string
header
required

API token from the dashboard

Headers

access-token
string
required

Body

application/json
package
string
required

Go import path (e.g. 'github.com/gin-gonic/gin', 'golang.org/x/net') or a pkg.go.dev URL

Minimum string length: 1
Examples:

"github.com/gin-gonic/gin"

"golang.org/x/net"

"https://pkg.go.dev/github.com/gin-gonic/gin"

timeout
integer
default:300

Max scrapping execution timeout (in seconds)

Required range: 20 <= x <= 1500
version
string | null

Specific module version (e.g. 'v1.10.0'); latest by default

Response

Successful Response

import_path
string
required
@type
string
default:GolangPackage
module_path
string
default:""
name
string
default:""
description
string | null
version
string
default:""
published_at
integer | null
license
string | null
repository_url
string | null
imports_count
integer | null
imported_by_count
integer | null
go_version
string | null
commit_hash
string | null
vcs_ref
string | null
dependencies
object[]
is_redistributable
boolean
default:false
has_valid_go_mod
boolean
default:false
is_tagged_version
boolean
default:false
has_stable_version
boolean
default:false
web_url
string
default:""