微算力 · API 导航与自营网关
API 接入 EN
未登录登录
🔗

企业级短链与营销追踪平台

go2gg · vv1.0.0
专业技能 安全 S 级 作者 Rakesh1002 公开目录收录
下载 2k 安装 434 收藏 9k 浏览 46k
原始页面

简介

Go2.gg短链服务API,支持URL缩短、QR生成与数据分析,依托Cloudflare边缘网络,助力高效链接管理与营销追踪。

原始描述

Use Go2.gg API for URL shortening, link analytics, QR code generation, webhooks, and link-in-bio pages. Use when the user needs to create short links, track clicks, generate QR codes, set up link-in-bio pages, or manage branded URLs. Free tier includes short links, QR codes, and analytics. Requires GO2GG_API_KEY env var. QR code generation is free without auth.

中文使用说明 来自收录源

核心用法

Go2.gg 是一个基于 Cloudflare 边缘网络的 URL 缩短服务,提供完整的链接管理解决方案。Skill 以纯文档形式呈现,包含详细的 API 调用示例,涵盖五大核心功能:

短链接管理:创建带自定义 slug、密码保护、过期时间和点击限制的短链接;支持按国家/地区、设备类型进行智能重定向;可附加 UTM 参数追踪营销效果。

QR 码生成:无需认证即可免费生成高自定义 QR 码(SVG/PNG 格式),支持调整尺寸、配色、圆角和纠错级别。

Webhook 集成:实时接收链接点击、创建、更新等事件通知,支持 HMAC 签名验证和自动重试机制。

Link-in-Bio 页面:程序化创建个人主页,支持多种主题、嵌入 YouTube 视频、图片和自定义排序。

显著优点

  1. 边缘网络性能:基于 Cloudflare,全球重定向延迟低于 10ms
  2. 免费友好:QR 码生成完全免费无需认证;短链接、分析、基础 Webhook 均包含在免费套餐
  3. 高级功能丰富:密码保护、地理/设备定向、点击限制、UTM 追踪等商业级特性
  4. 安全最佳实践:API Key 通过环境变量 GO2GG_API_KEY 注入,无硬编码凭证
  5. 零依赖风险:纯 Markdown 文档型 Skill,无可执行代码,无第三方依赖

潜在缺点与局限性

  1. 来源可信度:维护者为个人开发者(T3 级别),非企业级服务背书
  2. 速率限制:免费套餐 60 请求/分钟,大规模商业场景需升级
  3. 外部依赖:完全依赖 Go2.gg 服务可用性,存在单点故障风险
  4. 功能边界:Skill 仅提供文档和示例,实际 API 调用由用户环境执行

适合人群

  • 数字营销人员:需要追踪链接点击、生成带品牌标识的 QR 码
  • 内容创作者:搭建 Link-in-Bio 页面,统一管理社交媒体入口
  • 开发者:需要轻量级 URL 缩短 API 集成到现有工作流
  • 初创团队:预算有限但需要专业级链接管理和分析功能

常规风险

  • API Key 泄露风险:用户需妥善保管环境变量中的密钥
  • 服务持续性:个人维护项目存在更新或终止的不确定性
  • 数据隐私:链接分析数据存储于第三方平台,敏感业务需谨慎评估

技能正文


name: go2gg description: Use Go2.gg API for URL shortening, link analytics, QR code generation, webhooks, and link-in-bio pages. Use when the user needs to create short links, track clicks, generate QR codes, set up link-in-bio pages, or manage branded URLs. Free tier includes short links, QR codes, and analytics. Requires GO2GG_API_KEY env var. QR code generation is free without auth.

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)

export GO2GG_API_KEY="go2_your_key_here"

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

curl -X POST "https://api.go2.gg/api/v1/links" \
  -H "Authorization: Bearer $GO2GG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "destinationUrl": "https://example.com/landing-page",
    "slug": "my-link",
    "title": "My Campaign Link",
    "tags": ["marketing", "q1-2025"]
  }'

Important: Field is destinationUrl (not url). Slug is optional (auto-generated if omitted).

Response

{
  "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"
  }
}

List Links

# List all links (paginated)
curl "https://api.go2.gg/api/v1/links?perPage=20&sort=clicks" \
  -H "Authorization: Bearer $GO2GG_API_KEY"

# Search links
curl "https://api.go2.gg/api/v1/links?search=marketing&tag=q1-2025" \
  -H "Authorization: Bearer $GO2GG_API_KEY"

Query params: page, perPage (max 100), search, domain, tag, archived, sort (created/clicks/updated)

Update a Link

curl -X PATCH "https://api.go2.gg/api/v1/links/lnk_abc123" \
  -H "Authorization: Bearer $GO2GG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"destinationUrl": "https://example.com/updated-page", "tags": ["updated"]}'

Delete a Link

curl -X DELETE "https://api.go2.gg/api/v1/links/lnk_abc123" \
  -H "Authorization: Bearer $GO2GG_API_KEY"
# Returns 204 No Content

Link Analytics

curl "https://api.go2.gg/api/v1/links/lnk_abc123/stats" \
  -H "Authorization: Bearer $GO2GG_API_KEY"

Returns: totalClicks, byCountry, byDevice, byBrowser, byReferrer, overTime

Advanced Link Options

# Password-protected link
curl -X POST "https://api.go2.gg/api/v1/links" \
  -H "Authorization: Bearer $GO2GG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"destinationUrl": "https://example.com/secret", "slug": "exclusive", "password": "secure123"}'

