一、数据采集的坑点
作为一个数据采集专业户,最近组织又交给我一个艰巨的任务,要通过Url获取eBay的核心数据,同时要可以复用。我一想那简单,直接写了一个爬取数据脚本。给一个 URL,抓标题、价格、卖家、运费,再落个 JSON,不就结束了。真开始做才发现,真正麻烦的从来不是“发请求”本身,而是价格会跟站点、币种、配送范围一起变化,页面字段也会随着商品状态、卖家设置和前端渲染方式不断变化。
后来我直接换了思路:让 Dify 负责流程编排,让 Bright Data MCP 负责采集底座,自己只保留字段整理和结果输出这一层。把 eBay 商品 URL 当成最小输入单元,用Bright Data MCP + Dify 搭一个稳定的详情采集工作流。 如果也想照着跑一遍,可以先把账号准备好:Bright Data 专属注册链接。
二、数据采集的难点
eBay 商品详情采集难,不是难在页面打不开,而是难在打开之后还要稳定拿到可用字段。
| 页面访问 | 动态渲染、访问频率控制、异常页 | 同一批 URL 成功率不稳定 |
| 价格读取 | 一口价、拍卖价、折扣价、币种混杂 | 最终价格字段常常要返工 |
| 运费与状态 | 运费、库存、商品成色位置不固定 | 字段提取逻辑容易碎掉 |
| 卖家信息 | 卖家评分、店铺信息层级不一致 | 清洗成本高 |
| 批量处理 | 多 URL 重试、超时、落盘 | 工作流后半段经常接不上 |
数据收集的重中之重是对应字段与内容。
三、整体方案架构与思考
我这次采用的结构很直接:Dify 负责把节点串起来,Bright Data MCP 负责把 eBay 商品详情数据稳定拿回来,LLM 负责把结果整理成统一结构。
MCP 可以简单理解成 AI 系统调用外部工具的标准接口。在这个场景里,Dify 不需要理解 eBay 页面细节,它只需要知道什么时候把 product_url 交给 MCP 工具,什么时候把返回结果送进 LLM 节点。
整个流程可以概括成这样:
#mermaid-svg-iNoweKfSYZ7jNehB{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-iNoweKfSYZ7jNehB .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-iNoweKfSYZ7jNehB .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-iNoweKfSYZ7jNehB .error-icon{fill:#552222;}#mermaid-svg-iNoweKfSYZ7jNehB .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-iNoweKfSYZ7jNehB .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-iNoweKfSYZ7jNehB .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-iNoweKfSYZ7jNehB .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-iNoweKfSYZ7jNehB .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-iNoweKfSYZ7jNehB .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-iNoweKfSYZ7jNehB .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-iNoweKfSYZ7jNehB .marker{fill:#333333;stroke:#333333;}#mermaid-svg-iNoweKfSYZ7jNehB .marker.cross{stroke:#333333;}#mermaid-svg-iNoweKfSYZ7jNehB svg{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-iNoweKfSYZ7jNehB p{margin:0;}#mermaid-svg-iNoweKfSYZ7jNehB .label{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;color:#333;}#mermaid-svg-iNoweKfSYZ7jNehB .cluster-label text{fill:#333;}#mermaid-svg-iNoweKfSYZ7jNehB .cluster-label span{color:#333;}#mermaid-svg-iNoweKfSYZ7jNehB .cluster-label span p{background-color:transparent;}#mermaid-svg-iNoweKfSYZ7jNehB .label text,#mermaid-svg-iNoweKfSYZ7jNehB span{fill:#333;color:#333;}#mermaid-svg-iNoweKfSYZ7jNehB .node rect,#mermaid-svg-iNoweKfSYZ7jNehB .node circle,#mermaid-svg-iNoweKfSYZ7jNehB .node ellipse,#mermaid-svg-iNoweKfSYZ7jNehB .node polygon,#mermaid-svg-iNoweKfSYZ7jNehB .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-iNoweKfSYZ7jNehB .rough-node .label text,#mermaid-svg-iNoweKfSYZ7jNehB .node .label text,#mermaid-svg-iNoweKfSYZ7jNehB .image-shape .label,#mermaid-svg-iNoweKfSYZ7jNehB .icon-shape .label{text-anchor:middle;}#mermaid-svg-iNoweKfSYZ7jNehB .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-iNoweKfSYZ7jNehB .rough-node .label,#mermaid-svg-iNoweKfSYZ7jNehB .node .label,#mermaid-svg-iNoweKfSYZ7jNehB .image-shape .label,#mermaid-svg-iNoweKfSYZ7jNehB .icon-shape .label{text-align:center;}#mermaid-svg-iNoweKfSYZ7jNehB .node.clickable{cursor:pointer;}#mermaid-svg-iNoweKfSYZ7jNehB .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-iNoweKfSYZ7jNehB .arrowheadPath{fill:#333333;}#mermaid-svg-iNoweKfSYZ7jNehB .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-iNoweKfSYZ7jNehB .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-iNoweKfSYZ7jNehB .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-iNoweKfSYZ7jNehB .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-iNoweKfSYZ7jNehB .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-iNoweKfSYZ7jNehB .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-iNoweKfSYZ7jNehB .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-iNoweKfSYZ7jNehB .cluster text{fill:#333;}#mermaid-svg-iNoweKfSYZ7jNehB .cluster span{color:#333;}#mermaid-svg-iNoweKfSYZ7jNehB div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-iNoweKfSYZ7jNehB .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-iNoweKfSYZ7jNehB rect.text{fill:none;stroke-width:0;}#mermaid-svg-iNoweKfSYZ7jNehB .icon-shape,#mermaid-svg-iNoweKfSYZ7jNehB .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-iNoweKfSYZ7jNehB .icon-shape p,#mermaid-svg-iNoweKfSYZ7jNehB .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-iNoweKfSYZ7jNehB .icon-shape .label rect,#mermaid-svg-iNoweKfSYZ7jNehB .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-iNoweKfSYZ7jNehB .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-iNoweKfSYZ7jNehB .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-iNoweKfSYZ7jNehB :root{–mermaid-font-family:\”trebuchet ms\”,verdana,arial,sans-serif;}
输入 product_url / product_urls
Dify Workflow
Bright Data MCP
web_data_ebay_product
原始商品详情 JSON
LLM 字段清洗
结构化结果 JSON
这个方案真正让我省下时间的地方有三个:
- 我不再自己维护 eBay 详情页采集链路;
- 工作流里只保留输入、输出和字段映射逻辑;
- 后续要接报表、数据库或通知节点时,不需要重写采集层。
换句话说,采集问题交给 Bright Data,流程问题交给 Dify,业务字段由我自己定义。 这样拆完以后,整个系统才像一个能长期跑的工程项目,而不是一段暂时能跑的脚本。
四、前置准备
正式搭建工作流之前,需要以下的必要条件:
五、实战流程
1.配置 Bright Data Mcp
注册非常简单,使用邮箱即可,Bright Data 专属注册链接,注册并输入折扣码(tao20)即送20美元体验金。

