Оптимизируйте свои подборки
Сохраняйте и классифицируйте контент в соответствии со своими настройками.
Поскольку Content API позволяет вам программно взаимодействовать с Google Merchant Center, первым шагом к использованию Content API является настройка и тестирование вашей учетной записи Merchant Center.
Чтобы создать и протестировать учетную запись Merchant Center, выполните следующие действия:
В Merchant Center найдите уникальный идентификатор вашей учетной записи — номер в правом верхнем углу страницы над адресом электронной почты учетной записи.
Введите идентификатор вашего аккаунта в поле merchantId .
В разделе «Учетные данные» выберите Google OAuth 2.0 и API-ключ .
Нажмите «Выполнить» .
При появлении соответствующего запроса войдите в систему, используя учетную запись Google, связанную с вашей учетной записью Merchant Center.
Если ваш аккаунт Merchant Center настроен правильно, запрос будет выполнен успешно и вернёт код ответа HTTP 200. Однако, поскольку вы только что создали новый аккаунт, метод products.list может не вернуть ни одного товара. Далее в этом руководстве вы добавите товар, а затем снова вызовете products.list , чтобы убедиться в успешности операции.
[null,null,["Последнее обновление: 2025-08-13 UTC."],[[["\u003cp\u003eThe Merchant API beta is now available, offering a new and improved way to interact with Google Merchant Center.\u003c/p\u003e\n"],["\u003cp\u003eThis API is the future of the Content API for Shopping, providing enhanced integration capabilities.\u003c/p\u003e\n"],["\u003cp\u003eTo utilize the Merchant API, you need a Merchant Center account; detailed setup instructions are provided if you don't already have one.\u003c/p\u003e\n"],["\u003cp\u003eYou can test your Merchant Center account and API integration using the \u003ccode\u003eproducts.list\u003c/code\u003e request with your unique Merchant Center ID.\u003c/p\u003e\n"]]],["The Merchant API beta, the new version of the Content API for Shopping, is introduced. To use it, set up a Merchant Center account: sign up, verify and claim your website URL (unless using a third-party CSS), and set US tax settings. Locate your account's unique identifier. Test the setup by executing a `products.list` request via the API Explorer, entering your account ID, and authenticating with OAuth 2.0 and API key credentials. A successful setup yields a 200 HTTP response.\n"],null,["# Set up Merchant Center\n\nSince the Content API lets you programmatically interact with Google Merchant\nCenter, the first step to using the Content API is setting up and testing your\nMerchant Center account.\n| **Note:** If you already have a Merchant Center account, skip to step 3.\n\nTo create and test your Merchant Center account, complete the following steps:\n\n1. To create a new Merchant Center account, complete the steps in [Sign up for\n Google Merchant Center](//support.google.com/merchants/answer/188493).\n2. In [Merchant Center](//merchants.google.com/), configure the following account settings:\n 1. [Verify and claim your website\n URL](//support.google.com/merchants/answer/176793). Merchant accounts with approved third-party CSSs aren't required to claim a website.\n 2. [Set up tax settings (US only)](//support.google.com/merchants/answer/160162).\n3. In Merchant Center, find the unique identifier of your account, which is the number at the top-right corner of the page, above the account email address.\n4. Run a [`products.list` request using the API\n Explorer](/shopping-content/reference/rest/v2.1/products/list?apix=true).\n\n 1. Enter your account ID in the `merchantId` field.\n\n | **Note:** All other request parameters are optional.\n 1. In the **Credentials** section, select **Google OAuth 2.0** and **API\n key**.\n 2. Click **Execute**.\n 3. If prompted, sign in with the Google Account associated with your Merchant Center account.\n\nIf your Merchant Center account is configured correctly, the request succeeds\nand returns an HTTP response code 200. However, since you just created a new\naccount, the `products.list` method might not return any products. Later in this\nguide, you will add a product and then call `products.list` again to confirm\nthat the operation succeeded."]]