Merchant API v1beta was discontinued and shut down on February 28, 2026. For steps to transition to the latest stable version, seeMigrate from v1beta to v1.
Keep in-store information up to dateStay organized with collectionsSave and categorize content based on your preferences.
Page Summary
Use the Merchant Inventories API to update the price and availability of your local products in specific stores.
Manage your local product inventory by adding, updating, and removing store information using the API's methods likelocalInventories.insertandlocalInventories.delete.
View your existing stores associated with a product throughlocalInventories.listor manage your account-level stores via your Business Profile.
Third-party providers can utilize this API to build interfaces for their merchants, enabling them to control the in-store availability of their products.
You can use the Inventories sub-API to keep in-store information for your
local products up to date. This includes updatingpriceandavailability,
and removing stores a product is no longer sold in.
If you're a third-party provider, you can use the Inventories sub-API to
create an interface for your businesses to update the in-store availability of
their products.
This section explains how to view the stores associated with a product or
account.
By product
UselocalInventories.listto list all the local inventories connected to a specificproductin your
account. This call returns fullLocalInventoryresources. Use thestore_codeattribute to identify each store.
Here's a sample you can use to list local inventories for a product:
fromexamples.authenticationimportconfigurationfromexamples.authenticationimportgenerate_user_credentialsfromgoogle.shoppingimportmerchant_inventories_v1# ENSURE you fill in the product ID for the sample to# work._ACCOUNT=configuration.Configuration().read_merchant_info()_PRODUCT="[INSERT_PRODUCT_HERE]"_PARENT=f"accounts/{_ACCOUNT}/products/{_PRODUCT}"deflist_local_inventories():"""Lists the `LocalInventory` resources for the given product.The response might contain fewer items than specified by`pageSize`. If `pageToken` was returned in previous request, it can beused to obtain additional results.`LocalInventory` resources are listed per product for a given account."""# Gets OAuth Credentials.credentials=generate_user_credentials.main()# Creates a client.client=merchant_inventories_v1.LocalInventoryServiceClient(credentials=credentials)# Creates the request.# Page size is set to the default value.request=merchant_inventories_v1.ListLocalInventoriesRequest(parent=_PARENT,page_size=25000)try:# Makes the request and catch and print any error messages.# If you are returned more responses than your page size, this code# will automatically re-call the service with the `pageToken` until all# responses are returned.page_result=client.list_local_inventories(request=request)# Print the response.forresponseinpage_result:print(response)exceptRuntimeErrorase:print("List failed")print(e)if__name__=="__main__":list_local_inventories()
You can view all the stores associated with your account in yourBusiness Profile, or with theGoogle My Business API. You can't use
Merchant API to view or manage stores at the account level, since this
information comes from your Business Profile.
Remove stores
Here's how to remove stores you no longer sell products in:
From products
If a product is no longer sold at a specific store, you should remove the local
inventory entry for that store from the product. You can uselocalInventories.deleteto remove a specific local inventory entry from a product.
Here's a sample you can use to remove a local inventory entry from a product:
fromexamples.authenticationimportconfigurationfromexamples.authenticationimportgenerate_user_credentialsfromgoogle.shoppingimportmerchant_inventories_v1# ENSURE you fill in the product ID and store code# for the sample to work._ACCOUNT=configuration.Configuration().read_merchant_info()_PRODUCT="[INSERT_PRODUCT_HERE]"_STORE_CODE="[INSERT_STORE_CODE_HERE]"_NAME=(f"accounts/{_ACCOUNT}/products/{_PRODUCT}/localInventories/"f"{_STORE_CODE}")defdelete_local_inventory():"""Deletes the specified `LocalInventory` resource from the given product.It might take up to an hour for the `LocalInventory` to be deletedfrom the specific product. Once you have received a successful deleteresponse, wait for that period before attempting a delete again."""# Gets OAuth Credentials.credentials=generate_user_credentials.main()# Creates a client.client=merchant_inventories_v1.LocalInventoryServiceClient(credentials=credentials)# Creates the request.request=merchant_inventories_v1.DeleteLocalInventoryRequest(name=_NAME)# Makes the request and catch and print any error messages.try:client.delete_local_inventory(request=request)print("Delete successful")exceptRuntimeErrorase:print("Delete failed")print(e)if__name__=="__main__":delete_local_inventory()
This call removes information for only the specified store, from only the
specified product.
From accounts
You can remove stores where you no longer sell your products from your account
by removing them from yourBusiness Profile.
SeeClose or remove a businessfor more information.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-05-26 UTC."],[],[]]