简体中文繁體中文(港)繁體中文(台)EnglishEspañolالعربيةहिन्दीPortuguês日本語한국어FrançaisDeutsch
NG

NG 개발자

NG 공유 플랫폼으로 구축하세요. 사이트 검색, URL 제출, 실시간 채팅, AI 에이전트 통합.

OpenAPI Spec llms.txt AI Plugin MCP Tools
빠른 시작 API 참조 데이터 모델 WebSocket 인증 AI 기능 소셜 감지 사이트 인증 속도 제한 CLI 코드 예제 디스커버리

빠른 시작

몇 초 만에 NG API를 시작하세요. 모든 공개 엔드포인트는 인증이 필요하지 않습니다.

# Search sites
curl https://ng.net/api/sites?search=AI+tools

# Get trending
curl https://ng.net/api/sites?sort=hot

# Submit a URL
curl -X POST https://ng.net/api/sites \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com"}'

# Get chat messages
curl https://ng.net/api/messages?limit=10

# Send a message
curl -X POST https://ng.net/api/messages \
  -H "Content-Type: application/json" \
  -d '{"content": "Hello from the API!"}'

API 참조

모든 엔드포인트는 JSON을 사용합니다. 기본 URL: https://ng.net

GET/api/sites
Search and browse shared sites
매개변수 & 응답
이름타입필수설명
searchstring아니오Keyword search
tagstring아니오Filter by category tag
sortstring아니오hot (default) or recent
pageinteger아니오Page number (default 1, 60/page)

응답 200

{
  "sites": [{ "id": "abc123", "url": "https://example.com", "title": "Example", ... }],
  "total": 42,
  "page": 1,
  "hasMore": true
}
POST/api/sites
Submit a new URL to the platform
요청 본문 & 응답

요청 본문

{
  "url": "https://example.com",        // required
  "turnstileToken": "cf-..."    // required when CAPTCHA enabled
}

응답 201 (new)

{ "site": { ... }, "isNew": true }

응답 200 (existing, submit count incremented)

{ "site": { ... }, "isNew": false }

오류

400 — Invalid URL or request format
403 — Missing or invalid Turnstile token
429 — Rate limited (5/min per IP)
Social profile URLs (Twitter, Instagram, GitHub, etc.) are auto-detected. AI generates tags asynchronously after submission. Metadata (title, description, favicon, OG image) is fetched server-side.
GET/api/sites/tags
Get all available category tags
응답
{ "tags": ["工具", "技术", "设计", "新闻", "社区", ...] }
POST/api/sites/{id}/boost
Boost a site's visibility in hot rankings
매개변수 & 응답
이름타입필수설명
idstring (path)Site ID (nanoid)

응답 200

{ "site": { ... }, "credits": 0 }

오류

404 — Site not found
429 — Daily limit reached (1/day free, 3/day logged-in)
POST/api/sites/{id}/claim
Verify site ownership
매개변수 & 응답
이름타입필수설명
idstring (path)Site ID
Requires: <meta name="ngnet-verify" content="{siteId}"> in your site's HTML <head>

응답 200

{ "site": { ... }, "verified": true }

오류

400 — Verification meta tag not found / already claimed
404 — Site not found
POST/api/clicks/{id}
Record a click for analytics
응답
{ "recorded": true }

Rate limit: 30/min per IP

GET/api/messages
Get recent chat messages
매개변수 & 응답
이름타입필수설명
limitinteger아니오Number of messages (default 50, max 100)

응답 200

{
  "messages": [{
    "id": "abc", "type": "chat",
    "content": "Hello!", "sender_name": "user123",
    "created_at": "2026-03-27T12:00:00Z"
  }]
}
POST/api/messages
Send a chat message (max 200 chars, rate: 10/min)
요청 본문 & 응답

요청 본문

{ "content": "Hello from the API!" }

응답 201

{ "message": { "id": "...", "type": "chat", ... } }

오류

