Import your IMDb watchlist and ratings to your JustWatch account
This script helps you import your IMDb watchlist and ratings (as a seenlist) into your JustWatch account.
- An IMDb account (where your watchlist and ratings are).
- A JustWatch account (where you want to import your lists).
- Python 3.7 or newer. If you don't have it, installing
uv(see below) can help manage Python installations. uv(Recommended for Setup): A fast Python project and virtual environment manager. Installation instructions: uv documentation.uvcan create the virtual environment and install all dependencies for you.- Git (a tool for downloading code from services like GitHub).
-
Get the Script Files (Clone the Repository): Open a terminal or command prompt and run:
git clone https://github.com/vinismarques/imdb-to-justwatch cd imdb-to-justwatch # Go into the folder that was created
-
Set up Virtual Environment and Install Dependencies (using
uv):uvwill automatically create a virtual environment (usually named.venvin the project folder) if it doesn't exist, and then install the required packages into it.In your terminal, from the
imdb-to-justwatchproject directory, run:uv sync
This command reads the project's dependency file (
pyproject.toml), sets up the isolated environment, and installs everything needed.(Optional) To activate the virtual environment created by
uv(if you need to run other commands or check things manually):- On macOS and Linux:
source .venv/bin/activate - On Windows (Command Prompt):
.venv\Scripts\activate
- On Windows (PowerShell):
.venv\Scripts\Activate.ps1
You should see
(.venv)at the beginning of your command line prompt. (Note: For running the main import scripts, direct activation might not be strictly necessary if you always preface python commands withuv python ..., but it's good practice to activate it for a development session.) - On macOS and Linux:
-
Prepare Your IMDb Export Files: You need to download two files from your IMDb account: one for your watchlist and one for your ratings (which we'll use as a "seenlist").
-
Create an
exports/Folder: Inside your project folder (the one containing the scripts), create a new folder namedexports. This is where you'll save the files from IMDb. -
Download Your IMDb Watchlist: a. Go to your IMDb Watchlist page (you can usually find this by logging into IMDb, clicking your profile name, and selecting "Your Watchlist"). b. Scroll all the way to the bottom of your watchlist page. c. Click the "Export this list" link. d. Save the downloaded file directly into the
exports/folder you created. e. Crucially, rename this file towatchlist.csv. -
Download Your IMDb Ratings (for Seenlist): a. Go to your IMDb Ratings page (log into IMDb, click your profile name, then "Your Ratings"). b. Look for a menu with three dots (⋮) or an "options" button, usually near the top of the ratings list. Click it. c. Select "Export" from the menu. d. Save the downloaded file directly into the
exports/folder. e. Crucially, rename this file toratings.csv.
After these steps, your
exports/folder should containwatchlist.csvandratings.csv. -
-
Get Your JustWatch Authorization Token: This token allows the script to act on your behalf on JustWatch (like adding movies to your lists).
- Open your web browser (like Chrome, Firefox, or Edge).
- Go to JustWatch and log in to your account.
- Open your browser's Developer Tools. You can usually do this by:
- Pressing the
F12key. - Right-clicking anywhere on the JustWatch page and selecting "Inspect" or "Inspect Element".
- Pressing the
- In the Developer Tools panel that appears, find and click on the "Network" tab.
- Now, perform an action on the JustWatch website that requires you to be logged in. For example, add any movie to your JustWatch watchlist or mark a movie as "seen". This will make your browser send a request that includes your authorization token.
- In the Network tab, you'll see a list of requests. Look for entries that start with
graphql(you might seegraphql?operationName=...). You can use the filter bar in the Network tab to search for "graphql". - Click on one of these
graphqlentries. - A new panel will show details for that request. Look for a section called "Request Headers" (or similar, like "Headers" then "Request Headers").
- Inside Request Headers, find the line that says
Authorization. The value next to it will start withBearerfollowed by a long string of characters (e.g.,Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...). - Copy this entire value, including the
Bearerpart and all the characters after it. This is your authorization token.
-
Tell the Script Your Authorization Token (Using an Environment Variable): The script needs to know your token. The most secure way to provide it is by setting it as an "environment variable". This is like a temporary note for your computer that the script can read.
You'll need to do this in the same terminal or command prompt window where you activated the virtual environment and will run the scripts. This setting is usually temporary and only lasts for your current terminal session.
- On macOS or Linux:
Replace
Bearer eyJ...your...token...herewith the actual token you copied.export JUSTWATCH_AUTH_TOKEN="Bearer eyJ...your...token...here"
- On Windows (Command Prompt):
Replace
Bearer eyJ...your...token...herewith the actual token you copied.set JUSTWATCH_AUTH_TOKEN=Bearer eyJ...your...token...here
- On Windows (PowerShell):
Replace
Bearer eyJ...your...token...herewith the actual token you copied.$env:JUSTWATCH_AUTH_TOKEN="Bearer eyJ...your...token...here"
Make sure there are no extra spaces around the
=sign or inside the quotes. If your token has special characters, keeping it inside the quotes is important. - On macOS or Linux:
Replace
Make sure you have:
- The virtual environment active (e.g.,
(.venv)is in your prompt if you activated it manually) OR you are usinguvto run the scripts (see below). - Placed your
watchlist.csvand/orratings.csvin theexports/folder. - Set the
JUSTWATCH_AUTH_TOKENenvironment variable in your current terminal session.
-
To import your IMDb Watchlist to JustWatch: Run the following command in your terminal (from the
imdb-to-justwatchdirectory):uv run import_watchlist.py
(If you have the
.venvactivated manually,python import_watchlist.pywill also work). -
To import your IMDb Ratings (as a Seenlist) to JustWatch: Run the following command in your terminal (from the
imdb-to-justwatchdirectory):uv run import_seenlist.py
(If you have the
.venvactivated manually,python import_seenlist.pywill also work).
The scripts will show progress and log any issues they encounter.
- The scripts have a built-in delay between actions to be kind to the JustWatch servers and avoid being blocked.
- API Usage: The JustWatch APIs used by this script are internal. While generally safe for personal, limited use (like importing your lists), they are not officially public or documented for third-party commercial use. Please use responsibly.
- Websites like IMDb and JustWatch sometimes change how their pages or export files are structured. If the scripts stop working, it might be because of such a change. In that case, parts of the script (like column numbers or API details) might need to be updated.
- Keep your
JUSTWATCH_AUTH_TOKENprivate! It's like a password for your JustWatch account. Don't share it publicly. The environment variable method helps keep it more secure than typing it directly into the script. - Inspiration: This project was inspired by the work done by @prasanth-G24 in the Imdb_to_JustWatch repository.