rocket
Content API for Shopping の正式な後継である
Merchant API をご紹介します。
update
Merchant API の新機能、バグの修正、更新に関する
最新情報を入手してください。
add_alert
注: Content API for Shopping は 2026 年 8 月 18 日に廃止されます。
期間
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
Merchant Center Query Language では、カスタムまたは相対的な期間を使用して期間を指定できます。指標のリクエストにはすべて、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'
は有効な日付文字列ではありません。
相対的な期間
カスタムの期間に加えて、BETWEEN
と AND
の代わりに DURING
を使用して、LAST_30_DAYS
や THIS_MONTH
などの相対的な期間を指定できます。
WHERE segments.date DURING LAST_30_DAYS
使用可能な相対日付範囲のリストについては、Merchant Center Query Language の文法をご覧ください。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-08-13 UTC。
[null,null,["最終更新日 2025-08-13 UTC。"],[[["\u003cp\u003eThe Merchant API is the new version of the Content API for Shopping and represents the future of the platform.\u003c/p\u003e\n"],["\u003cp\u003eAll Merchant Center Query Language requests for metrics require a \u003ccode\u003esegments.date\u003c/code\u003e condition in the \u003ccode\u003eWHERE\u003c/code\u003e clause to specify the desired time period for performance data retrieval.\u003c/p\u003e\n"],["\u003cp\u003eDate ranges can be specified using custom ISO 8601 formatted dates or relative date ranges like \u003ccode\u003eLAST_30_DAYS\u003c/code\u003e using \u003ccode\u003eDURING\u003c/code\u003e in the \u003ccode\u003eWHERE\u003c/code\u003e clause.\u003c/p\u003e\n"]]],["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"],null,["# Date ranges\n\nThe Merchant Center Query Language lets you specify a date range using a custom\nor relative date range. **All requests for metrics must include a condition for\n`segments.date` in the`WHERE` clause** to indicate the time period from which\nyou want to retrieve your performance data.\n\nCustom date range\n-----------------\n\nYou can specify dates in ISO 8601(YYYY-MM-DD) format: \n\n segments.date BETWEEN '2021-01-01' AND '2021-01-31'\n\nOR: \n\n segments.date \u003e= '2021-01-01' AND segments.date \u003c= '2021-01-31'\n\nYou can define date strings with either single quotes (`'`) or double quotes\n(`\"`). However, you must be consistent; for example: `\"2021-01-01'` is not a\nvalid date string.\n\nRelative date range\n-------------------\n\nIn addition to custom date ranges, you can specify a relative date range such\nas `LAST_30_DAYS` or `THIS_MONTH` by using `DURING` instead of `BETWEEN` and\n`AND`: \n\n WHERE segments.date DURING LAST_30_DAYS\n\nCheck out the\n[Merchant Center Query Language grammar](/shopping-content/guides/reports/query-language/grammar)\nfor the list of available relative date ranges."]]