使用场景

买入或上架之前,先查清闲鱼上二手商品的真实成交行情

按关键词搜索闲鱼(Goofish),以 JSON 获取二手商品,含价格、原价、成色、城市、卖家和日期,用于二手转售的价格调研。

预付费,无订阅REST 或 MCP一个密钥搞定模型、数据和智能体
XianyuGoofishlovelyjsonitems[0]"title": "iPhone 15 Pro 256G 99…"price": "5,200""original_price": "8,999""condition": "Like new""city": "Shenzhen""posted": "2026-10-26"

如果你倒卖二手电子产品、给以旧换新定价,或者想知道某个商品在中国贬值有多快,你需要的数字是人们在二手市场上的实际报价,而不是零售价。闲鱼上就有这个数字,只是散落在成千上万条中文商品信息里。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>
01

工作原理

010203
  1. 选好关键词和筛选条件

    使用卖家写商品时用的名称,通常是中文。再加上价格区间、排序方式,以及商品发布时间的新旧范围。

  2. 设置上限后运行工具

    把关键词连同 max_results 发送到 POST /v1/tools/xianyu-listings/run。运行会从你的余额中预留它的最高费用,并以 JSON 返回商品信息。

  3. 算出市场价

    取报价的中位数,与原价对比,再看成色和城市如何影响价格。

02

一次请求搜索闲鱼

搜索闲鱼二手商品接受一个 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;运行工具介绍了如何轮询。

03

每条商品信息包含什么

字段分组包含内容
商品标题和照片
价格报价和原价
成色卖家自述的成色
地点卖家所在城市
卖家卖家
时间发布日期

文本按卖家的原文返回,也就是中文。可以在同一个任务里让模型翻译标题并统一成色描述。

04

实用做法

给以旧换新计划定价。

搜索你接收的每个型号,取最近 14 天报价的中位数,再把你的收购价定为它的一个比例。

发现低价商品。

按 priceAsc 排序,并用 priceMin 剔除无效的低价信息,标出明显低于同型号中位数的商品。

衡量贬值幅度。

对比整个产品线的价格与原价。每月重跑一次,看每个型号贬值有多快。

留意降价。

对某个关键词按 priceDrop 排序,找出正在降价的卖家。

翻译采购清单。

用中文关键词搜索你想买的商品,用模型翻译标题,再按城市和价格筛出候选。

想用大白话操作?连接 MCP 服务器,然后对 Claude Code 或 Cursor 说:"在闲鱼上搜索这款相机镜头的中文名称,限定最近 7 天发布,给我报价中位数、最便宜的五条以及它们所在的城市。把 max_results 设为 100。"

06

费用说明

按商品信息条数计费:开始运行时会预留最高费用,即单次调用费加上单条商品信息费用乘以 max_results,运行结束后按实际返回的数量结算,其余预留金额退回你的余额。运行失败或超时只为已交付的商品信息付费,开始时就被拒绝的运行不收费。

每天拉取 100 条商品信息,按每天 100 条商品信息计费。没有订阅,也没有每月最低消费:最低 $5 起充值,一份余额同时支付工具和模型。上方卡片显示今天的价格;定价列出了所有工具。

07

常见问题

?
可以用英文关键词吗?+

输入说明要求使用卖家所用的语言,大多数商品是中文。想要最好的覆盖面,请使用中文名称。

可以按价格筛选吗?+

可以,用 priceMin 和 priceMax(人民币)。还可以按 relevance、newest、priceAsc、priceDesc、priceDrop、modified 或 credit 排序。

最多能获取多少条商品信息?+

每次运行最多 300 条,默认 20 条。把 maxItems 和 max_results 设为你想要的数量。

可以用闲鱼链接来搜索吗?+

可以。把 Goofish 搜索链接粘贴到 searchUrls;设置后它会覆盖 keyword。

需要闲鱼账号吗?+

不需要。你只需发送关键词和一个 API 密钥。

需要订阅吗?+

不需要。你向预付费余额充值,每次运行从中扣减。失败的运行只为已交付的结果付费,也不会自动续费。

要从中国采购?请参阅淘宝与天猫商品数据、电商情报以及工具目录中的其他内容。

一个预付费密钥,搞定模型、数据和智能体

无需订阅。充值后按需使用,每笔费用都能在日志中查看。