rocket
Scopri l'
API Merchant, il successore ufficiale dell'API Content for Shopping.
add_alert
Nota: l'API Content for Shopping verrà ritirata il 18 agosto 2026.
Intervalli di date
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Il linguaggio di query di Merchant Center ti consente di specificare un intervallo di date utilizzando un intervallo di date personalizzato o relativo. Tutte le richieste di metriche devono includere una condizione per
segments.date
nella clausolaWHERE
per indicare il periodo di tempo da cui
vuoi recuperare i dati sul rendimento.
Intervallo di date personalizzato
Puoi specificare le date nel formato ISO 8601(AAAA-MM-GG):
segments.date BETWEEN '2021-01-01' AND '2021-01-31'
OPPURE:
segments.date >= '2021-01-01' AND segments.date <= '2021-01-31'
Puoi definire le stringhe di data con virgolette singole ('
) o doppie
("
). Tuttavia, devi essere coerente. Ad esempio, "2021-01-01'
non è una
stringa di data valida.
Intervallo date relativo
Oltre agli intervalli di date personalizzati, puoi specificare un intervallo di date relativo, ad esempio LAST_30_DAYS
o THIS_MONTH
, utilizzando DURING
anziché BETWEEN
e AND
:
WHERE segments.date DURING LAST_30_DAYS
Consulta la
grammatica del linguaggio di query Merchant Center
per l'elenco degli intervalli di date relative disponibili.
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2025-08-13 UTC.
[null,null,["Ultimo aggiornamento 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."]]