设置-用户管理界面点击应用促销代码。

然后输入tao20折扣码,就可以获得20美元体验金。

侧边栏选择MCP,再点击配置MCP。

勾选上电子商务,再点击继续创建。

复制SSE,然后关闭即可。

2.在Dify中添加Bright Data MCP
dify页面点击上边栏的工具。

再点击添加MCP服务
- url:是刚才在bright data mcp中复制的sse地址
- 名称和图标:自行填写
- 标识:随便填

3.创建eBay Dify工作流
上边栏点击工作室,然后点击创建空白应用

以下的设计需要一步一步跟着实现,如果觉得麻烦,最后我会提供DSL文件,直接下载导入即可。
工作流节点设计: 输入节点:添加「文本输入」,创建变量url用于接收 eBay 商品详情页的URL。 
点加号增加一个工具节点,选择我们新增的bright data mcp服务。

同时需要插入用户输入的url

然后添加一个LLM节点,LLM节点需要大模型的Api配置很简单,跟着页面提示就行。

如果没有需要自己去买,我这里使用的是智谱的模型。

然后为LLM节点增加SYSTEM和USER提示词,提示词中主要是提取名称、价格、条件、位置、品牌等等核心内容,这块你可以根据自己所需进行调整。 SYSTEM提示词如下:
你是一个 eBay 商品详情结构化助手。
你只根据输入的 MCP 原始数据提取字段,不猜测、不补充、不解释。
输出必须是合法 JSON,不要 Markdown,不要额外说明。
提取字段:
title
price
currency
shipping
condition
brand
seller_name
seller_rating
seller_reviews
availability
item_id
item_url
规则:
1. 缺失字段返回空字符串
2. price 只保留数字,例如 "$19.99" -> "19.99"
3. item_url 优先取 url,没有则取 input.url
4. 只输出 JSON
USER 提示词如下:
下面是 MCP 返回的 eBay 商品数据数组。
请逐条提取字段,并返回 JSON 数组。
商品数据:
{{ json }}
USER 需要打开junja模式,还需要填入输入。

然后我们再增加一个内容输出,就可以看到eBay商品的具体信息了。 添加一个直接回复节点,起名叫JSON格式回复。

4.测试eBay Dify工作流
到这一步,这个工作流已经能完成一件很具体的事:输入商品 URL,输出可直接落库的 eBay 商品详情。
我们点击预览测试一下,url我输入的是:eBay商品测试url。

然后点击运行。就可以看到商品详情了,是不是非常简单!

六、模板交付
想快速上手,可以按照以下步骤:
模板里我会保留这几部分:
- eBay数据抓取.yml:Dify 工作流模板
- README.md:配置说明与变量解释
导入之后通常只需要检查三件事:
- Bright Data MCP 是否已在当前 Dify 工作区授权
- MCP 服务标识符是否和模板一致
- LLM 节点是否切换成自己可用的模型
下载链接:github链接
七、成本对比
如果只看单次请求,一次性脚本似乎更省事;但如果这个事情需求长期进行,并且可能需要不懂编程的同事使用,维护成本很快就会反超。使用Dify工作流之后,获取eBay商品数据就变成了固定的流程,省下来的不是几秒执行时间,而是反复改脚本、补格式、做交接的工程时间。对个人开发者来说,这是少返工;对团队来说,这是可复用。
同时说一下我为什么选择Bright Data Web Scraper API , 因为它是采用按结果付费模式(Pay-per-result),只有成功返回数据才计费,非常适合大规模数据采集和自动化流程。并且Bright Data Web Scraper API 支持 100+ 网站,包括:eBay、Amazon、Walmart、LinkedIn、Google Maps、TikTok等等。
八、总结
这次做 eBay 商品详情采集,是真正意义上的 AI 工作流。获取数据其实并没有想象的那么难,使用对的工具进行获取数据,已经没有技术壁垒了,人人都可以获取想要的数据。
如果要复现这条链路,先把 Bright Data 账号和 MCP 接好,再把 eBay 商品 URL 放进 Dify就可以实现相同的效果。注册链接放这里:Bright Data 专属注册链接,输入折扣码tao20,即可获得20美元体验金。





