dp.cx blog

Posted on

Filed under linux, perl, netflix, and api

I joined the Netflix bandwagon late, but I've still been a subscriber for almost 5 years now. I love watching movies through the streaming system, and it's ubiquitous. I'm pretty sure I could stream movies to my toaster if it had a screen.

Last year, when Netflix started down the road of splitting the streaming service and the DVD service (the short lived Qwikster), and the subsequent backlash from users came about, I cancelled the DVD by mail portion of my account.

Concerned with the future of Netflix, I decided I wanted my data from their system. I'm primarily a perl programmer, so I went looking through CPAN. I found WWW::Netflix, but being based on WWW::Mechanize meant that changes to the site would likely cause any script(s) to break.

That's when I found WWW::Netflix::API. It looked like a perfect fit. And it was. That is, until I started looking at the API Reference. That's when I first noticed some problems.

Problem 1

I wanted ratings for all of the items I'd provided ratings for. Seems easy enough. I just go get my list of ratings and ... oh, I can't do that? I have to provide a title to get a rating? And I'm not even providing a film title, I'm providing a URL to the film within the API? Ok. Let's go get my films ... oh, I can't do that either? Ok, I just need to fetch my Rental History. This leads us to Problem 2.

Problem 2

When I get my Rental History, even though I'm authenticated to Netflix as "me", it doesn't include my rating. Which means I need an additional API call to get it. Now, the Netflix API provides me the ability to pass multiple film urls to the ratings call, and I can parse them. Sadly though, there are no examples of the data coming back, which means I have to burn through API calls to determine the structure. Which leads us to Problem 3.

Problem 3

I'm limited to 10 API requests per second, or 25,000 per day. Which sounds like a lot. Until you run out. At which point, you're screwed. It's not a rolling day either. It's a midnight to midnight day. There's also no way to see how many API calls you've used in a day, so that you can try to spread things out. There's a developer forum, but it's full of spam, and doesn't really seem to have much attention paid to it. There doesn't seem to be a way to increase your API limit either.

It's taken me almost 2 weeks to fight through the API to get the ratings data for the 455 movies that I've gotten. Sadly, every day that I go over my API limit causes a portion of the day to be wasted, so I can't get all of my data in one swoop.

I'm frustrated with the Netflix API. For a company built on other companies APIs, you'd think their's would be better. Sadly, it's not.