Country targeting has changed in the Content API for Shopping. See Feed label replaces target country in Content API for Shopping for more information.

Migrate to feed labels

The Content API for Shopping has deprecated the targetCountry field. Instead, we recommend using the shipping field to specify your target countries.

We've also introduced the feedLabel field to replace targetCountry in REST IDs.

For all existing products, feedLabel has been automatically populated with the same country you previously submitted in targetCountry.

If you want to target multiple countries, you can continue to use the shipping attribute to add additional countries.

If you upload new offers or datafeeds with a two-letter country code as the feedLabel value, the Content API for Shopping backfills the targetCountry field with the country code you provide.

Here are the details of what has changed:

Offer ID

feedLabel has replaced the country portion of the product's REST ID.

Instead of online:language:targetCountry:offerId, the REST ID is now formed as online:language:feedLabel:offerId for new products. This doesn't change the REST ID of your existing products.

UK to GB conversion

We currently allow the UK value for the targetCountry field even though it’s not a valid country code. We automatically convert UK to GB. Products with UK as their targetCountry are stored with GB in their REST ID and offerId.

If you set UK as the value for feedLabel, it is not automatically converted to GB. UK and GB are different strings for feedLabel and will create different offers.

If you insert a targetCountry of UK, and we convert it to GB, you must update the REST ID of the product to include GB instead of UK to retrieve the product with the get method.

Get and list products

The feedLabel field is always populated for all returned offers.

If feedLabel is a valid CLDR territory code, we automatically populate the existing targetCountry field for compatibility reasons. If the feedLabel isn't a valid CLDR territory code, we leave targetCountry empty.

The same changes are applicable for productstatuses endpoints. Country-specific fields are empty for offers with a feedLabel that isn't a CLDR territory code.

Insert products

Either feedLabel or targetCountry is required to insert new products.

You receive an error from the API if the fields are both empty or if their values don't match.

Country targeting

The set of countries targeted depends on what you enter in the Merchant Center UI. To choose the country(s) your product targets, add countries to the shipping field of your product instead of relying on the targetCountry field.

See Targeting ads in multiple countries for more information.

Buy on Google

New merchants must use "US" as their feed label to list products with Buy on Google.