开发者
API 与 MCP
同一套查询能力,三种接入方式:REST API 给程序用,MCP 给 AI 助手用,Skill 给 Claude 用。
三步开始
- 01
注册并登录,在个人中心的“API 与 MCP”页新建密钥。
- 02
在请求头里带上 Authorization: Bearer tsk_你的密钥。
- 03
调用下面的接口,或把 MCP 地址加到你的 AI 助手。
REST API
所有接口返回 JSON。响应头 x-quota-remaining 是今天剩余的单位数;超出额度或频率返回 429,并带 retry-after。
https://tldsweep.com/api/v1
| 方法 | 路径 | 说明 | 消耗 |
|---|---|---|---|
| GET | /me | 当前账号的套餐、额度与今日用量 | 不计单位 |
| GET | /check?domain=example.com | 查询一个完整域名:状态、注册商、注册与到期时间 | 1 单位 |
| POST | /check | 一次查询最多 50 个完整域名 | 每个域名 1 单位 |
| POST | /scans | 用一个名字扫描一组后缀(异步任务) | 每个后缀 1 单位 |
| GET | /scans/{id}?status=available | 扫描进度与结果,可用 status 过滤 | 不计单位 |
| GET | /scans | 我的扫描记录 | 不计单位 |
| GET | /scopes | 可用的后缀分组及数量 | 不计单位 |
| GET | /tlds/{tld} | 后缀详情:注册局、类型、RDAP / WHOIS 服务器 | 不计单位 |
| GET | /tlds?type=cctld&q= | 后缀列表,支持 type 与 q 过滤 | 不计单位 |
| POST | /names/suggest | AI 起名(不含可注册性检查) | 5 单位 |
| GET / POST | /watches | 列出、添加(POST)监测域名 | 不计单位 / 1 单位 |
| DELETE | /watches/{id} | 取消监测 | 不计单位 |
curl -s "https://tldsweep.com/api/v1/check?domain=example.com" \ -H "Authorization: Bearer tsk_your_key"
{
"domain": "example.com",
"tld": "com",
"status": "taken",
"method": "rdap",
"registrar": "RESERVED-Internet Assigned Numbers Authority",
"created": "1995-08-14T04:00:00Z",
"expires": "2027-08-13T04:00:00Z",
"statuses": ["client delete prohibited", "..."],
"nameservers": ["a.iana-servers.net", "b.iana-servers.net"],
"checked_at": 1793121034262
}curl -s https://tldsweep.com/api/v1/check \
-H "Authorization: Bearer tsk_your_key" \
-H "content-type: application/json" \
-d '{"domains": ["acme.com", "acme.io", "acme.ai"]}'import os, requests
API = "https://tldsweep.com/api/v1"
H = {"Authorization": f"Bearer {os.environ['TLDSWEEP_API_KEY']}"}
r = requests.post(f"{API}/check", headers=H, json={"domains": ["acme.com", "acme.io"]})
for row in r.json()["results"]:
print(row["domain"], row["status"], row.get("expires"))# 用一个名字扫描热门后缀,然后轮询结果
curl -s https://tldsweep.com/api/v1/scans \
-H "Authorization: Bearer tsk_your_key" \
-H "content-type: application/json" \
-d '{"name": "acme", "scope": "hot"}'
curl -s "https://tldsweep.com/api/v1/scans/123?status=available,likely" \
-H "Authorization: Bearer tsk_your_key"状态值
- available
- 可注册
- taken
- 已注册
- reserved
- 保留 / 不开放注册
- likely
- 注册局不提供查询接口且 DNS 无记录,大概率可注册,需到注册商确认
- unknown
- 暂时无法判断
- error
- 查询出错
MCP:让 AI 助手直接用
远程 MCP 服务(Streamable HTTP),无需安装。助手可以查域名、批量扫描、AI 起名、管理监测。
https://tldsweep.com/api/mcp
claude mcp add --transport http tldsweep https://tldsweep.com/api/mcp \ --header "Authorization: Bearer tsk_your_key"
{
"mcpServers": {
"tldsweep": {
"url": "https://tldsweep.com/api/mcp",
"headers": {
"Authorization": "Bearer tsk_your_key"
}
}
}
}把 tsk_你的密钥 换成上面生成的密钥。客户端不支持自定义请求头时,可以把密钥写在地址后面:?key=tsk_…(请勿分享这个地址)。
提供的工具
check_domainCheck whether a single domain name is registered, available or reserved, using live DNS, RDAP and WHOIS. Returns status, registrar, creation and expiry dates. Costs 1 unit.
check_domainsCheck up to 50 full domain names in one call (any mix of TLDs). Costs 1 unit per domain.
scan_nameCheck one name (without TLD) across a group of TLDs, e.g. every popular TLD or every TLD for a given industry. Starts an async scan and waits up to wait_seconds for it to finish, then returns the available domains found so far plus the scan id for get_scan. Costs 1 unit per TLD. Call list_scopes to see the groups.
get_scanFetch progress and results of a scan started with scan_name. status filters results: available, likely, taken, reserved, unknown, error, or all.
list_scopesList the TLD groups usable as scope in scan_name, with how many TLDs each contains.
tld_infoRegistry, type (generic / country / new gTLD), RDAP and WHOIS servers and registration policy link for one TLD.
suggest_namesBrainstorm brandable names for a project and return candidate domains for the requested TLDs. Availability is NOT checked; pass the domains to check_domains next. Costs 5 units.
list_watchesList domains on the account's watch list with their last known status and expiry.
watch_domainAdd a domain to the watch list. The account owner gets email alerts before expiry, when it drops or gets registered, and on registrar / nameserver changes.
unwatch_domainRemove a domain from the watch list by its watch id (see list_watches).
account_usageShow the account's plan, daily unit quota and how much has been used today.
客户端只支持本地(stdio)MCP 时,下载桥接脚本,用 Node.js 18+ 运行:
下载 tldsweep-mcp.mjs{
"mcpServers": {
"tldsweep": {
"command": "node",
"args": [
"/path/to/tldsweep-mcp.mjs"
],
"env": {
"TLDSWEEP_API_KEY": "tsk_your_key",
"TLDSWEEP_URL": "https://tldsweep.com"
}
}
}
}Claude Skill
Skill 是给 Claude 的“说明书 + 脚本”。装上后,Claude 会在你聊到起名、查域名时自动用 TLDSweep 查询,结果更准,还能一次扫遍所有后缀。
- 01
下载 Skill 压缩包。
- 02
Claude 网页 / 桌面版:设置 → 功能 → Skills 上传压缩包;Claude Code:解压到 ~/.claude/skills/。
- 03
设置环境变量 TLDSWEEP_API_KEY 为你的密钥(Claude Code),或在对话里把密钥告诉 Claude。
额度
额度跟随套餐,可在定价页查看与升级。