Google Shopping - Merchant API for Magento 2
Test out this module for Free
Google Shopping - Merchant API
Check your email
We've sent a confirmation link. Click it to spin up your demo.
Setting up your demo...
This usually takes a few minutes. You can close this modal or wait for the result — we'll also send you an email when it's ready.
You're in the queue
Position: #
All demo slots are currently in use. You'll receive an email as soon as your demo is ready.
Your demo is ready!
Expires:
Credentials have also been sent to your email.
Something went wrong
We couldn't set up your demo. Please try again or contact support.
This module requires:


Google Merchant API Sync for Magento 2
Product Changes Pushed to Google Merchant Center Within Minutes
The Google Shopping - Merchant API extension connects Magento 2 directly to Google Merchant Center through the official Google Merchant API. When a price, stock level or attribute changes in Magento, the extension sends that one product to Google instead of waiting for the next feed fetch.
Price and stock changes are put on the queue every 2 minutes, other product changes every 5 minutes. That keeps the product data behind your Google Shopping campaigns in line with your store, also during a sale or when stock runs low.
It is an add-on for the Google Shopping Feed extension and uses the same attribute mapping and product filters. The feed stays your complete baseline, the API takes care of what changes in between.

Direct Merchant API Connection
REST calls to the official Google Merchant API with a Google Service Account, without external Google libraries.
Price and Stock Every 2 Minutes
A separate inventory sync queues changes in price, sale price and availability every 2 minutes.
Only What Changed
An indexer flags changed products and a hash check skips the API call when the data is the same as the last sync.
Works with the Feed Extension
Attribute mapping, filters and Offer ID come from Google Shopping Feed, so feed and API update the same product.
Set Up per Store View
Every store view has its own API data source, target country and content language.
Status, Batches and Logs
A status per product, an overview of every sync batch, debug logging and CLI commands show what was sent and what failed.
From Product Change to Google Merchant Center Within Minutes
The extension adds its own indexer, "Google Shopping API Product", that flags a product when its data changes. It watches the product tables themselves: product data and attributes, stock, website and category assignment, tier prices and the media gallery.
- The indexer flags the changed product.
- Cron puts flagged products on the queue: price and stock changes every 2 minutes, full product updates every 5 minutes, up to the "Batch Size" (10 to 1000, default 100) per store view per run.
- Two queue consumers send the updates to the Merchant API.
- Before a call goes out, a hash of the fresh data is compared with the last synced version. If nothing changed, no API call is made.
"Auto Sync Enabled" is off by default, so nothing leaves the store until you turn it on. A nightly check at 02:00 picks up products that are new in your feed selection. Products that dropped out of the feed are only removed from Merchant Center when "Delete Products Not in Feed" is set to "Yes"; the default is "No".
Full Sync and Inventory Sync
A full sync sends all the product data from your feed mapping. An inventory sync sends only price, sale price, sale price effective date and availability: a small payload for the changes that happen most often.


Merchant API or Google Shopping Feed: What Is the Difference?
The Google Shopping Feed extension writes your catalog to an XML file that Google fetches on a schedule, for example daily or hourly. That is a solid baseline, but a price you change at 10:00 only reaches Google at the next fetch.
This extension adds a direct connection. It does not wait for a fetch: it pushes the single product that changed to Merchant Center.
- Google Shopping Feed: the full catalog in one file, picked up on a schedule, in a file data source in Merchant Center.
- Merchant API: one call per changed product, queued every 2 or 5 minutes, in an API data source in Merchant Center.
It is a near real-time connection, not an instant one. Updates pass through Magento cron and the message queue, so a large import is processed in batches instead of in one go.
Both routes use the same Offer ID, taken from the id mapping in the feed settings, so Google sees one product. Keep the feed running as the safety net for the full catalog and let the API handle what changes in between. The extension requires Google Shopping Feed 2.12.0 or higher.
Connect with a Google Service Account
Enter the "Merchant ID" of your Merchant Center account and paste the key file of a Google Cloud service account into "Service Account JSON". The key is stored encrypted in the Magento configuration. A test button below the fields checks the connection before you turn anything on.
The extension talks to merchantapi.googleapis.com with Magento's own HTTP client, so there are no external Google libraries to install or keep up to date.
"Enable Module" is off by default. Set it to "Yes" once the connection test passes.


