newegg-product-search
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseNewegg Product Search
Newegg产品搜索
Search Newegg products via MCP over HTTP using standard JSON-RPC. Use the tool to call
the endpoint — no MCP client registration required.
bash通过HTTP协议基于标准JSON-RPC,借助MCP搜索Newegg产品。使用工具调用端点——无需注册MCP客户端。
bashAgent Execution Rules
Agent执行规则
- Do not ask for clarification. Infer and optional parameters from the user's message and call immediately.
query - Use the tool to run the curl command below.
bash - On curl failure or invalid JSON, report the error directly.
- 请勿请求澄清。从用户消息中推断及可选参数并立即调用。
query - 使用****工具运行下方的curl命令。
bash - 若curl调用失败或返回无效JSON,直接报告错误。
API Call
API调用
Required header on every request: all calls to must carry in addition to . It identifies the calling skill to the endpoint — include it even when you assemble a request by hand rather than copying an example below.
apis.newegg.com/ex-mcp/...x-skill: newegg-product-searchContent-Typebash
curl -sS -X POST "https://apis.newegg.com/ex-mcp/endpoint/product-search" \
-H "Content-Type: application/json" \
-H "x-skill: newegg-product-search" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "searchPost",
"arguments": {
"query": "<QUERY>"
}
}
}'Replace with the user's search term. Add optional fields inside as needed.
<QUERY>"arguments"If the call returns a tool-not-found error, first runto discover the correct tool name:tools/listbashcurl -sS -X POST "https://apis.newegg.com/ex-mcp/endpoint/product-search" \ -H "Content-Type: application/json" \ -H "x-skill: newegg-product-search" \ -d '{"jsonrpc":"2.0","id":0,"method":"tools/list"}'
每个请求必须包含的请求头:所有对的调用,除外,还必须携带。它用于向端点标识调用的Skill——即使您手动组装请求而非复制下方示例,也需包含此请求头。
apis.newegg.com/ex-mcp/...Content-Typex-skill: newegg-product-searchbash
curl -sS -X POST "https://apis.newegg.com/ex-mcp/endpoint/product-search" \
-H "Content-Type: application/json" \
-H "x-skill: newegg-product-search" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "searchPost",
"arguments": {
"query": "<QUERY>"
}
}
}'将替换为用户的搜索词。根据需要在内添加可选字段。
<QUERY>"arguments"若调用返回工具未找到错误,请先运行以发现正确的工具名称:tools/listbashcurl -sS -X POST "https://apis.newegg.com/ex-mcp/endpoint/product-search" \ -H "Content-Type: application/json" \ -H "x-skill: newegg-product-search" \ -d '{"jsonrpc":"2.0","id":0,"method":"tools/list"}'
Parameters
参数
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| string | Yes | — | Search keyword or product name |
| integer | No | | Sort order — see values below |
| integer | No | | Page number (min: 1) |
| number | No | null | Minimum price in USD (inclusive) |
| number | No | null | Maximum price in USD (inclusive) |
| 参数 | 类型 | 是否必填 | 默认值 | 说明 |
|---|---|---|---|---|
| 字符串 | 是 | — | 搜索关键词或产品名称 |
| 整数 | 否 | | 排序方式——查看下方取值 |
| 整数 | 否 | | 页码(最小值:1) |
| 数字 | 否 | null | 最低价格(美元,包含此值) |
| 数字 | 否 | null | 最高价格(美元,包含此值) |
order
Values
orderorder
取值
order| Value | Sort By |
|---|---|
| Best Rating |
| Lowest Price |
| Highest Price |
| Most Reviews |
| Name A → Z |
| Name Z → A |
| Featured (default) |
| Release Date |
| Best Selling |
| Seller Rating |
| Sales Volume |
Mapping user intent → order:
"cheapest" → · "most expensive" → · "best rated" → · "most reviewed" → · "newest" → · "best selling" →
23141415| 取值 | 排序依据 |
|---|---|
| 最佳评分 |
| 最低价格 |
| 最高价格 |
| 最多评论 |
| 名称A→Z |
| 名称Z→A |
| 精选商品(默认) |
| 发布日期 |
| 最畅销 |
| 卖家评分 |
| 销量 |
用户意图→order映射:
"最便宜"→ · "最贵"→ · "评分最高"→ · "评论最多"→ · "最新发布"→ · "最畅销"→
23141415Response Parsing
响应解析
The MCP response wraps a object. Parse the path:
PageProductsresponse → result.content[0].text → (parse as JSON) → PageProductsMCP响应封装了一个对象。解析路径:
PageProductsresponse → result.content[0].text →(解析为JSON)→ PageProductsPageProducts fields
PageProducts字段
| Field | Description |
|---|---|
| Current page number |
| Items per page (typically 20) |
| Total matching products |
| Total pages |
| Array of |
| 字段 | 说明 |
|---|---|
| 当前页码 |
| 每页商品数量(通常为20) |
| 匹配商品总数 |
| 总页数 |
| |
ProductItem fields
ProductItem字段
| Field | Description |
|---|---|
| Item number, e.g. |
| Product title |
| Current price, e.g. |
| Original price (show if differs from current) |
| Savings text, e.g. |
| Avg rating (0–5, one decimal), e.g. |
| Number of reviews, e.g. |
| Image filename for URL construction |
| |
URL construction:
- Product page:
https://www.newegg.com/p/{ItemNumber} - Product image:
https://c1.neweggimages.com/productimage/nb300/{ImageName}
| 字段 | 说明 |
|---|---|
| 商品编号,例如 |
| 商品标题 |
| 当前价格,例如 |
| 原价(与当前价格不同时显示) |
| 优惠信息,例如 |
| 平均评分(0–5,保留一位小数),例如 |
| 评论数量,例如 |
| 用于构建URL的图片文件名 |
| 若为翻新商品则为 |
URL构建:
- 商品页面:
https://www.newegg.com/p/{ItemNumber} - 商品图片:
https://c1.neweggimages.com/productimage/nb300/{ImageName}
Response Format
响应格式
undefinedundefinedNewegg Search: "{query}"
Newegg搜索:"{query}"
| # | Product | Price | Rating | Reviews |
|---|---|---|---|---|
| 1 | WebDescription | CurrentPriceText | ⭐ RatingOneDecimal | HumanRating |
| 2 | ... | ... | ... | ... |
📄 Page {page} / {totalPage} · {total} total results
🔗 View all on Newegg
- If item is on sale, append savings below its row: `> 💸 Save PriceSaveText (was OriginalPriceText)`
- If `IsRefurbished` is true, append `🔄 Refurbished` to the product name
- If price filter applied: `💰 Price: $minPrice – $maxPrice`
- If no results: inform the user and suggest broadening the search or removing filters
- Offer to load the next page if `page < totalPage`| # | 商品 | 价格 | 评分 | 评论数 |
|---|---|---|---|---|
| 1 | WebDescription | CurrentPriceText | ⭐ RatingOneDecimal | HumanRating |
| 2 | ... | ... | ... | ... |
📄 第 {page} 页 / 共 {totalPage} 页 · 共 {total} 个结果
🔗 在Newegg查看全部
- 若商品正在促销,在其行下方添加优惠信息:`> 💸 优惠 PriceSaveText(原价OriginalPriceText)`
- 若`IsRefurbished`为`true`,在商品名称后追加`🔄 翻新`
- 若应用了价格筛选:`💰 价格范围:$minPrice – $maxPrice`
- 若无结果:告知用户并建议扩大搜索范围或移除筛选条件
- 若`page < totalPage`,提供加载下一页的选项Edge Cases
边缘情况
- HTTP error or curl failure: Report status code and body; do not retry.
- in response: Display
result.errorto the user.error.message - Empty array: Tell the user no results were found; suggest adjusting
productsor removing price filters.query
- HTTP错误或curl调用失败:报告状态码和响应体;请勿重试。
- 响应中包含:向用户显示
result.error。error.message - 数组为空:告知用户未找到结果;建议调整
products或移除价格筛选。query