请求
在代码里调用
把密钥放在环境变量 TAPCUB_API_KEY 里。接口地址前缀:https://api.pathclue.com/v1。
terminal
curl -X POST https://api.pathclue.com/v1/visitor/verify-bot \
-H "Authorization: Bearer $TAPCUB_API_KEY" \
-H "Content-Type: application/json" \
-d '{"ip":"66.249.66.1","ua":"Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"}'index.mjs
const res = await fetch('https://api.pathclue.com/v1/visitor/verify-bot', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.TAPCUB_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"ip": "66.249.66.1",
"ua": "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
}),
});
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
console.log(await res.json());main.py
import os
import requests
res = requests.post(
"https://api.pathclue.com/v1/visitor/verify-bot",
headers={"Authorization": f"Bearer {os.environ['TAPCUB_API_KEY']}"},
json={
"ip": "66.249.66.1",
"ua": "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)",
},
timeout=120,
)
res.raise_for_status()
print(res.json())index.php
<?php
$ch = curl_init('https://api.pathclue.com/v1/visitor/verify-bot');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('TAPCUB_API_KEY'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'ip' => '66.249.66.1',
'ua' => 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)',
]),
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($status >= 300) {
throw new RuntimeException("HTTP $status: $body");
}
print_r(json_decode($body, true));main.go
package main
import (
"bytes"
"fmt"
"io"
"net/http"
"os"
)
func main() {
body := []byte(`{"ip":"66.249.66.1","ua":"Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"}`)
req, err := http.NewRequest("POST", "https://api.pathclue.com/v1/visitor/verify-bot", bytes.NewReader(body))
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("TAPCUB_API_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
out, err := io.ReadAll(res.Body)
if err != nil {
panic(err)
}
if res.StatusCode >= 300 {
panic(fmt.Sprintf("HTTP %d: %s", res.StatusCode, out))
}
fmt.Println(string(out))
}参数
请求参数
| 参数 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
ip | ip | 是 | — | 请求来自的 IPv4 或 IPv6 地址。 |
ua | string | 否 | — | 请求自称的 User-Agent。ua 和 bot 至少给一个。 |
bot | string | 否 | — | 不给完整 UA 时写爬虫名,如 Googlebot、GPTBot、ClaudeBot、bingbot。 |
signatureInput | string | 否 | — | 可选,Web Bot Auth:请求的 Signature-Input 头。和 signature、signatureAgent、authority 一起传,按签名代理的密钥目录验 HTTP 消息签名(RFC 9421)。 |
signature | string | 否 | — | 可选:请求的 Signature 头。 |
signatureAgent | string | 否 | — | 可选:请求的 Signature-Agent 头(公钥所在的地址)。 |
authority | string | 否 | — | 可选:请求发往的主机名(你的网站),如 shop.example.com。验 Web Bot Auth 时要。 |
返回
返回示例
成功的响应带 X-Credits-Charged(本次扣的点数)和 X-Credits-Balance(余额)两个响应头。出错时返回 {"error":{"code","message"}},一律不扣点。
response.json
{
"ip": "66.249.66.1",
"claimed": "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)",
"verdict": "verified",
"reason": null,
"method": "reverse-dns",
"checked": {
"officialRanges": true,
"reverseDns": true
},
"operator": {
"id": "google",
"name": "Google",
"docs": "https://developers.google.com/crawling/docs/crawlers-fetchers/verify-google-requests",
"publishesRanges": true,
"publishesHostnames": true
},
"actualOperator": null,
"bot": {
"id": "googlebot",
"name": "Googlebot",
"operator": "Google",
"purpose": "search"
},
"evidence": {
"range": {
"cidr": "66.249.66.0/27",
"source": "google-common",
"operator": "Google",
"bots": "Googlebot, Google-InspectionTool, GoogleOther, Storebot-Google"
},
"reverseDns": {
"ptr": [
"crawl-66-249-66-1.googlebot.com"
],
"host": "crawl-66-249-66-1.googlebot.com",
"hostOperator": "google",
"forward": [
"66.249.66.1"
],
"forwardConfirmed": true
},
"network": {
"asn": 15169,
"prefix": "66.249.64.0/19",
"name": "GOOGLE, US"
}
},
"notes": [],
"rangesFetched": "2026-11-17"
}价格和限制
怎么收费
| 价格 | 每次 0.2 点 |
|---|---|
| 折合美元 | 约 $0.0002 · $0.20 / 1,000 |
| 点数 | 免费或付费点数 |
| 限速 | 免费 10 次 / 分钟 · Plus 60 次 / 分钟 · Pro 300 次 / 分钟 |
| 免费账号每日上限 | 免费账号每把密钥每天 1,000 次 |
| 何时扣点 | 只有成功才扣,出错和超时不扣 |
用例
可以用来做什么
拦截假爬虫
放行真的搜索和 AI 爬虫,拦下照抄它们 UA 的采集程序。
统计 AI 抓取
报表里只算验证过的 GPTBot、ClaudeBot 访问。
日志排查
出事之后核查可疑请求。
能验证哪些爬虫?
运营方公布了 IP 段或支持反向 DNS 验证的爬虫,包括 OpenAI、Anthropic、Perplexity 和 Google。其他的返回「未知」,不靠猜。
IP 段多久更新?
官方列表每天拉取一次,每个结果都带所核对列表的日期。
AI 爬虫真伪验证 API 怎么收费?
每次成功调用扣 每次 0.2 点(约 $0.0002),1 点约合 0.001 美元。调用失败——参数错误、目标网站打不开、超时或我们这边出错——都不扣。
可以免费试用吗?
可以。新账号送 300 点,每个账号每天再送 30 点,都能用在这个接口上。也可以不用密钥,直接在 tapcub.com 上用对应的免费工具试效果。
限速是多少?
免费账号每把密钥每分钟 10 次、每天 1,000 次;Plus 每分钟 60 次,Pro 每分钟 300 次。超出时返回 HTTP 429 并带 Retry-After 头,不扣点。
怎么拿到 API 密钥?
登录 TapCub 控制台,验证邮箱后在「工具套餐 → API」页新建密钥。密钥以 tck_ 开头,只显示一次;调用时放在 Authorization: Bearer 请求头里。