Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/08/13 (UTC).
[null,null,["Dernière mise à jour le 2025/08/13 (UTC)."],[[["\u003cp\u003eThe Merchant API is the new version of the Content API for Shopping and represents the future of product data integration.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can learn more about the Merchant API and its benefits, as well as how to participate in shaping its future, in the official announcement blog post.\u003c/p\u003e\n"],["\u003cp\u003eThe Merchant Center Query Language uses a structured grammar, allowing developers to query data with clauses like \u003ccode\u003eSELECT\u003c/code\u003e, \u003ccode\u003eFROM\u003c/code\u003e, \u003ccode\u003eWHERE\u003c/code\u003e, \u003ccode\u003eORDER BY\u003c/code\u003e, and \u003ccode\u003eLIMIT\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eVarious operators such as comparison, range, list inclusion, and regular expression matching are supported within the \u003ccode\u003eWHERE\u003c/code\u003e clause to filter data effectively.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eREGEXP_MATCH\u003c/code\u003e operator leverages RE2 syntax for flexible and powerful regular expression-based filtering capabilities.\u003c/p\u003e\n"]]],["The beta version of the Merchant API, the new Content API for Shopping, is available. The Merchant Center Query Language uses a specific grammar, defined with regular expressions, including `SELECT`, `FROM`, `WHERE`, `ORDER BY`, and `LIMIT` clauses. Conditions use operators like `=`, `IN`, `CONTAINS`, and `DURING`, and values can be numbers, strings, or functions like `LAST_14_DAYS`. The `REGEXP_MATCH` operator employs RE2 syntax. The documentation details how to integrate and shape this API.\n"],null,["# Merchant Center Query Language grammar\n\nHere is the Merchant Center Query Language grammar reference (in regular expression notation): \n\n```googlesql\nQuery -\u003e SelectClause FromClause? WhereClause? OrderByClause? LimitClause?\nSelectClause -\u003e SELECT FieldName (, FieldName)*\nFromClause -\u003e FROM TableName\nWhereClause -\u003e WHERE Condition (AND Condition)*\nOrderByClause -\u003e ORDER BY Ordering (, Ordering)*\nLimitClause -\u003e LIMIT PositiveInteger\n\nCondition -\u003e FieldName Operator Value | FieldName BETWEEN Value AND Value\nOperator -\u003e = | != | \u003e | \u003e= | \u003c | \u003c= | \u003c\u003e | IN | NOT IN |\n CONTAINS ANY | CONTAINS ALL | CONTAINS NONE | DURING |\n LIKE | NOT LIKE | REGEXP_MATCH | NOT REGEXP_MATCH\nValue -\u003e Number | NumberList | String | StringList | Function\nOrdering -\u003e FieldName (ASC | DESC)?\n\nFieldName -\u003e [a-z] ([a-zA-Z0-9._])*\nTableName -\u003e [A-Z] ([a-zA-Z_])*\n\nStringList -\u003e ( String (, String)* )\nNumberList -\u003e ( Number (, Number)* )\n\nPositiveInteger -\u003e [1-9] ([0-9])*\nNumber -\u003e -? [0-9]+ (. [0-9] [0-9]*)?\nString -\u003e (' Char* ') | (\" Char* \")\nFunction -\u003e LAST_14_DAYS | LAST_30_DAYS | LAST_7_DAYS |\n LAST_BUSINESS_WEEK | LAST_MONTH | LAST_WEEK_MON_SUN |\n LAST_WEEK_SUN_SAT | THIS_MONTH | THIS_WEEK_MON_TODAY |\n THIS_WEEK_SUN_TODAY | TODAY | YESTERDAY\n```\n\n- `?`indicates an optional element.\n- `*` means zero or more; `+` means one or more.\n- `(xxxxxx)` indicates a grouping.\n- `[a-z0-9]` signifies character ranges.\n- `|` stands for \"or\".\n\n| **Key Point:** The `REGEXP_MATCH` operator uses [RE2 syntax](https://github.com/google/re2/wiki/Syntax)."]]