news-shopping

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

News & 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

快速参考

TaskEndpointPriceDescription
News search
https://stableenrich.dev/api/serper/news
$0.04Google News search
Shopping search
https://stableenrich.dev/api/serper/shopping
$0.04Google Shopping search
任务接口地址价格描述
新闻搜索
https://stableenrich.dev/api/serper/news
$0.04Google新闻搜索
购物搜索
https://stableenrich.dev/api/serper/shopping
$0.04Google购物搜索

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:
  • q
    - Search query (required)
  • num
    - Number of results (default: 10)
  • gl
    - Country code (e.g., "us", "uk", "de")
  • hl
    - Language (e.g., "en", "es", "fr")
  • tbs
    - Time filter (qdr:h, qdr:d, qdr:w, qdr:m, qdr:y)
搜索Google新闻获取文章:
bash
npx agentcash fetch https://stableenrich.dev/api/serper/news -m POST -b '{"q": "artificial intelligence regulation"}'
参数说明:
  • q
    - 搜索关键词(必填)
  • num
    - 结果数量(默认:10)
  • gl
    - 国家代码(例如:"us"、"uk"、"de")
  • hl
    - 语言(例如:"en"、"es"、"fr")
  • tbs
    - 时间筛选器(qdr:h、qdr:d、qdr:w、qdr:m、qdr:y)

Time Filters

时间筛选器

FilterMeaning
qdr:h
Past hour
qdr:d
Past 24 hours
qdr:w
Past week
qdr:m
Past month
qdr:y
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"}'
筛选器含义
qdr:h
过去1小时
qdr:d
过去24小时
qdr:w
过去一周
qdr:m
过去一个月
qdr:y
过去一年
示例 - 搜索过去一周的新闻:
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:
  • q
    - Search query (required)
  • num
    - Number of results (default: 10)
  • gl
    - Country code for pricing/availability
  • hl
    - Language
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
    - 搜索关键词(必填)
  • num
    - 结果数量(默认:10)
  • 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
    qdr:h
    for past hour
  • 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"}'
  • 使用
    qdr:h
    筛选过去1小时的内容
  • 识别核心来源与事实
  • 记录事件进展
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

新闻文章字段

  • title
    - Article headline
  • snippet
    - Article excerpt
  • source
    - Publication name
  • date
    - Published date
  • link
    - Article URL
  • imageUrl
    - Thumbnail (if available)
  • title
    - 文章标题
  • snippet
    - 文章摘要
  • source
    - 出版商名称
  • date
    - 发布日期
  • link
    - 文章链接
  • imageUrl
    - 缩略图(如有)

Shopping Product Fields

购物产品字段

  • title
    - Product name
  • price
    - Price with currency
  • source
    - Merchant/store
  • link
    - Product URL
  • rating
    - Star rating (if available)
  • reviews
    - Number of reviews
  • imageUrl
    - Product image
  • delivery
    - Shipping info (if available)
  • 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
    gl
    parameter for accurate local pricing
  • More results = better price comparison
  • 搜索特定产品时包含品牌/型号
  • 添加"under $X"或"best"进行筛选
  • 检查
    gl
    参数获取准确的本地定价
  • 结果越多,价格对比越全面

Cost Estimation

成本估算

Both endpoints are $0.04 per call.
TaskCallsCost
Quick news check1$0.04
Daily news summary2-3$0.08-0.12
Product research1-2$0.04-0.08
Full market research3-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