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

Stay organized with collections Save and categorize content based on your preferences.

You can use the feedLabel field to add a label to your products and datafeeds.

feedLabel is available in the following resources:

REST ID

feedLabel replaces targetCountry in REST IDs for new products.

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.

Get and list products

The feedLabel field is always populated for all returned products.

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

The same changes apply for productstatuses endpoints.

Country-specific fields are empty for offers with a feedLabel that isn't a CLDR territory code.

Insert and update products

Either feedLabel or targetCountry is required to insert new products. If you insert or update products with a feedLabel and targetCountry, their values must match.

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

See Use feed labels to advertise products from specific feeds for more details.

Country targeting

Use one of the following to ensure your products target the right countries:

Products

The targetCountry field for products is deprecated. Instead, use the shipping field to specify your target countries.

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

See Targeting ads in multiple countries for more information.

Datafeeds

You can now see which countries a datafeed explicitly targets in targets. This applies when you use feedLabel instead of country in the datafeedtarget configuration.

We’ve also added the targetCountries field for datafeeds, so you can configure targeting for datafeeds directly. You can still configure targeting outside the feed, for example, by setting the shipping attribute of the products resource.

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.

Buy on Google

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