add_alert
重要提示:Content API for Shopping 将于 2026 年 8 月 18 日停用。
update
获取最新资讯
了解新的 Merchant API 功能、问题修复和更新。
Google uses AI technology to translate content into your preferred language. AI translations can contain errors.
日期范围
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
借助 Merchant Center 查询语言,您可以使用自定义日期范围或相对日期范围指定日期范围。所有指标请求都必须在 WHERE 子句中包含 segments.date 的条件,以指明您要检索效果数据的时间段。
自定义日期范围
您可以使用 ISO 8601(YYYY-MM-DD) 格式指定日期:
segments.date BETWEEN '2021-01-01' AND '2021-01-31'
或者:
segments.date >= '2021-01-01' AND segments.date <= '2021-01-31'
您可以使用英文单引号 (') 或英文双引号 (") 定义日期字符串。不过,您必须保持一致;例如,"2021-01-01' 不是有效的日期字符串。
相对日期范围
除了自定义日期范围之外,您还可以使用 DURING(而非 BETWEEN 和 AND)指定相对日期范围,例如 LAST_30_DAYS 或 THIS_MONTH:
WHERE segments.date DURING LAST_30_DAYS
如需查看可用的相对日期范围列表,请参阅 Merchant Center 查询语言语法。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-13。
[null,null,["最后更新时间 (UTC):2025-08-13。"],[],["The beta version of the Merchant API, the new Content API for Shopping, is introduced. All requests for performance metrics require a `segments.date` condition in the `WHERE` clause. Dates can be specified in ISO 8601 format within a custom range using `BETWEEN` or `\u003e=` and `\u003c=`. Alternatively, relative date ranges like `LAST_30_DAYS` can be specified with `DURING`. For a list of available date ranges, the grammar documentation should be consulted.\n"]]