ClickBank Product Scraper
Autonomous scraper for high-performing ClickBank products. Pulls product metadata (gravity, commission, sales estimates) from CBTrends.com and exports structured JSON for pipeline integration.
Installation
CODEBLOCK0
Dependencies:
- -
cheerio — HTML parsing - INLINECODE1 — HTTP requests
- INLINECODE2 ≥ v16
Usage
Basic Run
node scraper.js
Outputs to
output/latest.json, INLINECODE4
With ClickBank Affiliate ID
CB_AFFILIATE_ID=your_nickname node scraper.js
Generates hoplinks with your affiliate ID embedded.
Scheduled Runs
Use OpenClaw cron or n8n workflows to run daily:
CODEBLOCK3
Output Format
latest.json
Always-current snapshot for real-time pipeline feeds.
CODEBLOCK4
products-YYYY-MM-DD.json
Full daily archive for historical analysis.
top10-YYYY-MM-DD.json
Filtered to gravity > 50 for quick high-performers reference.
Integration Use Cases
1. Pinterest Board Automation
Feed
latest.json → n8n workflow → Auto-generate Pinterest pins for top 10 products
2. Product Comparison Content
Extract gravity + commission → Generate comparison tables for blog posts
3. Affiliate Performance Tracking
Monitor gravity trends over time → Pivot to rising winners
4. Landing Page Personalization
Cross-reference user interests → Recommend high-gravity products
Data Fields Reference
| Field | Type | Description |
|---|
| name | string | Product name |
| vendorId |
string | ClickBank vendor identifier |
| gravity | number | Affiliate gravity (higher = more demand, 0-100+) |
| avgSaleAmount | string | Average transaction value |
| commissionPct | number | Commission rate (0-100%) |
| rebillPct | number | Rebill/recurring commission % |
| hoplink | string | Ready-to-use affiliate link |
| estimatedMonthlySales | string | Rough sales estimate |
Limitations
- - Single page per category (10 products) from CBTrends
- Gravity data may lag 1-2 hours behind ClickBank live marketplace
- No API key required (scrapes public data)
- Categories limited to: Health & Fitness, Supplements, E-Business, Self-Help
Roadmap
- - [x] Health & Fitness category scraper
- [ ] Multi-category support (Supplements, Self-Help, E-Business, Investing)
- [ ] Pagination (pages 2-5 for 50+ products)
- [ ] ClickBank Marketplace API integration (when account active)
- [ ] Scheduled runs via cron
- [ ] Gravity trend tracking over time
- [ ] Email digest of top gainers/losers
Integration with n8n
Example n8n workflow node:
CODEBLOCK5
Integration with OpenClaw
Use as a cron job or sub-agent:
CODEBLOCK6
Author
Max @ max-co.digital — Autonomous ClickBank affiliate marketing automation.
License
Proprietary — Part of Digital Helper Agency / max-co product suite.
ClickBank 产品抓取器
用于高绩效ClickBank产品的自主抓取器。从CBTrends.com提取产品元数据(热度、佣金、销售估算),并导出结构化JSON以便集成到工作流中。
安装
bash
npm install
依赖项:
- - cheerio — HTML解析
- node-fetch — HTTP请求
- node ≥ v16
使用方法
基本运行
bash
node scraper.js
输出至 output/latest.json、output/products-YYYY-MM-DD.json
使用ClickBank联盟ID
bash
CB
AFFILIATEID=your_nickname node scraper.js
生成嵌入您联盟ID的跳转链接。
定时运行
使用OpenClaw cron或n8n工作流每日运行:
json
{
job: clickbank-scraper,
schedule: 0 9
*,
command: CB
AFFILIATEID=your_id node scraper.js
}
输出格式
latest.json
实时管道馈送的当前快照。
json
{
category: 健康与健身,
updatedAt: 2026-03-27T14:00:00Z,
products: [
{
name: 产品名称,
vendorId: vendor123,
gravity: 87.5,
avgSaleAmount: $47.00,
commissionPct: 75,
rebillPct: 30,
hoplink: https://yourname.clickbank.net/...,
estimatedMonthlySales: $12000
}
]
}
products-YYYY-MM-DD.json
完整每日存档,用于历史分析。
top10-YYYY-MM-DD.json
筛选热度大于50的产品,快速参考高绩效产品。
集成用例
1. Pinterest面板自动化
将 latest.json 输入 → n8n工作流 → 自动为前10名产品生成Pinterest图钉
2. 产品对比内容
提取热度+佣金 → 为博客文章生成对比表格
3. 联盟绩效追踪
监控热度趋势变化 → 转向上升中的赢家
4. 落地页个性化
交叉参考用户兴趣 → 推荐高热度产品
数据字段参考
| 字段 | 类型 | 描述 |
|---|
| name | 字符串 | 产品名称 |
| vendorId |
字符串 | ClickBank供应商标识符 |
| gravity | 数字 | 联盟热度(越高需求越大,0-100+) |
| avgSaleAmount | 字符串 | 平均交易金额 |
| commissionPct | 数字 | 佣金率(0-100%) |
| rebillPct | 数字 | 续费/循环佣金百分比 |
| hoplink | 字符串 | 可直接使用的联盟链接 |
| estimatedMonthlySales | 字符串 | 大致销售估算 |
限制
- - 每个类别单页(10个产品)来自CBTrends
- 热度数据可能比ClickBank实时市场滞后1-2小时
- 无需API密钥(抓取公开数据)
- 类别限于:健康与健身、保健品、电子商务、自助提升
路线图
- - [x] 健康与健身类别抓取器
- [ ] 多类别支持(保健品、自助提升、电子商务、投资)
- [ ] 分页(第2-5页,50+产品)
- [ ] ClickBank市场API集成(账户激活后)
- [ ] 通过cron定时运行
- [ ] 热度趋势随时间追踪
- [ ] 涨跌最大产品的邮件摘要
与n8n集成
示例n8n工作流节点:
javascript
// n8n 执行命令 节点
const exec = require(child_process).execSync;
const result = exec(CBAFFILIATEID=your_id node scraper.js, {
cwd: /path/to/clickbank-scraper
});
return JSON.parse(result.toString());
与OpenClaw集成
用作cron任务或子代理:
bash
openclaw cron add clickbank-scraper \
--schedule 0 9 * \
--command cd path/to/scraper && node scraper.js
作者
Max @ max-co.digital — 自主ClickBank联盟营销自动化。
许可证
专有 — 属于Digital Helper Agency / max-co产品套件的一部分。