# Link with expiration + click limit
curl -X POST "https://api.go2.gg/api/v1/links" \
  -H "Authorization: Bearer $GO2GG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"destinationUrl": "https://example.com/flash", "expiresAt": "2025-12-31T23:59:59Z", "clickLimit": 1000}'

# Geo-targeted link (different URLs per country)
curl -X POST "https://api.go2.gg/api/v1/links" \
  -H "Authorization: Bearer $GO2GG_API_KEY" \
  -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"}
  }'

# Device-targeted link + app deep links
curl -X POST "https://api.go2.gg/api/v1/links" \
  -H "Authorization: Bearer $GO2GG_API_KEY" \
  -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"
  }'

# Link with UTM parameters
curl -X POST "https://api.go2.gg/api/v1/links" \
  -H "Authorization: Bearer $GO2GG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "destinationUrl": "https://example.com/product",
    "slug": "summer-sale",
    "utmSource": "email",
    "utmMedium": "newsletter",
    "utmCampaign": "summer-sale"
  }'

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)

# Generate SVG QR code (free, no API key needed)
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 format
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

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)

# Save QR config for tracking
curl -X POST "https://api.go2.gg/api/v1/qr" \
  -H "Authorization: Bearer $GO2GG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "Business Card QR", "url": "https://go2.gg/contact", "linkId": "lnk_abc123"}'

# List saved QR codes
curl "https://api.go2.gg/api/v1/qr" -H "Authorization: Bearer $GO2GG_API_KEY"

# Download saved QR
curl "https://api.go2.gg/api/v1/qr/qr_abc123/download?format=svg" \
  -H "Authorization: Bearer $GO2GG_API_KEY" -o qr.svg

# Delete QR
curl -X DELETE "https://api.go2.gg/api/v1/qr/qr_abc123" -H "Authorization: Bearer $GO2GG_API_KEY"

Webhooks

Receive real-time notifications for link clicks, creations, and updates.

# Create webhook
curl -X POST "https://api.go2.gg/api/v1/webhooks" \
  -H "Authorization: Bearer $GO2GG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "Click Tracker", "url": "https://your-server.com/webhook", "events": ["click", "link.created"]}'

# List webhooks
curl "https://api.go2.gg/api/v1/webhooks" -H "Authorization: Bearer $GO2GG_API_KEY"

# Test webhook
curl -X POST "https://api.go2.gg/api/v1/webhooks/wh_abc123/test" \
  -H "Authorization: Bearer $GO2GG_API_KEY"

# Delete webhook
curl -X DELETE "https://api.go2.gg/api/v1/webhooks/wh_abc123" \
  -H "Authorization: Bearer $GO2GG_API_KEY"

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.

# Create gallery
curl -X POST "https://api.go2.gg/api/v1/galleries" \
  -H "Authorization: Bearer $GO2GG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"slug": "myprofile", "title": "My Name", "bio": "Creator & developer", "theme": "gradient"}'

# Add link item
curl -X POST "https://api.go2.gg/api/v1/galleries/gal_abc123/items" \
  -H "Authorization: Bearer $GO2GG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"type": "link", "title": "My Website", "url": "https://example.com"}'

# Add YouTube embed
curl -X POST "https://api.go2.gg/api/v1/galleries/gal_abc123/items" \
  -H "Authorization: Bearer $GO2GG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"type": "embed", "title": "Latest Video", "embedType": "youtube", "embedData": {"videoId": "dQw4w9WgXcQ"}}'

# Publish gallery (makes it live at go2.gg/bio/myprofile)
curl -X POST "https://api.go2.gg/api/v1/galleries/gal_abc123/publish" \
  -H "Authorization: Bearer $GO2GG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"isPublished": true}'

# Reorder items
curl -X PATCH "https://api.go2.gg/api/v1/galleries/gal_abc123/items/reorder" \
  -H "Authorization: Bearer $GO2GG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"itemIds": ["item_3", "item_1", "item_2"]}'

# List galleries
curl "https://api.go2.gg/api/v1/galleries" -H "Authorization: Bearer $GO2GG_API_KEY"

Themes: default, minimal, gradient, dark, neon, custom (with customCss) Item types: link, header, divider, embed (youtube), image


Python Example

import requests

API_KEY = "go2_your_key_here"  # or os.environ["GO2GG_API_KEY"]
BASE = "https://api.go2.gg/api/v1"
headers = {"Authorization": f"Bearer {API_KEY}", "Content-Type": "application/json"}

# Create short link
resp = requests.post(f"{BASE}/links", headers=headers, json={
    "destinationUrl": "https://example.com/product",
    "slug": "my-product",
    "title": "Product Link",
    "tags": ["product"]
})
link = resp.json()["data"]
print(f"Short URL: {link['shortUrl']}")

# Get analytics
stats = requests.get(f"{BASE}/links/{link['id']}/stats", headers=headers).json()["data"]
print(f"Clicks: {stats['totalClicks']}")

# Generate QR (no auth needed)
qr = requests.post(f"{BASE}/qr/generate", json={"url": link["shortUrl"], "size": 512, "format": "png"})
with open("qr.png", "wb") as f:
    f.write(qr.content)

API Endpoint Summary

Service Endpoint Method Auth
Links create /api/v1/links 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
SLUG_RESERVED Slug is reserved
SLUG_EXISTS Slug already in use on this domain
INVALID_URL Destination URL is invalid
LIMIT_REACHED Plan's link limit reached
DOMAIN_NOT_VERIFIED Custom domain not verified

正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。

标签

apimarketingdata-analyticscontent-mediaproductivity

同类 Skill