Current Prices and Stock in Your Google Shopping Campaigns
Shopping campaigns show the price and availability that Google has in Merchant Center. When a sale starts or a product sells out, every hour that Google still holds the old value is an hour in which your ad and your product page disagree.
That is what the inventory sync is for. A change in price, sale price, sale price dates or availability is queued within 2 minutes and sent as a small update with only those fields. With the indexer on "Update on Save", the extension recognises a save that only touched price fields and picks this lighter route by itself.
The extension does not create or manage campaigns or bids. It keeps the product data they run on up to date.
One API Data Source per Store View
Each store view gets its own data source in Merchant Center, so you can serve several countries and languages from one Magento installation. The "API Data Sources" table in the "Data Source" group lists every store view with its data source, its status and a "Test" and "Configure" button.
"Configure" takes you to the store view, where you set:
- "Status": turn the sync on or off for this store view.
- "API Data Source ID": the numeric ID of the API data source. Create it in Merchant Center under Products > Feeds > Add data source > API.
- "Feed Label (Target Country)": the country the products are meant for.
- "Content Language": the language of the product content.


Sync Status per Product in the Magento Admin
Under "Marketing" > "Google Shopping API" > "Products" you see every product per store view with its SKU, Offer ID, status, error message and the time of the last sync. A product is Pending, Queued, Synced, Error, Pending Delete or Disabled, so one filter shows what still needs attention.
"Initialize Products" loads the products from your feed selection into the grid. From there you work with mass actions:
- "Sync to Google (Full)" and "Sync Inventory (Price/Stock)": send the selected products yourself.
- "Flag for Full Update" and "Flag for Inventory Update": mark them for the next cron run.
- "Disable Sync" and "Enable Sync": keep individual products out of the sync or bring them back.
Sync Batches and Retries
"Sync Batches", in the same menu, records every run: the store view, the type (Product or Inventory), the number of products, how many succeeded and failed, the duration and the start and end time. With "Retry Failed" you send the failed products of a batch again.
Temporary problems are handled automatically. On a rate limit (HTTP 429) or a server error (5xx) the extension tries up to 3 times, with a longer pause after each attempt.
A product that still fails gets the status Error with the message from Google. You fix the data and sync it again from the grid.


