Python SDK + MCP server · Token 客户自购 · 数据客户自抓
pip install 'git+https://github.com/SassumiX/diggerkit.git'
Dashboard → API 配额 → 复制 gds_xxx
search_leads() 直接返回 lead 列表
# ① 安装
pip install 'git+https://github.com/SassumiX/diggerkit.git'
# ② 5 行接入
from diggerkit import DiggerKitClient
c = DiggerKitClient(api_key="gds_xxx")
leads = c.search_leads(
query="100% cotton poplin 133x72 GOTS",
country="DE",
limit=5
)
for x in leads:
print(x["company"], x["country"], x["gd_score"])# mine_leads (C / C+ tier)
leads = c.mine(
query="organic cotton fabric GOTS",
country="Germany",
limit=5,
tier="C+" # tier: C = base / C+ = enhanced
)
# list_leads (saved in YOUR own database)
saved = c.list_leads()# Claude Desktop / Cursor / VSCode 通用配置
{
"mcpServers": {
"golddigger": {
"command": "node",
"args": ["/absolute/path/to/diggerkit/mcp/node/index.js"],
"env": { "GOLDDIGGER_API_KEY": "gds_xxx" }
}
}
}# 在 Claude Code / Cursor 里直接说
"帮我找 20 家德国的家居面料采购商,
要 OEKO-TEX 100, 客单价 5 万欧以上"
# Agent 自动调用 search_leads, 跑完给你表格
"给前 5 家各写一封德语开发信,
提到我们的 GOTS 认证和 TrustScore 73"
# The Agent calls search_leads, then writes the outreach email with your own LLM token# ① SDK (Python 3.9+)
pip install 'git+https://github.com/SassumiX/diggerkit.git'
# ② MCP (Node 18+)
git clone https://github.com/SassumiX/diggerkit.git && node diggerkit/mcp/node/index.js
# ③ 不想装包?直接用官方 zip(国内最稳)
curl -LO https://golddigger.gold/static/diggerkit-v2.2.0.zip
unzip diggerkit-v2.2.0.zip# SDK 里查
c = DiggerKitClient(api_key="gds_xxx")
print(c.check_quota())
# → {'tier': 'starter', 'used': 8, 'limit': 20, 'reset_at': '...'}
# 或看 Dashboard
dashboard.html → API 配额折叠层Dashboard → API 配额 → 复制 gds_xxx
源码装 DiggerKit, 或写 MCP JSON 配置
search_leads() 20 个 lead, 数据落你自己库
# ═══ 终端 1: 起你的数据目录 (买家信息只存这里) ═══
mkdir -p ~/golddigger-leads
export GOLDDIGGER_API_KEY="gds_YOUR_KEY"
# ═══ 终端 2: 装 SDK ═══
pip install 'git+https://github.com/SassumiX/diggerkit.git'
# ═══ 终端 3: 写第一个脚本 ═══
cat > first_search.py << 'PY'
from diggerkit import DiggerKitClient
import json, datetime
c = DiggerKitClient() # reads GOLDDIGGER_API_KEY automatically
# ① 查配额 (Starter 20 次/天)
print("配额:", c.check_quota())
# ② 搜买家 — 用你的产品 + 认证 + 目标市场
leads = c.search_leads(
query="全棉府绸 133×72",
country="color:#86EFAC",
limit=5
)
# ③ 存成你自己的文件 (我们不碰)
fn = f"~/golddigger-leads/leads_{datetime.date.today()}.json"
with open(fn, "w", encoding="utf-8") as f:
json.dump(leads, f, ensure_ascii=False, indent=2)
print(f"存了 {len(leads)} 个 lead → {fn}")
for x in leads[:5]:
print(f" {x['company']} · {x['country']} · score {x['score']}")
PY
python3 first_search.py
# ═══ 接下来: 让工厂 Agent 接管 (可选) ═══
# Claude Code / Cursor 里直接说:
# "给前 5 家各写一封德语开发信, 提到 GOTS 认证和 TrustScore 73"~/golddigger-leads/leads_YYYY-MM-DD.json — 只在你自己的机器上, 我们不持有GOLDDIGGER_API_KEY 没设, 或 key 拼错了 (应该是 gds_ 开头)GD_BASE_URL 是否正确, 默认 https://golddigger.gold/textile