The Media feed is a JSON object that contains a collection of entities that represent the media content in your catalog, such as TV Series, Movies, Songs, Albums, and more. The first step in the onboarding process is to start developing your feeds. Once the files are ready, you need to host the feed using one of the supported hosting methods for Google to fetch regularly.
Feed file format requirements
The following are the requirements for the feed file(s):
- Feed file must have the filename extension
.json
. - Don't encrypt your feed file.
Encode your feed file in UTF-8 (check your file editor setting).
Split the file into multiple files if your feed file is larger than 1 GB (uncompressed).
We recommend you create a file per entity type (for example,
tvseries.json
,tvseasons.json
,tvepisodes.json
,movies.json
, etc).- If any of these files exceeds 1GB, split its entities into multiple
files (for example,
tvepisodes_01.json
,tvepisodes_02.json
, etc). - As long as the file size is less than 1 GB, there is no limitation on how many entities you can include in a single file.
- If any of these files exceeds 1GB, split its entities into multiple
files (for example,
Ensure that the file is encoded without BOM, as per JSON specification. To check on a linux OS,
hexdump file.json | head -n 1
must not start withBBEF
at address 0x00.
Types of feeds
Production feed
- This represents the set of json feed file(s) that together represent your entire catalog you want to launch on Google. You can learn how to create a feed in the section below.
- This is the only feed you need if you are integrating with Google for the first time.
- Once this feed is submitted to Google, it will be extensively analyzed and iterated on a few times to achieve a higher quality bar w.r.t the amount of information being captured and its correctness before it is finally ingested and launched.
Staging feed
- There are certain use cases that require the expansion of the production feed. A few examples
of such scenarios are:
- Expansion of the feed to include new entity types, not previously launched.
- Expansion of the feed to include a huge number of new entities/metadata to launch in new locales.
- Expansion of the feed to new platform types. For example, when the production feed is only launched on Google Search and now you want to expand the launch to Google TV.
- In such cases, a staging feed is required. This feed is a copy of the production feed except that it has additional metadata, for example, deep links for a new platform, metadata for a new locale and so on.
- Similar to the production feed, this will be extensively analyzed and iterated on a few times to achieve a higher quality bar w.r.t the amount of information being captured and its correctness. Once the quality bar is achieved, this feed replaces the current production feed to become the new production feed.
- This feed allows us to separate the initial launch from the additional launches, perform all required testing, without affecting the production feed. This ensures no disruptions to the end user experience.
Work with your Google representative to clarify any questions you may have on the above.
Create a feed file
Follow these best practices when creating the feed:
Create a sample feed using a small set of entities
Before building a feed that contains all the content in your catalog, we recommend you create a sample feed with only a small set of entities. While working on your feed, you're likely to run into issues. By limiting your the size of the set of entities, you will be able to debug these errors and warnings more easily.
-
We provide tools that ensure that your feed is compliant with the specifications. We recommend you use these tools to resolve all the errors and warnings found in your sample feed.
-
After you've verified that you have a good structure for the small set of your entities, develop a feed for your entire catalog.
Create a sample feed
- Select one representative entity from your catalog. Choose an entity with a reasonably complex structure, but is still typical for an entity in the catalog.
- Use the Data Feed Validation tool to check for syntax errors and missing required properties. (See the next section for details.)
Example of a feed with a single
Movie
entity{ "@context": "http://schema.org", "@type": "DataFeed", "dateModified": "2018-07-20T00:44:51Z", "dataFeedElement": [ { "@context": ["http://schema.org", {"@language": "en"}], "@type": "Movie", "@id": "http://www.example.com/my_favorite_movie", "url": "http://www.example.com/my_favorite_movie", "name": "My Favorite Movie", "potentialAction": { "@type": "WatchAction", "target": { "@type": "EntryPoint", "urlTemplate": "http://www.example.com/my_favorite_movie?autoplay=true", "inLanguage": "en", "actionPlatform": [ "http://schema.org/DesktopWebPlatform", "http://schema.org/MobileWebPlatform", "http://schema.org/AndroidPlatform", "http://schema.org/AndroidTVPlatform", "http://schema.org/IOSPlatform", "http://schema.googleapis.com/GoogleVideoCast" ] }, "actionAccessibilityRequirement": { "@type": "ActionAccessSpecification", "category": "subscription", "requiresSubscription": { "@type": "MediaSubscription", "name": "Example Package", "commonTier": true, "@id": "[partner determined string]" }, "availabilityStarts": "2018-07-21T10:35:29Z", "availabilityEnds": "2019-10-21T10:35:29Z", "eligibleRegion": [ { "@type": "Country", "name": "US" }, { "@type": "Country", "name": "CA" } ] } }, "sameAs": "https://en.wikipedia.org/wiki/my_favorite_movie", "releasedEvent": { "@type": "PublicationEvent", "startDate": "2008-01-20", "location": { "@type": "Country", "name": "US" } }, "description": "This is my favorite movie.", "actor": [ { "@type": "Person", "name": "John Doe", "sameAs": "https://en.wikipedia.org/wiki/John_Doe" }, { "@type": "Person", "name": "Jane Doe", "sameAs": "https://en.wikipedia.org/wiki/Jane_Doe" } ], "identifier": [ { "@type": "PropertyValue", "propertyID": "IMDB_ID", "value": "tt0123456" } ] } ] }
Validate the sample feed
The following tools are available to help you validate a sample feed with Google's structured data specifications for media feeds.
Data Feed Validation tool
The Data Feed Validation tool can validate a single entity at a time. Use this tool to validate a sample entity from your catalog for structural errors and common content errors. You can find more details about the tool here.
JSON Schema Validation tool
The JSON Schema Validation tool can validate all files in a feed. Use this tool during the development of the feed to avoid common structural errors. You can find more details about the tool here.
Create a production feed
- Once all the errors and warnings in the sample feed are resolved, expand the feed to include all the entities in your catalog.
- Use the Data Feed Validation tool frequently to validate a small number of entities in your feed at a time (Pasting a large number of entities on the tool may freeze the web browser). Confirm that your feed includes all the entities in your catalog by comparing the number of entities in your feed with the number of items in your catalog.