rocket
ขอแนะนำ
Merchant API
ซึ่งเป็นเวอร์ชันต่อไปอย่างเป็นทางการของ Content API for Shopping
update
รับข้อมูลล่าสุด
เกี่ยวกับฟีเจอร์ใหม่ การแก้ไขข้อบกพร่อง และการอัปเดตของ Merchant API
add_alert
หมายเหตุ: Content API for Shopping จะหยุดให้บริการในวันที่ 18 สิงหาคม 2026
ช่วงวันที่
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
ภาษาการค้นหาของ Merchant Center ช่วยให้คุณระบุช่วงวันที่ได้โดยใช้ช่วงวันที่ที่กำหนดเอง
หรือช่วงวันที่แบบสัมพัทธ์ คำขอเมตริกทั้งหมดต้องมีเงื่อนไขสำหรับsegments.date
ในWHERE
ข้อเพื่อระบุระยะเวลาที่คุณต้องการดึงข้อมูลประสิทธิภาพ
กำหนดช่วงวันที่เอง
คุณระบุวันที่ในรูปแบบ 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'
ไม่ใช่สตริงวันที่ที่ถูกต้อง
ช่วงวันที่สัมพัทธ์
นอกเหนือจากช่วงวันที่ที่กำหนดเอง คุณยังระบุช่วงวันที่ที่เกี่ยวข้อง เช่น LAST_30_DAYS
หรือ THIS_MONTH
ได้โดยใช้ DURING
แทน BETWEEN
และ AND
WHERE segments.date DURING LAST_30_DAYS
ดูรายการช่วงวันที่แบบสัมพัทธ์ที่ใช้ได้ใน
ไวยากรณ์ของภาษาการค้นหาของ Merchant Center
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 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."]]