dmcgill50
dmcgill50

Reputation: 540

Netflix Viewing History

I am looking for the ability to list all viewing history for a defined user with some useful filtering(by date, by category, LastWatched, etc).

Is anyone familiar enough with the API to tell me if this exists?

Upvotes: 2

Views: 4661

Answers (2)

Timi Ajiboye
Timi Ajiboye

Reputation: 166

Netflix doesn't provide any APIs to do this.

Alternatively, you can use Gandalf's SDK to programmatically request a user's Netfix viewing history.

Caveats/Disclosure:

  • This is a third party solution and is not affiliated with Netflix.
  • As of today, the owner of the account you're trying to pull the data from must have an iOS device.
  • I am the founder of Gandalf.

Here's how it works (or see 1 min YouTube video instead):

Using the connect npm package, you can generate a "Gandalf URL".

import Connect from "@gandalf-network/connect";

const connect = new Connect({
    publicKey: process.env.PUBLIC_KEY, 
    redirectURL: "YOUR_REDIRECT_URL",
    services: { "NETFLIX": true } 
})

const url = await connect.generateURL()

url is a link that you can include in your (web or mobile) application, once the user clicks on it, the Gandalf App Clip Flow is launched which will open Netflix.com in a WebView, prompting your user to sign in & select a profile as usual.

Once that process is complete, the App Clip will navigate to the redirect URL specified above with a dataKey query parameter.

You can use this dataKey (on your server) to retrieve a list of every show & movie they've watched using the eyeofsauron npm package.

Lastly, you don't have to use JS/Node, it is language agnostic. You can read more at https://docs.gandalf.network

Upvotes: 3

hd1
hd1

Reputation: 34677

Netflix seems to have removed this functionality from its API. Speculation holds that this was related to a class-action lawsuit regarding user privacy. They have not said whether the functionality will be restored.

Upvotes: 3

Related Questions