news-shopping
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseNews & Shopping Search with Serper
基于Serper的新闻与购物搜索
Access Google News and Google Shopping through x402-protected endpoints.
通过受x402保护的接口访问Google新闻和Google购物。
Setup
设置
See rules/getting-started.md for installation and wallet setup.
请查看rules/getting-started.md了解安装和钱包设置步骤。
Quick Reference
快速参考
| Task | Endpoint | Price | Description |
|---|---|---|---|
| News search | | $0.04 | Google News search |
| Shopping search | | $0.04 | Google Shopping search |
| 任务 | 接口地址 | 价格 | 描述 |
|---|---|---|---|
| 新闻搜索 | | $0.04 | Google新闻搜索 |
| 购物搜索 | | $0.04 | Google购物搜索 |
News Search
新闻搜索
Search Google News for articles:
bash
npx agentcash fetch https://stableenrich.dev/api/serper/news -m POST -b '{"q": "artificial intelligence regulation"}'Parameters:
- - Search query (required)
q - - Number of results (default: 10)
num - - Country code (e.g., "us", "uk", "de")
gl - - Language (e.g., "en", "es", "fr")
hl - - Time filter (qdr:h, qdr:d, qdr:w, qdr:m, qdr:y)
tbs
搜索Google新闻获取文章:
bash
npx agentcash fetch https://stableenrich.dev/api/serper/news -m POST -b '{"q": "artificial intelligence regulation"}'参数说明:
- - 搜索关键词(必填)
q - - 结果数量(默认:10)
num - - 国家代码(例如:"us"、"uk"、"de")
gl - - 语言(例如:"en"、"es"、"fr")
hl - - 时间筛选器(qdr:h、qdr:d、qdr:w、qdr:m、qdr:y)
tbs
Time Filters
时间筛选器
| Filter | Meaning |
|---|---|
| Past hour |
| Past 24 hours |
| Past week |
| Past month |
| Past year |
Example - news from past week:
bash
npx agentcash fetch https://stableenrich.dev/api/serper/news -m POST -b '{"q": "AI startups funding", "tbs": "qdr:w"}'| 筛选器 | 含义 |
|---|---|
| 过去1小时 |
| 过去24小时 |
| 过去一周 |
| 过去一个月 |
| 过去一年 |
示例 - 搜索过去一周的新闻:
bash
npx agentcash fetch https://stableenrich.dev/api/serper/news -m POST -b '{"q": "AI startups funding", "tbs": "qdr:w"}'Country/Language Filtering
国家/语言筛选
bash
npx agentcash fetch https://stableenrich.dev/api/serper/news -m POST -b '{"q": "technology news", "gl": "uk", "hl": "en"}'Returns:
- Article title and snippet
- Source/publication name
- Published date
- Article URL
- Thumbnail image (if available)
bash
npx agentcash fetch https://stableenrich.dev/api/serper/news -m POST -b '{"q": "technology news", "gl": "uk", "hl": "en"}'返回内容:
- 文章标题与摘要
- 来源/出版商名称
- 发布日期
- 文章链接
- 缩略图(如有)
Shopping Search
购物搜索
Search Google Shopping for products:
bash
npx agentcash fetch https://stableenrich.dev/api/serper/shopping -m POST -b '{"q": "wireless noise cancelling headphones"}'Parameters:
- - Search query (required)
q - - Number of results (default: 10)
num - - Country code for pricing/availability
gl - - Language
hl
Returns:
- Product title
- Price and currency
- Merchant/store name
- Product URL
- Rating (if available)
- Thumbnail image
搜索Google购物获取产品信息:
bash
npx agentcash fetch https://stableenrich.dev/api/serper/shopping -m POST -b '{"q": "wireless noise cancelling headphones"}'参数说明:
- - 搜索关键词(必填)
q - - 结果数量(默认:10)
num - - 用于定价/库存查询的国家代码
gl - - 语言
hl
返回内容:
- 产品标题
- 价格与货币
- 商家/店铺名称
- 产品链接
- 评分(如有)
- 缩略图
Shopping with Location
基于地区的购物搜索
Get local pricing and availability:
bash
npx agentcash fetch https://stableenrich.dev/api/serper/shopping -m POST -b '{"q": "MacBook Pro M3", "gl": "us"}'获取本地定价与库存信息:
bash
npx agentcash fetch https://stableenrich.dev/api/serper/shopping -m POST -b '{"q": "MacBook Pro M3", "gl": "us"}'Workflows
工作流
News Monitoring
新闻监控
- (Optional) Check balance:
npx agentcash wallet info - Search with appropriate time filter
- Review and summarize top stories
bash
npx agentcash fetch https://stableenrich.dev/api/serper/news -m POST -b '{"q": "company name OR competitor name", "tbs": "qdr:d", "num": 20}'- (可选)查看余额:
npx agentcash wallet info - 使用合适的时间筛选器进行搜索
- 查看并总结热门报道
bash
npx agentcash fetch https://stableenrich.dev/api/serper/news -m POST -b '{"q": "company name OR competitor name", "tbs": "qdr:d", "num": 20}'Breaking News Research
突发新闻调研
- Search with for past hour
qdr:h - Identify key sources and facts
- Note developing aspects
bash
npx agentcash fetch https://stableenrich.dev/api/serper/news -m POST -b '{"q": "breaking news topic", "tbs": "qdr:h"}'- 使用筛选过去1小时的内容
qdr:h - 识别核心来源与事实
- 记录事件进展
bash
npx agentcash fetch https://stableenrich.dev/api/serper/news -m POST -b '{"q": "breaking news topic", "tbs": "qdr:h"}'Product Research
产品调研
- Define search criteria (category, price range)
- Search Google Shopping
- Compare prices across merchants
- Present top options with pros/cons
bash
npx agentcash fetch https://stableenrich.dev/api/serper/shopping -m POST -b '{"q": "ergonomic office chair under $500", "num": 20}'- 定义搜索条件(品类、价格区间)
- 搜索Google购物
- 对比不同商家的价格
- 展示热门选项及优缺点
bash
npx agentcash fetch https://stableenrich.dev/api/serper/shopping -m POST -b '{"q": "ergonomic office chair under $500", "num": 20}'Price Comparison
价格对比
- Use exact product name/model
- Compare merchant prices
- Note shipping and availability
bash
npx agentcash fetch https://stableenrich.dev/api/serper/shopping -m POST -b '{"q": "exact product name model number"}'- 使用精确的产品名称/型号
- 对比不同商家的价格
- 记录运费与库存信息
bash
npx agentcash fetch https://stableenrich.dev/api/serper/shopping -m POST -b '{"q": "exact product name model number"}'Response Data
响应数据
News Article Fields
新闻文章字段
- - Article headline
title - - Article excerpt
snippet - - Publication name
source - - Published date
date - - Article URL
link - - Thumbnail (if available)
imageUrl
- - 文章标题
title - - 文章摘要
snippet - - 出版商名称
source - - 发布日期
date - - 文章链接
link - - 缩略图(如有)
imageUrl
Shopping Product Fields
购物产品字段
- - Product name
title - - Price with currency
price - - Merchant/store
source - - Product URL
link - - Star rating (if available)
rating - - Number of reviews
reviews - - Product image
imageUrl - - Shipping info (if available)
delivery
- - 产品名称
title - - 带货币的价格
price - - 商家/店铺
source - - 产品链接
link - - 星级评分(如有)
rating - - 评论数量
reviews - - 产品图片
imageUrl - - 配送信息(如有)
delivery
Tips
小贴士
News Search
新闻搜索
- Use quotes for exact phrases:
"climate change" - Use OR for alternatives:
AI OR "artificial intelligence" - Be specific to get relevant results
- Use time filters to avoid old news
- 使用引号精确匹配短语:
"climate change" - 使用OR表示可选关键词:
AI OR "artificial intelligence" - 搜索词越具体,结果越相关
- 使用时间筛选器避免过时新闻
Shopping Search
购物搜索
- Include brand/model for specific products
- Add "under $X" or "best" for filtered results
- Check parameter for accurate local pricing
gl - More results = better price comparison
- 搜索特定产品时包含品牌/型号
- 添加"under $X"或"best"进行筛选
- 检查参数获取准确的本地定价
gl - 结果越多,价格对比越全面
Cost Estimation
成本估算
Both endpoints are $0.04 per call.
| Task | Calls | Cost |
|---|---|---|
| Quick news check | 1 | $0.04 |
| Daily news summary | 2-3 | $0.08-0.12 |
| Product research | 1-2 | $0.04-0.08 |
| Full market research | 3-5 | $0.12-0.20 |
两个接口每次调用费用均为0.04美元。
| 任务 | 调用次数 | 成本 |
|---|---|---|
| 快速新闻查询 | 1 | $0.04 |
| 每日新闻汇总 | 2-3 | $0.08-0.12 |
| 产品调研 | 1-2 | $0.04-0.08 |
| 完整市场调研 | 3-5 | $0.12-0.20 |