400 — Empty or exceeds 200 chars
429 — Rate limited (10/min per IP)
POST/api/translate
AI-powered translation (12 languages)
요청 본문 & 응답

요청 본문

{
  "text": "Hello world",       // max 2000 chars
  "targetLang": "zh-CN"
}

응답 200

{ "translated": "你好世界" }

오류

400 — Missing params or text too long
429 — Rate limited (20/min per IP)
500 — AI translation failed
Uses Cloudflare Workers AI (M2M100-1.2B). Source language is auto-detected.
GET/api/bing-bg
Daily background image from Bing
응답
{
  "imageUrl": "https://www.bing.com/...",
  "videoUrl": "https://...",  // or null
  "copyright": "Photo credit...",
  "title": "Image title"
}
Cached for 6 hours. Proxies Bing's daily image API.
POST/api/auth/send-code
Send login verification code to email
요청 본문 & 응답

요청 본문

{ "email": "user@example.com" }

응답 200

{ "sent": true }
POST/api/auth/verify
Verify code and create session
요청 본문 & 응답

요청 본문

{ "email": "user@example.com", "code": "123456" }

응답 200

{ "user": { "id": "...", "email": "...", "username": "..." } }
Sets HttpOnly cookie sn_token with JWT session.
GET/api/bookmarks
Get user's bookmarked sites (requires auth)
응답
{ "bookmarks": [{ "site_id": "...", "created_at": "..." }] }

데이터 모델

API가 반환하는 핵심 데이터 구조.

Site

필드타입설명
idstringUnique identifier (nanoid)
urlstringFull URL
titlestringPage title (fetched from metadata)
descriptionstringPage description (fetched from metadata)
favicon_urlstringFavicon URL
og_image_urlstringOpen Graph image URL
domainstringExtracted domain (e.g. example.com)
tagsstring[]AI-generated category tags
submit_countintegerNumber of times submitted
click_countintegerTotal clicks recorded
hot_scorenumberTrending score (higher = more popular)
site_typestringwebsite or profile
social_platformstringPlatform name for profiles (twitter, instagram, etc.)
social_usernamestringUsername for profile-type sites
boost_countintegerNumber of boosts received
is_claimedbooleanWhether site ownership is verified
is_promotedbooleanCurrently running paid promotion
first_submitted_atISO 8601First submission timestamp
last_activity_atISO 8601Last activity timestamp

ChatMessage

필드타입설명
idstringUnique message ID
typestringchat, system, or entrance
contentstringMessage content
content_keystring?i18n key for system messages
content_paramsobject?Interpolation params for i18n
sender_namestringDisplay name or geo-based name
sender_locationstring?Raw location (e.g. CN|Beijing)
created_atISO 8601Message timestamp

WebSocket API

WebSocket 엔드포인트에 연결하여 실시간 업데이트를 받으세요.

연결

// Browser
const ws = new WebSocket("wss://ng.net/api/ws");

ws.onmessage = (event) => {
  const data = JSON.parse(event.data);
  console.log(data.event, data.payload);
};

이벤트 유형

이벤트페이로드
new_messageChatMessage object — new chat/entrance/system message
site_updateSite object — metadata updated after async fetch
like{ messageId, fromUser, toUser } — message liked

예제

// new_message event payload
{
  "event": "new_message",
  "payload": {
    "id": "abc123",
    "type": "entrance",
    "content": "entered",
    "content_key": "chat.entered",
    "sender_name": "United States Dallas",
    "sender_location": "US|Dallas",
    "created_at": "2026-03-27T12:00:00Z"
  }
}

// site_update event payload
{
  "event": "site_update",
  "payload": {
    "id": "xyz789",
    "title": "Example Site",
    "description": "A great website",
    "tags": ["工具", "技术"]
  }
}

// like event payload
{
  "event": "like",
  "payload": {
    "messageId": "msg123",
    "fromUser": "United States Dallas",
    "toUser": "Japan Tokyo"
  }
}

