- Previous: Branding Requirements
- Up: Introduction to Netflix API Documentation
- Next: Netflix API Terms of Use
OData Catalog API (Preview)
Netflix has partnered with Microsoft to create an OData API for the Netflix catalog information. This API is currently in preview mode in order to give our developers a chance to experiment with this exciting new offering. This new API provides new functionality and library support for our developers in a highly accessible form. This API is governed by the same Terms of Use as our other APIs.
- This API works with any of the existing OData libraries, and provides XML and JSON formats for other languages as well.
- OData supports significantly more powerful queries than our other APIs.
- You do not need to sign OData catalog requests.
- You can use the OData API distinctly from or in combination with the Netflix API.
Overview
To learn more about the OData protocol, you can browse the OData site at odata.org.
Our OData service is located at odata.netflix.com/Catalog/
As with any other OData service, you can browse the top level endpoint (or any intermediate resource) to discover the sub-resources available, or you can use the documentation below to guide your exploration. More detailed odata documentation related to queries can be found at www.odata.org/developers/protocols/overview.
Top Level Resources
The main resources available from this API are Catalog Titles and People, but there are other top level endpoints as well. A couple of sample queries are provided as examples for each resource, although complete query options are provided further in the document.
| Resource | Path | Expands | Fields |
|---|---|---|---|
| Catalog Titles |
http://odata.netflix.com/Catalog/Titles Catalog titles matching “The Name of the Rose”: Lowest rated titles: Highest rated titles from the 80s and their awards: Family friendly films (by including ratings): Family friendly films (by excluding ratings): |
AudioFormats, Awards, Disc, Movie, Season, Series, ScreenFormats, Cast, Languages, Directors |
Synopsis,Runtime, AverageRating, ReleaseYear, Url, DateModified, Rating, Type, BoxArt(SmallUrl, MediumUrl, LargeUrl, HighDefinitionUrl), Name, ShortName, Instant (Available, AvailableFrom, AvailableTo), AudioFormats, Awards, Disc, Movie, Season, Series, ScreenFormats, Cast, Languages, Directors |
| People |
http://odata.netflix.com/Catalog/People People named 'James Cameron', titles directed, and awards received: |
Awards, TitlesActedIn, TitlesDirected | Name, Awards, TitlesActedIn, TitlesDirected |
| Languages |
http://odata.netflix.com/Catalog/Languages Movies in Japanese: Unrated movies in French: |
AudioFormats, Awards, Disc, Movie, Season, Series, ScreenFormats, Cast, Languages, Directors |
Synopsis,Runtime, AverageRating, ReleaseYear, Url, DateModified, Rating, Type, BoxArt (SmallUrl, MediumUrl, LargeUrl, HighDefinitionUrl), Name, ShortName, Instant (Available, AvailableFrom, AvailableTo), AudioFormats, Awards, Disc, Movie, Season, Series, ScreenFormats, Cast, Languages, Directors |
Individual Resources
| Resource | Path | Expands | Fields |
|---|---|---|---|
| Catalog Titles | AudioFormats, Awards, Disc, Movie, Season, Series, ScreenFormats, Cast, Languages, Directors |
Synopsis,Runtime, AverageRating, ReleaseYear, Url, DateModified, Rating, Type, BoxArt(SmallUrl, MediumUrl, LargeUrl, HighDefinitionUrl), Name, ShortName, Instant (Available, AvailableFrom, AvailableTo), AudioFormats, Awards, Disc, Movie, Season, Series, ScreenFormats, Cast, Languages, Directors |
|
| People |
http://odata.netflix.com/Catalog/People(guid'a7790efe-7b05-497c-8c0b-000008640453')[json] |
Awards, TitlesActedIn, TitlesDirected |
Name, Awards, TitlesActedIn, TitlesDirected |
Parameters
| Name | Description | Values | Example |
|---|---|---|---|
| filter | Filter the results | See filter table |
http://odata.netflix.com/Catalog/People?$filter=Name eq 'James Cameron' |
| format | Results format | json, Atom (default) | http://odata.netflix.com/Catalog/People?$filter=Name eq 'James Cameron'&$format=json |
| top/skip | Paging options | integer values | |
| orderby | Sort results | Resource field | http://odata.netflix.com/Catalog/Genres('Horror')/Titles?$filter=Type eq 'Movie'&$orderby=year(Instant/AvailableFrom) |
| expand | Expand fields inline | Resource field (See expand lists in resource table) | http://odata.netflix.com/Catalog/People?$filter=Name eq 'James Cameron'&$expand=Awards,TitlesDirected |
| inlinecount | Overall count | allpages |
Note that if you just wanted the count you can use the special "$count" element: |
| select | Fields to return | Fields for the resource type (see field list in resource table) | Just the title and boxart for '80's Romantic Comedies http://odata.netflix.com/Catalog/Genres('Romantic Comedies')/Titles?$select=Title,BoxArt[json] |
Filter Operators
Filter Functions
| Function type | Functions | Example |
|---|---|---|
| Date |
year |
http://odata.netflix.com/Catalog/Genres('Horror')/Titles?$filter=Type eq 'Movie'&$orderby=year(Instant/AvailableFrom)[ json] Using the docs on primitive types at http://www.odata.org/developers/protocols/overview, http://odata.netflix.com/Catalog/Titles?$filter=Instant/AvailableFrom%20eq%20datetime'2010-03-16' [ json ] |
| String |
indexOf |
Comedies with really long titles http://odata.netflix.com/Catalog/Genres('Comedy')/Titles?$filter=length(Name) gt 100 [json] Comedies with "Brazil" in the title or Synopsis http://odata.netflix.com/Catalog/Genres('Comedy')/Titles?$filter=substringof('Brazil', Name) or substringof('Brazil', Synopsis) [json] |
| Math |
Round |
Top rated romantic comedies: http://odata.netflix.com/Catalog/Genres('Romantic Comedies')/Titles?$filter=Type%20eq%20'Movie' and round(AverageRating) ge 5&$orderby=year(Instant/AvailableFrom)[ json] |
23 Comments
fronn – 2 years ago
Awesome! This looks very promising... Am I reading this right? It seems it'll be possible to get the movies that have been updated since xyz date? How I've longed for this!
It seems the actual Netflix IDs for the titles/people have changed to a ~6 character alphanumeric case sensitive format rather than the 10 digit or so number before?
Also:
The example for the "select" Parameter seems like it should be: "http://odata.netflix.com/Catalog/Genres('Romantic Comedies')/Titles?$select=Name,BoxArt" (Name rather than Title)
JR Conlin – 2 years ago
We're going to be officially rolling out short urls like "http://movi.es/BVqlK" with the next API release. You can see some of these in the OData, and feel free to use those to point back to the movie page. Those short URLs are not the same thing as the API MovieID (e.g. "http://api.netflix.com/catalog/titles/movies/70130686"), so you can't use them for things like queue ads or title status.
fronn – 2 years ago
JR (or anyone else),
1) Since there's no authentication involved (currently, at least?), is there still going to be a hard 5K limit per day? Or is going to be a "no limit, but don't abuse it - we'll be watching" kind of thing? Just curious (with the more advanced queries, I suspect it'd reduce my daily needs, really).
2) With the new short urls rolling out, is there going to be some way of easily and definitively matching up a movie record by using the old ID value? I have a database full of the old keys and I'm not finding an easy and 100% reliable way to match up the movies with my current database if i switch over to the OData API - using title and date would most likely work, but "most likely" and 100% are different things.
3) Is the OData API actually usable? I mean, can we access all the Netflix catalog and data from it, or is it limited to some subset at the moment for testing purposes? Can I use it on a live system? (understanding that "preview" means it may be down or formats may change?)
4) Any news on when the next API release is expected to roll out (sorry if this has been posted elsewhere - I haven't seen it)
JR Conlin – 2 years ago
1) The latter (no limits, don't be a dork, etc.)
2) you should be able to get both the full api id and movi.es link out of OData (along with title information), or am I misunderstanding what you're trying to do? (i.e. you want to tie Netflix titles against IMDB)
3) It's fairly usable, and you could use it on a live system should you so wish. Right now, it's being fed by the nightly index, so it's subject to the bugs we're having with that, but otherwise it should be fine. Understand that it was very kindly provided to us by the fine folks at Microsoft as a showcase for what OData can do, so there are some additional considerations that we don't have control over, but I don't see it disappearing any time soon.
4) Sadly, not yet. We're working on it and trying to fix a bunch of issues before we roll it out for folks to play with (plus there are a lot of internal demands we have to meet before we start locking things in place). We really, really want to get folks using it, but it's not quite to the point where we feel comfortable unleashing it and not asking folks to radically change code a few weeks later.
Nicholas Clarkson – 2 years ago
Instant/HighDefinitionAvailable is always returning false even though may Instant titles do have HD.
Ahmad Nassri – 1 year ago
there doesn't seem to be a way to build a directory tree using Genres similar to: http://www.netflix.com/AllGenres ... or at least filter to the top level Genres only ...
Ahmad Nassri – 1 year ago
also, some Genres are empty, but I believe that is due to the "preview" label of this API ... would be nice to know if and when this would be rolled out to mass production.
John McLaughlin – 1 year ago
Hi Guys,
I'm not sure if I should post here or not but the dates seem broken right now (they used to work fine)
If I do a search for recent highly rated instant watch movies like this
http://odata.netflix.com/Catalog/Titles?$filter=AverageRating ge 3.5 and Instant/Available eq true&$orderby = Instant/AvailableFrom desc&$format=json
I get a bunch of movies with dates like
AvailableFrom: Date(32503680000000)
Which is unix time in ms. If I convert it to real time it's something like 01/01/3000 12:00am GMT.
Clearly this is not working -- It's returning movies that don't seem to actually meet the criteria..... (or am I missing something?)
This query used to work perfectly....
-John
Dick – 1 year ago
Hi,
Can I select just SmallUrl parameter in BoxArt to return?
Oregon_XJ – 1 year ago
I'm having trouble with my search returning incorrect results. Wondering if the nightly index is not up to date since
http://odata.netflix.com/Catalog/Titles?$filter=AverageRating ge 3 and Instant/Available eq true and (Rating eq 'G' or Rating eq 'PG')&$orderby=Name
is returning titles that are not currently available instantly.
Any suggestions? I am also interested in returning a link to the netflix page, however the "select" parameter in this search seems to be ignored.
http://odata.netflix.com/Catalog/Titles?$select=Synopsis, Runtime, AverageRating, ReleaseYear, Url, Rating, Name&$filter=AverageRating ge 3 and Instant/Available eq true and (Rating eq 'G' or Rating eq 'PG')&$orderby=Name
Jamie – 1 year ago
Hey - will the People catalog be expanded to include photos and biographies? Would love to be able to get more information on this resource
lusien – 1 year ago
I noticed that the feed's next link now includes a port number (eg http://odata.netflix.com:20000/Catalog/Titles/?$skiptoken='5qmk'). Opening this link results in a 502. Removing the port number ":20000" will make it work just fine.
uAreTheCritic.com – 1 year ago
I notice that there are issues with ' in the titles of movies. For instance,
http://odata.netflix.com/Catalog/Titles?$filter=Name%20eq%20'Gulliver's%20Travels'
That errors out. How would that be resolved. Your mistake or mine?
Sam Matthews – 1 year ago
I was referencing the BoxArt.SmallUrl in my App.. and the images corresponded to the 'Tiny" versions in the API, but now they suddenly got bigger.
Is the Tiny box art available on the OData feed?
zachleat – 12 months ago
I have also noticed that single quotes are not allowed in the Name filter.
Any fix there?
Hien Luu – 11 months ago
It seems http://odata.netflix.com/Catalog/Titles?$filter=ReleaseYear%20eq%202000 returns only 500 movies. How do I get the rest of the movies? I saw the paging options "top/skip". Please provide more details what does top or skip mean?
Thanks.
Jay Thaler – 11 months ago
When searching for titles named "Dexter" the ODATA feed only shows Season 1. The REST API shows other seasons. Is there something wrong with the ODATA feed?
Developr – 10 months ago
I'm probably missing something obvious, but where's the episode number field? I'm sorting by id, but doubt that's reliable.
Kid_Niki – 10 months ago
This is my solution to the escaping issue with single quote, double quote, and ampersands being in the title. I tested all other special characters and the search still produces results.
var input = $("#txtMovieInput").val();
input = input.replace(/'/g, "''");
input = input.replace(/"/g, '""');
input = input.replace(/&/g, '%26');
var url = "http://odata.netflix.com/Catalog/Titles?$filter=Name eq '" + input + "'&$expand=Genres,Directors&$format=json&$callback=parseJson"
Developr – 10 months ago
Odata is incredible! However, the following Instant Watch Seasons report no episodes: btmmz,btrDm,btrNT,ca0QQ,ca0TL,ca16N,ca1AI,ca1iQ,ca2oG,ca2X6,ca2yP,ca3QY,ca3wn,ca3wo,ca47S,ca5Vm,ca5Vq,ca5VX,ca6A0,ca6Fk,ca8kA,ca8mN,ca8mO,ca8mP,ca8mQ,ca8mR,ca8mS,ca8mT,ca91x,ca9ro,ca9s3,ca9s4,ca9s5,ca9s6,ca9s7,caAJx,caAwK,caBTn,caCWe,caJMU,caKUb,cZg5x,cZiDh,cZj7S,cZmaw,cZoEs,cZoZN,cZpf6,cZqFt,cZqyp,cZrTf,cZsZ3,cZtKw,cZtma,cZtpX,cZtRm,cZtus,cZuEk,cZug3,cZvrP,cZw7d,cZwJM,cZx7t,cZxtU,cZxv6,cZySI,cZzbw,cZzHj,cZzny,cZzwd
adambp – 10 months ago
The box art URLs are not working right now. Is it just me or is this expected for some reason?
wingnutzero – 9 months ago
Why is so much data in the OData database wrong? For example: If I look up From Dusk Till Dawn (http://odata.netflix.com/Catalog/Titles?$filter=Name%20eq%20%27From%20Dusk%20Till%20Dawn%27&$format=json) it says it's available for streaming (Instant/Available eq true) but I can't stream it on Netflix. Same for The Crow and a number of other movies.
Developr – 9 months ago
I've developed a major app based on odata. Can we depend on it? And if not, what can we depend on?
Please sign in to post a comment.