如果你倒卖二手电子产品、给以旧换新定价,或者想知道某个商品在中国贬值有多快,你需要的数字是人们在二手市场上的实际报价,而不是零售价。闲鱼上就有这个数字,只是散落在成千上万条中文商品信息里。Lovely Router 帮你收集。发送关键词,每条商品信息返回一个 JSON 对象,按商品信息条数从预付费余额中计费。用一个 API 密钥,就能从脚本、表格任务或 AI 智能体中调用。
交给你的 AI 智能体
把这段提示词复制到 Claude Code、Cursor、Codex 或任何编程智能体中。它会告诉智能体文档在哪里,以及如何使用你的 API 密钥。
买入或上架之前,先查清闲鱼上二手商品的真实成交行情. Use the Lovely Router data tools: each returns JSON and is billed per result.
- Docs (read first): https://lovelyrouter.com/docs/tools/find.md and https://lovelyrouter.com/docs/tools/run.md
- Plan first: POST https://lovelyrouter.com/v1/tools/suggest with `{"task": "<my task in plain words>"}` (free). It returns the tools to run in order, each with an example `input`, the `input_required` fields, an estimated cost and a ready-made `run` request. Replace the example values with my task's; if a field is unclear, read the tool with GET https://lovelyrouter.com/v1/tools/<id>. To browse instead, POST https://lovelyrouter.com/v1/tools/discover searches the catalog.
- Show me the plan and its estimated cost (`total_est_cost_usd`) before running anything large.
- Run: POST https://lovelyrouter.com/v1/tools/<id>/run with `{"input": {...}, "max_results": N}`. A 200 has the finished run with `items`; a 202 means it is still running, so poll the `poll` path until `status` is `succeeded`, `failed`, `timed_out` or `stopped`.
- Only delivered results are billed. Keep max_results small on the first run, check the output, then scale up.
- If you support MCP, connect https://lovelyrouter.com/mcp instead (Streamable HTTP, same key; https://lovelyrouter.com/docs/tools/mcp.md) and use suggest_tools, get_tool and run_tool.
- Auth: read my API key from the LOVELY_API_KEY environment variable and send it as `Authorization: Bearer $LOVELY_API_KEY`. Never print or commit the key. If it is not set, ask me to create one at https://lovelyrouter.com/app/keys.
- Billing is prepaid: every call is charged to my balance, so test with a small request before running anything large.
- Every docs page is plain Markdown; the full index is https://lovelyrouter.com/llms.txt.
My task: <the inputs (links, keywords or accounts) and how many results you need>工作原理
选好关键词和筛选条件
使用卖家写商品时用的名称,通常是中文。再加上价格区间、排序方式,以及商品发布时间的新旧范围。
设置上限后运行工具
把关键词连同
max_results发送到POST /v1/tools/xianyu-listings/run。运行会从你的余额中预留它的最高费用,并以 JSON 返回商品信息。算出市场价
取报价的中位数,与原价对比,再看成色和城市如何影响价格。
一次请求搜索闲鱼
搜索闲鱼二手商品接受一个 keyword,或在 keywords 中最多三个关键词,或在 searchUrls 中填搜索链接。maxItems 是上限,sortBy、priceMin、priceMax(人民币)和 publishedWithinDays(1、3、7 或 14)用来缩小结果范围:
curl https://lovelyrouter.com/v1/tools/xianyu-listings/run \
-H "Authorization: Bearer $LOVELY_API_KEY" \
-H "content-type: application/json" \
-d '{
"input": {
"keyword": "iphone",
"maxItems": 50,
"sortBy": "newest",
"publishedWithinDays": "7"
},
"max_results": 50
}'运行超过 60 秒仍未结束时会返回 202;运行工具介绍了如何轮询。
每条商品信息包含什么
| 字段分组 | 包含内容 |
|---|---|
| 商品 | 标题和照片 |
| 价格 | 报价和原价 |
| 成色 | 卖家自述的成色 |
| 地点 | 卖家所在城市 |
| 卖家 | 卖家 |
| 时间 | 发布日期 |
文本按卖家的原文返回,也就是中文。可以在同一个任务里让模型翻译标题并统一成色描述。
实用做法
搜索你接收的每个型号,取最近 14 天报价的中位数,再把你的收购价定为它的一个比例。
按 priceAsc 排序,并用 priceMin 剔除无效的低价信息,标出明显低于同型号中位数的商品。
对比整个产品线的价格与原价。每月重跑一次,看每个型号贬值有多快。
对某个关键词按 priceDrop 排序,找出正在降价的卖家。
用中文关键词搜索你想买的商品,用模型翻译标题,再按城市和价格筛出候选。
想用大白话操作?连接 MCP 服务器,然后对 Claude Code 或 Cursor 说:"在闲鱼上搜索这款相机镜头的中文名称,限定最近 7 天发布,给我报价中位数、最便宜的五条以及它们所在的城市。把 max_results 设为 100。"
搭配新品价和批发价数据
二手价格放在新品价格旁边才更有意义:
按关键词搜索闲鱼二手商品:标题、价格和原价、成色、城市、卖家、图片、发布时间。
按链接获取淘宝和天猫商品页:标题、价格与促销、店铺、品牌、图片、参数、销量和规格。
按关键词搜索 1688 批发商品:标题、人民币阶梯价、起订量、销量、回头率、供应商和所在地。
AliExpress 搜索结果中的商品:价格、订单数、评分、店铺。
商品在 eBay 上的实际成交情况:成交价、运费、成色、结束日期。适合价格调研与估值。
taobao-product根据商品链接给出新品零售价和促销信息。1688-products显示同类商品的批发价。aliexpress-products显示面向出口买家的价格。ebay-sold显示该商品在中国以外的成交价。
费用说明
按商品信息条数计费:开始运行时会预留最高费用,即单次调用费加上单条商品信息费用乘以 max_results,运行结束后按实际返回的数量结算,其余预留金额退回你的余额。运行失败或超时只为已交付的商品信息付费,开始时就被拒绝的运行不收费。
每天拉取 100 条商品信息,按每天 100 条商品信息计费。没有订阅,也没有每月最低消费:最低 $5 起充值,一份余额同时支付工具和模型。上方卡片显示今天的价格;定价列出了所有工具。
常见问题
可以用英文关键词吗?+
输入说明要求使用卖家所用的语言,大多数商品是中文。想要最好的覆盖面,请使用中文名称。
可以按价格筛选吗?+
可以,用 priceMin 和 priceMax(人民币)。还可以按 relevance、newest、priceAsc、priceDesc、priceDrop、modified 或 credit 排序。
最多能获取多少条商品信息?+
每次运行最多 300 条,默认 20 条。把 maxItems 和 max_results 设为你想要的数量。
可以用闲鱼链接来搜索吗?+
可以。把 Goofish 搜索链接粘贴到 searchUrls;设置后它会覆盖 keyword。
需要闲鱼账号吗?+
不需要。你只需发送关键词和一个 API 密钥。
需要订阅吗?+
不需要。你向预付费余额充值,每次运行从中扣减。失败的运行只为已交付的结果付费,也不会自动续费。