We will sunset v2 of the Content API on March 29th, 2021. To avoid disruptions with your integration, please migrate to v2.1 as soon as possible. For more information, see Migrating to v2.1.

REST Resource: datafeeds

Resource: Datafeed

Datafeed configuration data.

JSON representation
{
  "id": string,
  "name": string,
  "contentType": string,
  "attributeLanguage": string,
  "contentLanguage": string,
  "intendedDestinations": [
    string
  ],
  "fileName": string,
  "fetchSchedule": {
    object (DatafeedFetchSchedule)
  },
  "format": {
    object (DatafeedFormat)
  },
  "targetCountry": string,
  "targets": [
    {
      object (DatafeedTarget)
    }
  ],
  "kind": string
}
Fields
id

string (int64 format)

Required for update. The ID of the data feed.

name

string

Required for insert. A descriptive name of the data feed.

contentType

string

Required. The type of data feed. For product inventory feeds, only feeds for local stores, not online stores, are supported.

Acceptable values are:

  • "local products"
  • "product inventory"
  • "products"

attributeLanguage

string

The two-letter ISO 639-1 language in which the attributes are defined in the data feed.

contentLanguage

string

[DEPRECATED] Please use targets[].language instead. The two-letter ISO 639-1 language of the items in the feed. Must be a valid language for targetCountry.

intendedDestinations[]

string

[DEPRECATED] Please use targets[].includedDestinations instead. The list of intended destinations (corresponds to checked check boxes in Merchant Center).

fileName

string

Required. The filename of the feed. All feeds must have a unique file name.

fetchSchedule

object (DatafeedFetchSchedule)

Fetch schedule for the feed file.

format

object (DatafeedFormat)

Format of the feed file.

targetCountry

string

[DEPRECATED] Please use targets[].country instead. The country where the items in the feed will be included in the search index, represented as a CLDR territory code.

targets[]

object (DatafeedTarget)

The targets this feed should apply to (country, language, destinations).

kind

string

Identifies what kind of resource this is. Value: the fixed string "content#datafeed"

DatafeedFetchSchedule

The required fields vary based on the frequency of fetching. For a monthly fetch schedule, dayOfMonth and hour are required. For a weekly fetch schedule, weekday and hour are required. For a daily fetch schedule, only hour is required.

JSON representation
{
  "dayOfMonth": integer,
  "weekday": string,
  "hour": integer,
  "timeZone": string,
  "fetchUrl": string,
  "username": string,
  "password": string,
  "minuteOfHour": integer,
  "paused": boolean
}
Fields
dayOfMonth

integer (uint32 format)

The day of the month the feed file should be fetched (1-31).

weekday

string

The day of the week the feed file should be fetched.

Acceptable values are:

  • "monday"
  • "tuesday"
  • "wednesday"
  • "thursday"
  • "friday"
  • "saturday"
  • "sunday"

hour

integer (uint32 format)

The hour of the day the feed file should be fetched (0-23).

timeZone

string

Time zone used for schedule. UTC by default. E.g., "America/Los_Angeles".

fetchUrl

string

The URL where the feed file can be fetched. Google Merchant Center will support automatic scheduled uploads using the HTTP, HTTPS, FTP, or SFTP protocols, so the value will need to be a valid link using one of those four protocols.

username

string

An optional user name for fetchUrl.

password

string

An optional password for fetchUrl.

minuteOfHour

integer (uint32 format)

The minute of the hour the feed file should be fetched (0-59). Read-only.

paused

boolean

Whether the scheduled fetch is paused or not.

DatafeedFormat

JSON representation
{
  "fileEncoding": string,
  "columnDelimiter": string,
  "quotingMode": string
}
Fields
fileEncoding

string

Character encoding scheme of the data feed. If not specified, the encoding will be auto-detected.

Acceptable values are:

  • "latin-1"
  • "utf-16be"
  • "utf-16le"
  • "utf-8"
  • "windows-1252"

columnDelimiter

string

Delimiter for the separation of values in a delimiter-separated values feed. If not specified, the delimiter will be auto-detected. Ignored for non-DSV data feeds.

Acceptable values are:

  • "pipe"
  • "tab"
  • "tilde"

quotingMode

string

Specifies how double quotes are interpreted. If not specified, the mode will be auto-detected. Ignored for non-DSV data feeds.

Acceptable values are:

  • "normal character"
  • "value quoting"

DatafeedTarget

JSON representation
{
  "country": string,
  "language": string,
  "includedDestinations": [
    string
  ],
  "excludedDestinations": [
    string
  ]
}
Fields
country

string

The country where the items in the feed will be included in the search index, represented as a CLDR territory code.

language

string

The two-letter ISO 639-1 language of the items in the feed. Must be a valid language for targets[].country.

includedDestinations[]

string

The list of destinations to include for this target (corresponds to checked check boxes in Merchant Center). Default destinations are always included unless provided in excludedDestinations.

accounts.list of supported destinations (if available to the account):

  • DisplayAds
  • Shopping
  • ShoppingActions
  • SurfacesAcrossGoogle

excludedDestinations[]

string

The list of destinations to exclude for this target (corresponds to unchecked check boxes in Merchant Center).

Methods

custombatch

Deletes, fetches, gets, inserts and updates multiple datafeeds in a single request.

delete

Deletes a datafeed configuration from your Merchant Center account.

fetchnow

Invokes a fetch for the datafeed in your Merchant Center account.

get

Retrieves a datafeed configuration from your Merchant Center account.

insert

Registers a datafeed configuration with your Merchant Center account.

list

Lists the configurations for datafeeds in your Merchant Center account.

update

Updates a datafeed configuration of your Merchant Center account.