تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
يمكن أن تعرض خدمات مقارنة الأسعار (CSS) إعلانات Shopping على Google نيابةً عن التجّار في البلدان التي يتوفّر فيها برنامج CSS. تتيح Content API لنطاقات CSS ومجموعات CSS تنظيم حساباتها المرتبطة باستخدام التصنيفات. يمكن لنطاقات CSS إدراج حسابات Merchant Center المرتبطة بالنطاق وتصنيفها وفلترتها. يمكن لمجموعات CSS تصنيف نطاقات CSS التابعة للمجموعة وإدراجها. تقدّم خدمات Content API هذه بدائل برمجية لبعض الميزات المتوفّرة في Comparison Shopping Service Center.
مجموعات CSS هي حسابات المستوى الأعلى التي يمكن أن تحتوي على نطاق CSS واحد أو أكثر.
نطاقات CSS هي حسابات خاصة بخدمات مقارنة الأسعار نفسها، وهي تعرض إعلانات Shopping نيابةً عن التجّار. يمكن أن ينتمي كل نطاق CSS إلى مجموعة CSS واحدة فقط.
حسابات Merchant Center هي حسابات التجّار التي تعرض نطاقات CSS من خلالها إعلانات Shopping. يمكن ربط خدمات CSS بأنواع مختلفة من حسابات Merchant Center، بما في ذلك الحسابات المتعدّدة العملاء وحسابات التجار الفردية. يمكن ربط كل حساب على Merchant Center بنطاق واحد فقط من نطاقات CSS. لمزيد من المعلومات حول أنواع حسابات Merchant Center المختلفة، يُرجى الاطّلاع على أنواع الحسابات في Comparison Shopping Service Center.
أنواع التصنيفات في CSS
تستخدم خدمات مقارنة الأسعار نوعَين من التصنيفات:
يتم إنشاء التصنيفات اليدوية وتعيينها لحسابات Merchant Center من خلال نطاقات CSS، ولنطاقات CSS من خلال مجموعات CSS.
تنشئ خدمة CSS Center التصنيفات التلقائية وتعيّنها تلقائيًا لحسابات Merchant Center. تتوفّر التصنيفات التلقائية لأنواع مختلفة من مقاييس الحسابات، ويمكن أن تساعدك في تحديد الحسابات المهمة ونشاط الحسابات المهم.
توفّر Content API نقاط النهاية التالية لخدمات CSS:
accounts.labels: تتيح لك إنشاء واسترداد وتعديل التصنيفات لتطبيقها على نطاق CSS وحسابات Merchant Center. للاطّلاع على مثال، يُرجى الانتقال إلى إنشاء تصنيف.
accounts.list: تتيح لك استرداد جميع حسابات Merchant Center المرتبطة بنطاق CSS، بما في ذلك التصنيفات المطبّقة على كل حساب. يمكنك أيضًا الفلترة حسب التصنيف id
لاسترداد مجموعة فرعية من الحسابات المرتبطة. للاطّلاع على مثال، راجِع مقالة
استخدام التصنيفات لفلترة حسابات Merchant Center.
accounts.get: تتيح لك استرداد التصنيفات المطبّقة على حساب واحد على Merchant Center.
csses: تتيح لك هذه السمة عرض وإدارة عمليات الربط بين التصنيفات ونطاقات CSS. للاطّلاع على مثال، راجِع تطبيق تصنيف على نطاق CSS.
عند طلب نقاط نهاية accounts كنطاق CSS، يجب الانتباه إلى المتطلبات التالية:
يجب أن تقدّم نطاقات CSS cssId بدلاً من merchantId.
يجب أن توفّر نطاقات CSS مَعلمة طلب بحث view=CSS.
يجب أن توفّر نطاقات CSS رقم تعريف حساب Merchant Center المرتبط بها كـ accountId.
مثال: إنشاء تصنيف
يمكنك استخدام الطريقة accounts.labels.create لإنشاء تصنيف جديد. يمكن تطبيق التصنيفات على نطاقات CSS وحسابات Merchant Center. ومع ذلك، فإنّ تصنيفات أنواع الحسابات المختلفة منفصلة ولا يمكن استخدامها بشكل تبادلي. لإنشاء تصنيف على مستوى النطاق يمكن تطبيقه على حسابات Merchant Center المرتبطة بالنطاق، استخدِم رقم تعريف نطاق CSS كـ accountId عند إنشاء التصنيف. لإنشاء تصنيف على مستوى المجموعة يمكن تطبيقه على نطاقات CSS تابعة للمجموعة، استخدِم معرّف مجموعة CSS كـ accountId عند إنشاء التصنيف.
يوضّح المثال التالي كيفية إنشاء تصنيف على مستوى النطاق للحسابات الرئيسية، والذي يمكن تطبيقه بعد ذلك على حسابات Merchant Center المرتبطة بالنطاق. لإنشاء التصنيف، أرسِل طلب POST باستخدام عنوان URL ونص الطلب التاليَين:
{"name":"key-accounts","description":"All accounts with over a million products"}
مثال: تطبيق تصنيف على حساب Merchant Center
يمكنك استخدام الطريقة accounts.updatelabels لتعيين تصنيفات لحساب على Merchant Center مرتبط بنطاق CSS. يوضّح المثال التالي كيفية تطبيق التصنيف key-accounts الذي تم إنشاؤه في المثال السابق على أحد أهم حساباتك على Merchant Center.
لتطبيق التصنيف، أرسِل طلب POST باستخدام عنوان URL ونص الطلب التاليَين:
مثال: استخدام التصنيفات لفلترة حسابات Merchant Center
بعد إنشاء تصنيفات وتطبيقها على حسابات Merchant Center المرتبطة بنطاق CSS، يمكنك استخدام طريقة accounts.list وتمرير مَعلمة طلب البحث الخاصة بالتصنيف في طلبك لعرض الحسابات التي تحمل هذا التصنيف فقط. يوضّح المثال التالي كيفية فلترة حسابات Merchant Center المرتبطة بنطاق CSS، وذلك باستخدام id (123) لتصنيف key-accounts الذي تم إنشاؤه في مثال إنشاء تصنيف. لاسترداد الحسابات، أرسِل طلب GET باستخدام عنوان URL التالي:
يمكنك أيضًا استخدام الطريقة csses.updatelabels لتعيين تصنيفات لنطاق CSS تابع لمجموعة CSS. يوضّح المثال التالي كيفية تطبيق تصنيف على مستوى المجموعة key-domains تم إنشاؤه باستخدام طريقة accounts.labels.create على أحد أهم حسابات نطاق CSS. يُرجى العِلم أنّ تصنيفات نطاقات CSS وحسابات Merchant Center منفصلة. يجب إنشاء التصنيفات على مستوى المجموعة باستخدام معرّف مجموعة CSS كـ accountId.
لتطبيق التصنيف، أرسِل طلب POST باستخدام عنوان URL ونص الطلب التاليَين:
تاريخ التعديل الأخير: 2025-08-13 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","easyToUnderstand","thumb-up"],["ساعَدني المحتوى في حلّ مشكلتي.","solvedMyProblem","thumb-up"],["غير ذلك","otherUp","thumb-up"]],[["لا يحتوي على المعلومات التي أحتاج إليها.","missingTheInformationINeed","thumb-down"],["الخطوات معقدة للغاية / كثيرة جدًا.","tooComplicatedTooManySteps","thumb-down"],["المحتوى قديم.","outOfDate","thumb-down"],["ثمة مشكلة في الترجمة.","translationIssue","thumb-down"],["مشكلة في العيّنات / التعليمات البرمجية","samplesCodeIssue","thumb-down"],["غير ذلك","otherDown","thumb-down"]],["تاريخ التعديل الأخير: 2025-08-13 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eThe Merchant API is the new version of the Content API for Shopping and allows Comparison Shopping Services (CSSs) to manage accounts and data programmatically.\u003c/p\u003e\n"],["\u003cp\u003eCSSs can utilize the API to organize their associated accounts using labels, which can be manually created or automatically generated based on account metrics.\u003c/p\u003e\n"],["\u003cp\u003eThe API provides endpoints for creating, applying, and retrieving labels for both CSS domains and Merchant Center accounts.\u003c/p\u003e\n"],["\u003cp\u003eCSS domains have specific requirements when using the API, including using their \u003ccode\u003ecssId\u003c/code\u003e and specifying the \u003ccode\u003eview=CSS\u003c/code\u003e parameter.\u003c/p\u003e\n"],["\u003cp\u003eExamples are provided for creating labels, applying labels to accounts, filtering accounts by labels, and managing labels for CSS domains.\u003c/p\u003e\n"]]],["The Merchant API beta, a new version of the Content API for Shopping, allows Comparison Shopping Services (CSSs) to manage Merchant Center accounts. CSSs can use `accounts.labels` to create manual labels and `accounts.updatelabels` to apply them to Merchant Center accounts or CSS domains. `accounts.list` enables filtering Merchant Center accounts by label, and `csses` manages associations between labels and CSS domains. This allows for the creation of labels to identify important accounts and use them to filter and organize accounts.\n"],null,["# CSS label management\n\nComparison Shopping Services (CSSs) can place shopping ads on Google on behalf\nof merchants in countries where the CSS program is available. The Content API\nallows CSS domains and CSS groups to organize their associated accounts using\nlabels. CSS domains can list, label, and filter the Merchant Center accounts\nassociated with the domain. CSS groups can label and list the CSS domains\naffiliated with the group. These Content API services provide programmatic\nequivalents to some of the features available in the [Comparison Shopping\nService Center](//support.google.com/merchants/answer/9773265).\n\nFor more information about CSSs, see\n[Comparison Shopping Services](//support.google.com/merchants/topic/9080307).\nFor information on working with labels in CSS Center, see\n[Use account labels in Comparison Shopping Service Center](//support.google.com/merchants/answer/9773369).\n\nCSS account types\n-----------------\n\nCSSs use the following three types of accounts:\n\n- *CSS groups* are the top-level accounts that can contain one or multiple CSS domains.\n- *CSS domains* are the accounts for the CSSs themselves, which place Shopping ads on behalf of merchants. Each CSS domain can only belong to one CSS group.\n- *Merchant Center accounts* are the merchants for which CSS domains place Shopping ads. CSSs can be associated with several different types of Merchant Center accounts, including multi-client accounts (MCAs) and individual merchant accounts. Each Merchant Center account can only be associated with one CSS domain. For more information about different types of Merchant Center accounts, see [Account types in Comparison Shopping Service Center](//support.google.com/merchants/answer/9772965).\n\nCSS label types\n---------------\n\nCSSs use two types of labels:\n\n- *Manual labels* are created and assigned to Merchant Center accounts by CSS domains, and to CSS domains by CSS groups.\n- *Automatic labels* are automatically created and assigned to Merchant Center accounts by CSS Center. Automatic labels are available for different types of account metrics and can help you identify important accounts and significant account activity.\n\nFor more information about label types, including the available automatic\nlabels, see\n[Use account labels in Comparison Shopping Service Center](//support.google.com/merchants/answer/9773369).\n\nContent API functionality and endpoints for CSSs\n------------------------------------------------\n\nThe Content API offers the following endpoints for CSSs:\n\n- [`accounts.labels`](/shopping-content/reference/rest/v2.1/accounts.labels): Allows you to create, retrieve, and modify labels to apply to CSS domain and Merchant Center accounts. For an example, see [Creating a label](#create-label).\n- [`accounts.updatelabels`](/shopping-content/reference/rest/v2.1/accounts/updatelabels): Allows you to apply labels to a single Merchant Center account. For an example, see [Applying a label to a Merchant Center account](#apply-label).\n- [`accounts.list`](/shopping-content/reference/rest/v2.1/accounts/list): Allows you to retrieve all the Merchant Center accounts associated with a CSS domain, including the labels applied to each account. You can also filter by label `id` to retrieve a subset of associated accounts. For an example, see [Using labels to filter Merchant Center accounts](#filter).\n- [`accounts.get`](/shopping-content/reference/rest/v2.1/accounts/get): Allows you to retrieve the labels applied to a single Merchant Center account.\n- [`csses`](/shopping-content/reference/rest/v2.1/csses): Allows you to view and manage the associations between labels and CSS domains. For an example, see [Applying a label to a CSS domain](#domain-label).\n\nWhen calling `accounts` endpoints as a CSS domain, be aware of the following\nrequirements:\n\n- CSS domains must provide their `cssId` instead of a `merchantId`.\n- CSS domains must provide a query parameter of `view=CSS`.\n- CSS domains must provide their associated Merchant Center account id as the `accountId`.\n\n| **Note:** Only CSS domain and CSS group accounts can use labels. Merchant Center accounts themselves do not have access to the label functionality.\n\nExample: Create a label\n-----------------------\n\nYou can use the `accounts.labels.create` method to create a new label. Labels\ncan be applied to CSS domains and Merchant Center accounts. However, labels for\nthe different account types are separate and cannot be used interchangeably. To\ncreate a domain-level label, which can be applied to Merchant Center accounts\nassociated with the domain, use the CSS domain ID as the `accountId` when\ncreating the label. To create a group-level label, which can be applied to CSS\ndomains affiliated with the group, use the CSS group ID as the `accountId` when\ncreating the label.\n\nThe following example demonstrates how to create a **domain-level** key-accounts\nlabel, which can then be applied to Merchant Center accounts associated with the\ndomain. To create the label, make a `POST` request using the following URL and\nrequest body: \n\n https://shoppingcontent.googleapis.com/content/v2.1/accounts/\u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-nt\"\u003eaccountId\u003c/span\u003e\u003c/var\u003e/labels\n\n {\n \"name\": \"key-accounts\",\n \"description\": \"All accounts with over a million products\"\n }\n\nExample: Apply a label to a Merchant Center account\n---------------------------------------------------\n\nYou can use the `accounts.updatelabels` method to assign labels to a Merchant\nCenter account associated with a CSS domain. The following example demonstrates\nhow to apply the **key-accounts** label created in the previous example to one\nof your most important Merchant Center accounts.\n| **Note:** You must use the `id` of the label, not the name, when applying a label to a Merchant Center account. The `id` is automatically assigned to the label and returned in the response when the label is created. You can also retrieve the label `id` by calling `accounts.labels.list`.\n\nTo apply the label, make a `POST` request using the following URL and request\nbody: \n\n https://shoppingcontent.googleapis.com/content/v2.1/\u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-nt\"\u003ecssId\u003c/span\u003e\u003c/var\u003e/accounts/\u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-nt\"\u003esubaccountId\u003c/span\u003e\u003c/var\u003e/updatelabels/\n\n {\n \"labelIds\": ['123'] // 'key-accounts'\n }\n\nExample: Use labels to filter Merchant Center accounts\n------------------------------------------------------\n\nAfter creating and applying labels to the Merchant Center accounts associated\nwith a CSS domain, you can use the `accounts.list` method and pass the label\nquery parameter in your request to return only the accounts with that label. The\nfollowing example demonstrates how to filter the Merchant Center accounts\nassociated with a CSS domain, using the `id` (`123`) of the **key-accounts**\nlabel created in the [Creating a label](#create-label) example. To retrieve the\naccoungs, make a `GET` request using the following URL: \n\n https://shoppingcontent.googleapis.com/content/v2.1/\u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-nt\"\u003ecssId\u003c/span\u003e\u003c/var\u003e/accounts?view=CSS&label=123\n\nNo request body is needed.\n\nExample: Apply a label to a CSS domain\n--------------------------------------\n\nYou can also use the `csses.updatelabels` method to assign labels to a CSS\ndomain affiliated with a CSS group. The following example demonstrates how to\napply a **key-domains** group-level label created using the\n`accounts.labels.create` method to one of your most important CSS domain\naccounts. Keep in mind that labels for CSS domains and Merchant Center accounts\nare separate. Group-level labels must be created using a CSS group ID as its\n`accountId`.\n| **Note:** You must use the `id` of the label, not the name, when applying a label to a CSS domain. The `id` is automatically assigned to the label and returned in the response when the label is created. You can also retrieve the label `id` by calling `accounts.labels.list`.\n\nTo apply the label, make a `POST` request using the following URL and request\nbody: \n\n https://shoppingcontent.googleapis.com/content/v2.1/\u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-nt\"\u003ecssGroupId\u003c/span\u003e\u003c/var\u003e/csses/\u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-nt\"\u003ecssDomainId\u003c/span\u003e\u003c/var\u003e/updatelabels/\n\n {\n \"labelIds\": ['456'] // 'key-domains'\n }"]]