Debug Logging and CLI Commands
Turn on "Debug Mode" in the "Debug & Logging" group and every API request and response is written to debug.log. Errors always go to error.log, also with debug mode off. Both logs can be opened from the configuration. The sync log entries the extension keeps are cleaned up every night according to "Log Retention (Days)", 30 by default.
There are six CLI commands: googleshopping:api:initialize, googleshopping:api:sync, googleshopping:api:sync-check, googleshopping:api:status, googleshopping:api:test and googleshopping:api:test-connection.
The sync command accepts --store, --limit, --product-id for one product, --inventory for price and stock only, --force to skip the change check and --dry-run to see what would be sent without making an API call.
Google Shopping - Merchant API for Magento 2: Technical Details for Developers and Store Owners
The Advantages for Developers
- Own indexer
googleshopping_api_productwith mview subscriptions on the product, EAV, stock, website, category, tier price and media gallery tables. - Two queue consumers,
googleshopping.product.syncandgoogleshopping.inventory.sync, on thedbconnection, so a message broker such as RabbitMQ is not required. The consumers do have to run, for example through Magento cron. - A REST client on Magento's own HTTP client against
merchantapi.googleapis.com, without external Google libraries. - Change detection with separate hashes for full product data and for inventory fields.
- Up to 3 attempts with an increasing pause on HTTP 429 and 5xx responses.
- Six CLI commands under
googleshopping:api:, including--dry-runand--forceon the sync command. - Backend only: the module adds nothing to the storefront, so it runs the same with any theme.
- Requires PHP 8.1 or higher and
magmodules/m2-googleshopping2.12.0 or higher.
Good to Know for Store Owners
- This is an add-on. You need the Google Shopping Feed extension; your product selection and attribute mapping come from there.
- You need a Google Merchant Center account, a Google Cloud service account and one API data source per store view.
- "Enable Module" and "Auto Sync Enabled" are off by default. Nothing is sent until you turn both on.
- Price and stock changes are queued every 2 minutes, other product changes every 5 minutes.
- Products are only removed from Merchant Center when "Delete Products Not in Feed" is set to "Yes".
- Every product shows its sync status in the admin, and a failed product shows the error message from Google.
Keep Google Merchant Center in Step with Your Magento 2 Catalog
Add the Merchant API connection to your Google Shopping Feed and send price, stock and product changes to Google within minutes instead of at the next feed fetch.
The setup takes a Merchant ID, a service account key and one data source per store view.
Knowledgebase
All familiar Help articles
A list of the most frequently asked questions from the Google Shopping - Merchant API extension for Magento 2. We've tried our best to help you with the installation, configuration and troubleshooting. If you do not find the answer you were looking for, you can always send us a message through this form.
Installation articles
Installation using Composer (recommended)Configuration
Google Cloud Service Account SetupChangelog 0.9.0 is released on 3 March 2026
Our plugins are regularly updated to ensure compatibility with the latest Magento release.
-
Features:
- Real-time product synchronization with Google Merchant Center via the Content API as an alternative to XML feed delivery.
- Dual sync paths: full product updates or inventory-only updates (price/stock) for higher throughput.
- Hash-based change detection to skip unnecessary API calls when product data has not changed.
- Queue-driven batch processing using Magento message queue (db connection) with configurable batch sizes (10–1000).
- Mview indexer subscribed to relevant catalog and inventory tables to automatically flag changed products.
- Cron-based publishers: product sync every 5 minutes, inventory sync every 2 minutes, daily sync check at 2 AM, and log cleanup at 3 AM.
- Google Service Account authentication with JWT-based OAuth2 token exchange without external libraries.
- Per-product error tracking with automatic retries after configurable hours.
- Admin product grid with sync status, last synced timestamp, error messages, and bulk actions (sync, flag, enable/disable, delete).
- Admin batch grid with batch progress, success/error counts, processing time, and retry capability.
- Real-time log stream viewer in admin.
- Selftest and version check following Magmodules module standards. CLI Commands:
- googleshopping:api:initialize — Populate sync table based on base module product filters.
- googleshopping:api:sync — Manually sync products (all or by ID).
- googleshopping:api:sync-check — Detect missing or removed products compared to Google.
- googleshopping:api:test-connection — Validate Google API credentials.
- googleshopping:api:status — Display sync statistics per store. Configuration:
- Per-store configuration for data source, feed label, and content language.
- Encrypted storage of service account JSON credentials.
- Auto-sync toggle, batch size configuration, retry interval (hours), and log retention (days).
- Test Connection button in admin configuration.
- All store-scoped fields support canRestore="1".
- Module is disabled by default after installation. Architecture:
- Built as add-on for magmodules/m2-googleshopping (>=2.12.0), reusing product data layer, attribute mapping, and filters.
- Added 4 custom database tables: mm_google_product, mm_google_product_log, mm_google_batch, mm_google_batch_item.
- Full ACL coverage for products, sync, batches, and logs.
- Comprehensive debug and error logging with database audit trail. Minimum requirements:
- Magento 2.3.x
- PHP 8.1
100% Unencrypted Code quality guaranteed.
Quality
Approved, Compatible and Tested

Magento Cloud Support
This extension is fully compatible with Adobe Commerce Cloud (Magento Cloud). It works with the read-only filesystem, the build and deploy pipeline and cloud-specific caching layers.
No additional configuration or workarounds are needed for cloud environments. The extension handles static content deployment and config management the same way as on-premise installations.

Private Composer Repo
After purchase you get access to a private Composer repository with personal credentials. Install and update the extension with a single composer command, just like any other dependency.
Your Composer credentials are available in your account dashboard. Updates are published to the repository as soon as a new version is released, so you always have access to the latest version.