Is there an official public Netflix API?
No. Unfortunately, the official Netflix API was deprecated in November 2014. However, there is an Unofficial Netflix API available on RapidAPI (made by the guys from uNoGS.com).
The uNoGS (unofficial Netflix online Global Search) API allows anyone to search the global Netflix catalog of TV and Movie titles.
Related: Netflix Streaming Alternatives
uNoGS Netflix API
The uNoGS API allows developers to gain access to the data available on their website.
API Endpoints
- Country Details
- New Release Per Country
- Expiring Per Country
- List Countries
- Season Change
- Deleted
- Search
- Genre IDs
- Deleted Search
- Advanced Search
- Title Information
- Load Title Details
- Load Episode Details
- Weekly Episodes
- Images
- Update IMDB
- Load IMDB Info
- Weekly Updates
How to Use the Netflix API in Python
Prerequisites
- Knowledge of basic Python
1. Sign Up for a RapidAPI User Account
The first thing to do is to head over to RapidAPI.com and just sign up for a free user account. Join over 1 million developers and gain access to over 10,000 APIs.
2. Navigate to the uNoGS Netflix API Page
Navigate to the Netflix API documentation page by searching for “Netflix” in the search bar or by clicking here.
3. Subscribe to a Pricing Plan
Next step is to click on the Pricing tab and subscribe to an API plan. Hint: There’s a freemium plan for 100 requests/day. (Just make sure you don’t go over the daily limit, or you’ll be charged $0.1 per additional request).
Why we need your credit card: In case you incur overages.
Here’s some additional pricing FAQ:
4. Select an Endpoint
Once you’re subscribed to a pricing plan, navigate back to the endpoints page, and test the endpoints.
Assuming you get a 200 response, you’ll see something like this JSON response:
{ "COUNT":"65", "ITEMS":[ { "netflixid":"80142521", "title":"Pray For Rain", "image":"https://art-2.nflximg.net/63fac/79c52ccb0931cc50f51fd8922ecaef551d263fac.jpg", "synopsis":"Following her father's suspicious death, a New York journalist returns to her hometown, where drought and gangs have decimated the farming community.", "rating":"0", "type":"movie", "released":"2017", "runtime":"1h32m", "largeimage":"", "unogsdate":"2017-08-12", "imdbid":"tt5213870", "download":"0" }, ...
5. From the Code Snippet dropdown, Select Python
Once you’re ready to integrate the Netflix API into your app, click on the code snippet dropdown and select Python.
Netflix API Examples
Depending on your preference, you can use:
- http.client
- Example Snippet:
import http.client conn = http.client.HTTPSConnection("unogs-unogs-v1.p.rapidapi.com") headers = { 'x-rapidapi-host': "unogs-unogs-v1.p.rapidapi.com", 'x-rapidapi-key': "[Insert API Key Here]" } conn.request("GET", "/aaapi.cgi?q=get%3Anew7%3AUS&p=1&t=ns&st=adv", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
- Example Snippet:
- Requests
- Example Snippet:
import requests url = "https://unogs-unogs-v1.p.rapidapi.com/aaapi.cgi" querystring = {"q":"get:new7:US","p":"1","t":"ns","st":"adv"} headers = { 'x-rapidapi-host': "unogs-unogs-v1.p.rapidapi.com", 'x-rapidapi-key': "[Insert API Key]" } response = requests.request("GET", url, headers=headers, params=querystring) print(response.text)
- Example Snippet:
- Unirest (Python 2)
- Example Snippet:
response = unirest.get("https://unogs-unogs-v1.p.rapidapi.com/aaapi.cgi?q=get:new7:US&p=1&t=ns&st=adv", headers={ "X-RapidAPI-Host": "unogs-unogs-v1.p.rapidapi.com", "X-RapidAPI-Key": "[Insert API Key]" } )
- Example Snippet:
and Voila! Grab the code snippet and add it into your website or mobile app!
Related APIs
Related Questions
How can you get Netflix API Access?
You can’t get official Netflix API access anymore, but there’s an unofficial Netflix API available on RapidAPI.com.
Why doesn’t Hulu provide an API similar to Netflix’s?
According to this answer on Quora:
I would guess it has something to do with Hulu’s ownership and Board of Directors.
NBCUniversal, News Corp and Disney (all equity owners of Hulu https://www.hulu.com/about), aren’t exactly pillars of technological innovation (although Disney has had it’s share of successful innovations in the past, look what NewsCorp did with MySpace https://nyti.ms/m6curr). Their primary goal with Hulu is simply to stay relevant, not drive technological innovation. They see Hulu as a new closed distribution channel to stream their proprietary content online. Just take a look at Hulu’s board, which reads like an A-list of top media and entertainment executives.
Why has Netflix closed its public API program?
According to Dan Jacobson (head of Netflix’s API) mentioned that external developers only made up 1% of all traffic to the API, thus deciding it made more sense to focus on internal use.
What is the OMDb API?
The Open Movie Database (OMDB) offers a RESTful web service to provide IMDb related information. Their API includes posters.
What is RapidAPI?
RapidAPI is the world’s largest API marketplace & catalog with over 1,000,000 developers and 10,000 available APIs for developers.
Does Rotten Tomatoes have an API?
Yes, Rotten Tomatoes provide an API which you can apply for at Fandango.
Srushti says
Does Amazon prime have open api?
RapidAPI Staff says
Hi Srushti,
There’s an unofficial Amazon Prime Video Search API you can use here: https://rapidapi.com/Streamzui/api/streamzui-amazon-prime-video-search