인증

대부분의 엔드포인트는 공개입니다. 일부 기능은 이메일 로그인이 필요합니다.

로그인 흐름

1. 이메일로 인증 코드 전송

curl -X POST https://ng.net/api/auth/send-code \
  -H "Content-Type: application/json" \
  -d '{"email": "you@example.com"}'

2. 코드 확인 및 세션 획득

curl -X POST https://ng.net/api/auth/verify \
  -H "Content-Type: application/json" \
  -d '{"email": "you@example.com", "code": "123456"}'
세션은 HttpOnly 쿠키(sn_token)에 저장됩니다.

인증 필요 엔드포인트

EndpointDescription
GET /api/bookmarksGet user bookmarks
POST /api/bookmarksAdd bookmark
DELETE /api/bookmarks/{id}Remove bookmark
GET /api/sites/my-submissionsUser's submission history
POST /api/auth/set-usernameChange display name

AI 기능

NG는 Cloudflare Workers AI로 지능형 기능을 제공합니다.

자동 태깅

URL 제출 시 AI가 콘텐츠를 분석하고 자동으로 카테고리 태그를 할당합니다.

사용 가능한 태그

工具 (Tools)技术 (Tech)设计 (Design)新闻 (News) 社区 (Community)学习 (Learning)娱乐 (Entertainment)资源 (Resources) 商业 (Business)生活 (Lifestyle)社交 (Social)
Tags are assigned asynchronously after URL submission. The AI analyzes the fetched page content and selects 1-3 tags from the above list. Tags are stored as Chinese strings in the database but displayed in the user's language via i18n mapping.

번역

번역 API는 12개 언어를 지원합니다. 소스 언어는 자동 감지됩니다.

지원 언어

zh-CNzh-HKzh-TWenesar hiptjakofrde

소셜 프로필 감지

소셜 플랫폼의 URL은 자동 감지되어 프로필 카드로 표시됩니다.

지원 플랫폼

PlatformURL PatternExample
Twitter / Xx.com/{user}, twitter.com/{user}x.com/elonmusk
Instagraminstagram.com/{user}instagram.com/cristiano
GitHubgithub.com/{user}github.com/torvalds
TikToktiktok.com/@{user}tiktok.com/@khaby.lame
YouTubeyoutube.com/@{user}youtube.com/@MrBeast
Facebookfacebook.com/{user}, fb.me/{user}facebook.com/zuck
LinkedInlinkedin.com/in/{user}linkedin.com/in/satyanadella
Redditreddit.com/user/{user}reddit.com/user/spez
Telegramt.me/{user}t.me/durov
Pinterestpinterest.com/{user}pinterest.com/pinterest

URL 패턴 매칭으로 감지합니다.

프로필 전용 필드

필드설명
site_type"profile" (instead of "website")
social_platformPlatform identifier (twitter, instagram, github, etc.)
social_usernameExtracted username handle
og_image_urlProfile avatar (from Open Graph)
descriptionBio / profile description (from Open Graph)

사이트 소유권 인증

사이트 소유자는 소유권을 확인하여 분석 및 프리미엄 표시 등의 기능을 이용할 수 있습니다.

확인 단계

1. ng.net에서 사이트를 찾고 ID 기록

2. 사이트 HTML에 meta 태그 추가

<meta name="ngnet-verify" content="YOUR_SITE_ID">

3. 인증 API 호출

curl -X POST https://ng.net/api/sites/YOUR_SITE_ID/claim

인증 혜택

속도 제한

속도 제한은 IP 주소별로 적용됩니다.

엔드포인트제한
POST /api/sites (Submit URL)5/min per IP
POST /api/messages (Chat)10/min per IP
POST /api/translate20/min per IP
POST /api/clicks/{id}30/min per IP
POST /api/sites/{id}/boost1-3/day per IP
POST /api/auth/send-code3/min per email
POST /api/auth/verify5/min per email
제한 초과 시 HTTP 429가 반환됩니다.

