GithubHelp home page GithubHelp logo

chandanas03 / movie-recommendation-api Goto Github PK

View Code? Open in Web Editor NEW

This project forked from shashank-shastri/movie-recommendation-api

0.0 0.0 0.0 998 KB

An API which recommends movie based on title provided.

License: MIT License

Python 100.00%

movie-recommendation-api's Introduction

Movie-Recommendation-API

An API which recommends movie based on title provided or IMDb ID provided.

Project setup

This project requires Python 3. Rename .env-sample to .env and update values as required.

Installing requirements

pip3 install -r requirements.txt
pip3 install -r dev-requirements.txt (Installing development packages)

Compiles and hot-reloads for development

python3 manage.py runserver

Lints and fixes files

autopep8 --in-place --recursive .

API Details

Returns json data with movie recommendations.

  • URL

    /recommend_movies

  • Method:

    GET

  • URL Params

    Required:

    title=[string] or imdb_id=[string]

    Optional:

    limit=[integer]

  • Data Params

    None

  • Success Response:

    • Code: 200
      Content: {"query": {"limit": 5, "q": "tt0499549", "type": "imdb_id"}, "result": [{"index": 94, "original_title": "Guardians of the Galaxy", "overview": "Light years from Earth, 26 years after being abducted, Peter Quill finds himself the prime target of a manhunt after discovering an orb wanted by Ronan the Accuser.", "release_date": "2014-07-30", "title": "Guardians of the Galaxy", "cast": "Chris Pratt Zoe Saldana Dave Bautista Vin Diesel Bradley Cooper", "director": "James Gunn", "genres": "Action Science Fiction Adventure", "imdb_title_id": "tt2015381", "keywords": "marvel comic spaceship space outer space orphan"}, {"index": 2403, "original_title": "Aliens", "overview": "When Ripley's lifepod is found by a salvage crew over 50 years later, she finds that terra-formers are on the very planet they found the alien species. When the company sends a family of colonists out to investigate her story, all contact is lost with the planet and colonists. They enlist Ripley and the colonial marines to return and search for answers.", "release_date": "1986-07-18", "title": "Aliens", "cast": "Sigourney Weaver Michael Biehn James Remar Paul Reiser Lance Henriksen", "director": "James Cameron", "genres": "Horror Action Thriller Science Fiction", "imdb_title_id": "tt0090605", "keywords": "android extraterrestrial technology space marine spaceman cryogenics"}, {"index": 47, "original_title": "Star Trek Into Darkness", "overview": "When the crew of the Enterprise is called back home, they find an unstoppable force of terror from within their own organization has detonated the fleet and everything it stands for, leaving our world in a state of crisis. With a personal score to settle, Captain Kirk leads a manhunt to a war-zone world to capture a one man weapon of mass destruction. As our heroes are propelled into an epic chess game of life and death, love will be challenged, friendships will be torn apart, and sacrifices must be made for the only family Kirk has left: his crew.", "release_date": "2013-05-05", "title": "Star Trek Into Darkness", "cast": "Chris Pine Zachary Quinto Zoe Saldana Karl Urban Simon Pegg", "director": "J.J. Abrams", "genres": "Action Adventure Science Fiction", "imdb_title_id": "tt1408101", "keywords": "spacecraft friendship sequel futuristic space"}, {"index": 56, "original_title": "Star Trek Beyond", "overview": "The USS Enterprise crew explores the furthest reaches of uncharted space, where they encounter a mysterious new enemy who puts them and everything the Federation stands for to the test.", "release_date": "2016-07-07", "title": "Star Trek Beyond", "cast": "Chris Pine Zachary Quinto Karl Urban Simon Pegg Zoe Saldana", "director": "Justin Lin", "genres": "Action Adventure Science Fiction", "imdb_title_id": "tt2660888", "keywords": "sequel stranded hatred space opera"}, {"index": 3158, "original_title": "Alien", "overview": "During its return to the earth, commercial spaceship Nostromo intercepts a distress signal from a distant planet. When a three-member team of the crew discovers a chamber containing thousands of eggs on the planet, a creature inside one of the eggs attacks an explorer. The entire crew is unaware of the impending nightmare set to descend upon them when the alien parasite planted inside its unfortunate host is birthed.", "release_date": "1979-05-25", "title": "Alien", "cast": "Tom Skerritt Sigourney Weaver Veronica Cartwright Harry Dean Stanton John Hurt", "director": "Ridley Scott", "genres": "Horror Action Thriller Science Fiction", "imdb_title_id": "tt0078748", "keywords": "android countdown space marine space suit beheading"}]}
  • Error Response:

    • Code: 404 NOT FOUND
      Content: {"query": {"limit": 5, "q": "tt049954", "type": "imdb_id"}, "result": [], "error": "Movie not in Database."}

    OR

    • Code: 400 BAD REQUEST
      Content: {"query": {"limit": 5, "q": "", "type": ""}, "result": [], "error": "Empty query."}
  • Sample Call:

      $.ajax({
        url: "/recommend_movies?imdb_id=tt0499549",
        dataType: "json",
        type : "GET",
        success : function(r) {
          console.log(r);
        }
      });

Refered article: https://medium.com/@sumanadhikari/building-a-movie-recommendation-engine-using-scikit-learn-8dbb11c5aa4b

movie-recommendation-api's People

Contributors

shashank-shastri avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.