Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Vì Content API cho phép bạn tương tác với Google Merchant Center theo cách lập trình, nên bước đầu tiên để sử dụng Content API là thiết lập và kiểm thử tài khoản Merchant Center.
Để tạo và kiểm thử tài khoản Merchant Center, hãy hoàn tất các bước sau:
Trong Merchant Center, hãy tìm giá trị nhận dạng riêng biệt của tài khoản. Đây là số ở góc trên cùng bên phải của trang, phía trên địa chỉ email của tài khoản.
Trong phần Thông tin xác thực, hãy chọn Google OAuth 2.0 và Khoá API.
Nhấp vào Thực thi.
Nếu được nhắc, hãy đăng nhập bằng Tài khoản Google được liên kết với tài khoản Merchant Center của bạn.
Nếu bạn định cấu hình tài khoản Merchant Center đúng cách, thì yêu cầu sẽ thành công và trả về mã phản hồi HTTP 200. Tuy nhiên, vì bạn vừa tạo một tài khoản mới, nên phương thức products.list có thể không trả về bất kỳ sản phẩm nào. Sau đó trong hướng dẫn này, bạn sẽ thêm một sản phẩm rồi gọi lại products.list để xác nhận rằng thao tác đã thành công.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 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,["| Meet the [Merchant API (beta)](/merchant/api) - the official successor to the Content\n| API for Shopping.\n|\n|\n| [Get the latest](/merchant/api/latest-updates) on new features, bug fixes, and release\n| updates of the Merchant API (beta).\n|\n|\n| Learn how to manage your business and products on Google and how to get programmatic access to\n| data, insights, and unique capabilities at scale. [Get\n| started now](/merchant/api/guides/quickstart)\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."]]