CLI 도구

NG 공유 플랫폼 공식 CLI 도구.

설치

# Install globally
npm install -g @ngnet/cli

# Or use directly with npx
npx ngnet help

명령어

명령어설명
ngnet search <query>Search sites by keyword
ngnet trendingShow trending (hot) sites
ngnet recentShow recently submitted sites
ngnet tagsList all category tags
ngnet tag <name>Browse sites by specific tag
ngnet submit <url>Submit a URL to the platform
ngnet boost <id>Boost a site's visibility
ngnet translate <text> --to <lang>Translate text between languages
ngnet send <message>Send a chat message
ngnet messagesShow recent chat messages
ngnet info <id>Show detailed info for a site
ngnet helpShow help information

전역 옵션

OptionDescription
--jsonOutput raw JSON (for piping to other tools)
--to <lang>Target language for translation (e.g. en, ja, zh-CN)

예제

# Search for AI tools
ngnet search "AI tools"

# Get trending sites as JSON
ngnet trending --json

# Filter by tag
ngnet tag 技术

# Submit a site
ngnet submit https://example.com

# Boost a site
ngnet boost abc123

# Translate text
ngnet translate "Hello world" --to ja

# Send chat message
ngnet send "Hello from CLI!"

# Pipe JSON output to jq
ngnet search "design" --json | jq '.sites[].title'

코드 예제

인기 언어별 통합 패턴.

사이트 검색

curl -s "https://ng.net/api/sites?search=AI+tools&sort=hot" | jq .
const res = await fetch('https://ng.net/api/sites?search=AI+tools');
const { sites, total } = await res.json();
console.log(`Found ${total} sites`);
sites.forEach(s => console.log(s.title, s.url));
import requests

r = requests.get("https://ng.net/api/sites", params={"search": "AI tools"})
data = r.json()
for site in data["sites"]:
    print(site["title"], site["url"])

URL 제출

curl -X POST https://ng.net/api/sites \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com"}'
const res = await fetch('https://ng.net/api/sites', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({ url: 'https://example.com' })
});
const { site, isNew } = await res.json();
console.log(isNew ? 'New!' : 'Already exists', site.title);
import requests

r = requests.post("https://ng.net/api/sites", json={"url": "https://example.com"})
data = r.json()
print("New!" if data["isNew"] else "Exists", data["site"]["title"])

WebSocket 실시간

// Browser WebSocket client
const ws = new WebSocket("wss://ng.net/api/ws");

ws.onopen = () => console.log("Connected!");

ws.onmessage = (event) => {
  const { event: type, payload } = JSON.parse(event.data);
  switch (type) {
    case "new_message":
      console.log(`[${payload.sender_name}] ${payload.content}`);
      break;
    case "site_update":
      console.log(`Site updated: ${payload.title}`);
      break;
    case "like":
      console.log(`${payload.fromUser} liked a message`);
      break;
  }
};

ws.onclose = () => console.log("Disconnected");

변경 로그

API 버전 이력.

VersionDateChanges
v1.22026-03v1.2 — 사이트 인증, 소셜 감지, 다국어 지원 추가.
v1.12026-02v1.1 — WebSocket 실시간 이벤트 추가.
v1.02026-01v1.0 — 초기 출시.

디스커버리 엔드포인트

AI 에이전트와 자동화 도구를 위한 기계 판독 가능 엔드포인트.

OpenAPI 3.1

Machine-readable API specification with schemas and examples

/openapi.json

LLM Context (short)

Quick summary for LLM context windows

/llms.txt

LLM Full Reference

Complete API docs for LLM consumption

/llms-full.txt

AI Plugin (ChatGPT)

OpenAI plugin manifest for GPT-based agents

/.well-known/ai-plugin.json

MCP Tools (Claude)

Model Context Protocol tool definitions

/.well-known/mcp.json

Sitemap

XML sitemap with i18n alternates

/sitemap.xml