Go2.gg — Edge-Native URL Shortener
URL shortening, analytics, QR codes, webhooks, galleries (link-in-bio). Built on Cloudflare's edge network with sub-10ms redirects globally.
Setup
Get API key from: https://go2.gg/dashboard/api-keys (free, no credit card required)
CODEBLOCK0
API base: https://api.go2.gg/api/v1
Auth: Authorization: Bearer $GO2GG_API_KEY
Docs: https://go2.gg/docs/api/links
Short Links
Create, manage, and track short links with custom slugs, tags, expiration, passwords, and geo/device targeting.
Create a Link
CODEBLOCK1
Important: Field is destinationUrl (not url). Slug is optional (auto-generated if omitted).
Response
CODEBLOCK2
List Links
CODEBLOCK3
Query params: page, perPage (max 100), search, domain, tag, archived, sort (created/clicks/updated)
Update a Link
CODEBLOCK4
Delete a Link
CODEBLOCK5
Link Analytics
CODEBLOCK6
Returns: totalClicks, byCountry, byDevice, byBrowser, byReferrer, INLINECODE16
Advanced Link Options
CODEBLOCK7
Create Link Parameters
| Field | Type | Required | Description |
|---|
| destinationUrl | string | yes | Target URL to redirect to |
| slug |
string | no | Custom slug (auto-generated if omitted) |
| domain | string | no | Custom domain (default: go2.gg) |
| title | string | no | Link title |
| description | string | no | Link description |
| tags | string[] | no | Tags for filtering |
| password | string | no | Password protection |
| expiresAt | string | no | ISO 8601 expiration date |
| clickLimit | number | no | Max clicks allowed |
| geoTargets | object | no | Country → URL mapping |
| deviceTargets | object | no | Device → URL mapping |
| iosUrl | string | no | iOS app deep link |
| androidUrl | string | no | Android app deep link |
| utmSource/Medium/Campaign/Term/Content | string | no | UTM parameters |
QR Codes
Generate customizable QR codes. QR generation is free and requires no auth.
Generate QR Code (No Auth Required)
CODEBLOCK8
QR Parameters
| Field | Type | Default | Description |
|---|
| url | string | required | URL to encode |
| size |
number | 256 | Size in pixels (64-2048) |
| foregroundColor | string | #000000 | Hex color for modules |
| backgroundColor | string | #FFFFFF | Hex color for background |
| cornerRadius | number | 0 | Module corner radius (0-50) |
| errorCorrection | string | M | L (7%), M (15%), Q (25%), H (30%) |
| format | string | svg | svg or png |
Save & Track QR Codes (Auth Required)
CODEBLOCK9
Webhooks
Receive real-time notifications for link clicks, creations, and updates.
CODEBLOCK10
Events: click, link.created, link.updated, link.deleted, domain.verified, qr.scanned, * (all)
Webhook payloads include X-Webhook-Signature (HMAC SHA256) for verification. Retries: 5s → 30s → 2m → 10m.
Galleries (Link-in-Bio)
Create link-in-bio pages programmatically.
CODEBLOCK11
Themes: default, minimal, gradient, dark, neon, custom (with customCss)
Item types: link, header, divider, embed (youtube), image
Python Example
CODEBLOCK12
API Endpoint Summary
| Service | Endpoint | Method | Auth |
|---|
| Links create | INLINECODE25 | POST | yes |
| Links list |
/api/v1/links | GET | yes |
| Links get |
/api/v1/links/:id | GET | yes |
| Links update |
/api/v1/links/:id | PATCH | yes |
| Links delete |
/api/v1/links/:id | DELETE | yes |
| Links stats |
/api/v1/links/:id/stats | GET | yes |
|
QR generate |
/api/v1/qr/generate | POST |
no |
| QR save |
/api/v1/qr | POST | yes |
| QR list |
/api/v1/qr | GET | yes |
| QR download |
/api/v1/qr/:id/download | GET | yes |
|
Webhooks |
/api/v1/webhooks | CRUD | yes |
| Webhook test |
/api/v1/webhooks/:id/test | POST | yes |
|
Galleries |
/api/v1/galleries | CRUD | yes |
| Gallery items |
/api/v1/galleries/:id/items | CRUD | yes |
| Gallery publish |
/api/v1/galleries/:id/publish | POST | yes |
Rate Limits
| Plan | Requests/min |
|---|
| Free | 60 |
| Pro |
300 |
| Business | 1000 |
Error Codes
| Code | Description |
|---|
| SLUGRESERVED | Slug is reserved |
| SLUGEXISTS |
Slug already in use on this domain |
| INVALID_URL | Destination URL is invalid |
| LIMIT_REACHED | Plan's link limit reached |
| DOMAIN
NOTVERIFIED | Custom domain not verified |
Go2.gg — 边缘原生短链接生成器
URL缩短、分析、二维码、Webhook、画廊(个人主页链接)。基于Cloudflare边缘网络构建,全球重定向时间低于10毫秒。
设置
从以下地址获取API密钥:https://go2.gg/dashboard/api-keys(免费,无需信用卡)
bash
export GO2GGAPIKEY=go2yourkey_here
API基础地址: https://api.go2.gg/api/v1
认证方式: Authorization: Bearer $GO2GGAPIKEY
文档: https://go2.gg/docs/api/links
短链接
创建、管理和跟踪带有自定义短码、标签、过期时间、密码以及地理/设备定向的短链接。
创建链接
bash
curl -X POST https://api.go2.gg/api/v1/links \
-H Authorization: Bearer $GO2GGAPIKEY \
-H Content-Type: application/json \
-d {
destinationUrl: https://example.com/landing-page,
slug: my-link,
title: My Campaign Link,
tags: [marketing, q1-2025]
}
重要提示: 字段名为 destinationUrl(而非 url)。短码为可选字段(省略时将自动生成)。
响应
json
{
success: true,
data: {
id: lnk_abc123,
shortUrl: https://go2.gg/my-link,
destinationUrl: https://example.com/landing-page,
slug: my-link,
domain: go2.gg,
title: My Campaign Link,
tags: [marketing, q1-2025],
clickCount: 0,
createdAt: 2025-01-01T10:30:00Z
}
}
列出链接
bash
列出所有链接(分页)
curl https://api.go2.gg/api/v1/links?perPage=20&sort=clicks \
-H Authorization: Bearer $GO2GG
APIKEY
搜索链接
curl https://api.go2.gg/api/v1/links?search=marketing&tag=q1-2025 \
-H Authorization: Bearer $GO2GG
APIKEY
查询参数: page、perPage(最大100)、search、domain、tag、archived、sort(created/clicks/updated)
更新链接
bash
curl -X PATCH https://api.go2.gg/api/v1/links/lnk_abc123 \
-H Authorization: Bearer $GO2GGAPIKEY \
-H Content-Type: application/json \
-d {destinationUrl: https://example.com/updated-page, tags: [updated]}
删除链接
bash
curl -X DELETE https://api.go2.gg/api/v1/links/lnk_abc123 \
-H Authorization: Bearer $GO2GGAPIKEY
返回 204 No Content
链接分析
bash
curl https://api.go2.gg/api/v1/links/lnk_abc123/stats \
-H Authorization: Bearer $GO2GGAPIKEY
返回:totalClicks、byCountry、byDevice、byBrowser、byReferrer、overTime
高级链接选项
bash
密码保护链接
curl -X POST https://api.go2.gg/api/v1/links \
-H Authorization: Bearer $GO2GG
APIKEY \
-H Content-Type: application/json \
-d {destinationUrl: https://example.com/secret, slug: exclusive, password: secure123}
带过期时间和点击限制的链接
curl -X POST https://api.go2.gg/api/v1/links \
-H Authorization: Bearer $GO2GG
APIKEY \
-H Content-Type: application/json \
-d {destinationUrl: https://example.com/flash, expiresAt: 2025-12-31T23:59:59Z, clickLimit: 1000}
地理定向链接(不同国家不同URL)
curl -X POST https://api.go2.gg/api/v1/links \
-H Authorization: Bearer $GO2GG
APIKEY \
-H Content-Type: application/json \
-d {
destinationUrl: https://example.com/default,
geoTargets: {US: https://example.com/us, GB: https://example.com/uk, IN: https://example.com/in}
}
设备定向链接 + 应用深度链接
curl -X POST https://api.go2.gg/api/v1/links \
-H Authorization: Bearer $GO2GG
APIKEY \
-H Content-Type: application/json \
-d {
destinationUrl: https://example.com/default,
deviceTargets: {mobile: https://m.example.com},
iosUrl: https://apps.apple.com/app/myapp,
androidUrl: https://play.google.com/store/apps/details?id=com.myapp
}
带UTM参数的链接
curl -X POST https://api.go2.gg/api/v1/links \
-H Authorization: Bearer $GO2GG
APIKEY \
-H Content-Type: application/json \
-d {
destinationUrl: https://example.com/product,
slug: summer-sale,
utmSource: email,
utmMedium: newsletter,
utmCampaign: summer-sale
}
创建链接参数
| 字段 | 类型 | 必填 | 描述 |
|---|
| destinationUrl | string | 是 | 重定向的目标URL |
| slug |
string | 否 | 自定义短码(省略时自动生成) |
| domain | string | 否 | 自定义域名(默认:go2.gg) |
| title | string | 否 | 链接标题 |
| description | string | 否 | 链接描述 |
| tags | string[] | 否 | 用于筛选的标签 |
| password | string | 否 | 密码保护 |
| expiresAt | string | 否 | ISO 8601格式的过期日期 |
| clickLimit | number | 否 | 允许的最大点击次数 |
| geoTargets | object | 否 | 国家 → URL映射 |
| deviceTargets | object | 否 | 设备 → URL映射 |
| iosUrl | string | 否 | iOS应用深度链接 |
| androidUrl | string | 否 | Android应用深度链接 |
| utmSource/Medium/Campaign/Term/Content | string | 否 | UTM参数 |
二维码
生成可自定义的二维码。二维码生成免费,无需认证。
生成二维码(无需认证)
bash
生成SVG格式二维码(免费,无需API密钥)
curl -X POST https://api.go2.gg/api/v1/qr/generate \
-H Content-Type: application/json \
-d {
url: https://go2.gg/my-link,
size: 512,
foregroundColor: #1a365d,
backgroundColor: #FFFFFF,
cornerRadius: 10,
errorCorrection: H,
format: svg
} -o qr-code.svg
PNG格式
curl -X POST https://api.go2.gg/api/v1/qr/generate \
-H Content-Type: application/json \
-d {url: https://example.com, format: png, size: 1024} -o qr-code.png
二维码参数
| 字段 | 类型 | 默认值 | 描述 |
|---|
| url | string | 必填 | 要编码的URL |
| size |
number | 256 | 像素大小(64-2048) |
| foregroundColor | string | #000000 | 模块的十六进制颜色 |
| backgroundColor | string | #FFFFFF | 背景的十六进制颜色 |
| cornerRadius | number | 0 | 模块圆角半径(0-50) |
| errorCorrection | string | M | L(7%)、M(15%)、Q(25%)、H(30%) |
| format | string | svg |