{"id":22080582,"url":"https://github.com/electronic-mango/justwatch-selenium-api","last_synced_at":"2025-07-24T14:32:17.392Z","repository":{"id":209148210,"uuid":"723334693","full_name":"Electronic-Mango/justwatch-selenium-api","owner":"Electronic-Mango","description":"JustWatch API accessing data via Selenium.","archived":true,"fork":false,"pushed_at":"2023-11-25T10:51:52.000Z","size":24,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-23T20:45:20.213Z","etag":null,"topics":["api","api-rest","fastapi","justwatch","justwatch-api","rest","rest-api","selenium"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Electronic-Mango.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-11-25T10:41:51.000Z","updated_at":"2024-07-29T23:59:29.000Z","dependencies_parsed_at":"2023-11-25T12:41:09.463Z","dependency_job_id":null,"html_url":"https://github.com/Electronic-Mango/justwatch-selenium-api","commit_stats":null,"previous_names":["electronic-mango/justwatch-selenium-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Electronic-Mango/justwatch-selenium-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Electronic-Mango%2Fjustwatch-selenium-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Electronic-Mango%2Fjustwatch-selenium-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Electronic-Mango%2Fjustwatch-selenium-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Electronic-Mango%2Fjustwatch-selenium-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Electronic-Mango","download_url":"https://codeload.github.com/Electronic-Mango/justwatch-selenium-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Electronic-Mango%2Fjustwatch-selenium-api/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266855827,"owners_count":23995563,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-24T02:00:09.469Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","api-rest","fastapi","justwatch","justwatch-api","rest","rest-api","selenium"],"created_at":"2024-11-30T23:15:54.864Z","updated_at":"2025-07-24T14:32:17.117Z","avatar_url":"https://github.com/Electronic-Mango.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JustWatch API\n\nA basic and unofficial [JustWatch](https://www.justwatch.com/) API.\n\nSince standard free JustWatch API was removed this one uses [Selenium](https://www.selenium.dev/) to gather responses from JustWatch website directly.\nIt's slower than regular API would be, as Selenium has an execution time overhead.\n\n\u003e [!NOTE]\n\u003e I've created a Python API which uses GraphQL queries to access data: [`simple-justwatch-python-api`](https://github.com/Electronic-Mango/simple-justwatch-python-api).\n\u003e It works much faster, returns a lot more information and is a lot simpler to use, as it doesn't require Selenium.\n\u003e I recommend using it over this one.\n\n\n* [Requirements](#requirements)\n* [Configuration](#configuration)\n* [Running the API](#running-the-api)\n  * [Docker](#docker)\n  * [Manually](#manually)\n* [Endpoints](#endpoints)\n* [Limitations and performance](#limitations-and-performance)\n* [Disclaimer](#disclaimer)\n\n\n\n## Requirements\n\nThis API is built using [`FastAPI`](https://fastapi.tiangolo.com/), [`Selenium`](https://www.selenium.dev/) and `Python 3.11`.\nFull list of Python requirements is in `requirements.txt` file.\n\n\n\n## Configuration\n\nConfiguration is done through `.env` file. You can use provided `.env.example` as reference.\n\nYou can configure country used for JustWatch via `COUNTRY` environment variable:\n```dotenv\nCOUNTRY=US\n```\nValues are matching JustWatch URLs. By default `US` is used.\n\nYou must configure paths for both Firefox and Firefox driver (geckodriver).\nNormally you could use Selenium Manager to figure out paths, unfortunately it doesn't support ARM64 (e.g. Raspberry PI).\nSpecifying paths to both is a workaround disabling Manager:\n```dotenv\nFIREFOX_BIN=/path/to/firefox/binary\nFIREFOX_DRIVER=/path/to/geckodriver\n```\nYou can find geckodriver on its [GitHub](https://github.com/mozilla/geckodriver/releases).\n\n\n\n## Running the API\n\n### Docker\n\n**Docker (and Docker Compose) assumes that geckodriver is present in project root directory to copy it into images.**\n\nYou can run the API through Docker Compose, only requirement is geckodriver present in project root:\n```shell\ndocker compose up -d --build\n```\nDockerfile will handle installing and setting up Firefox path and geckodriver path.\n\nBy default, Compose will forward local port 5031 to container port 8000, where the API is listening.\nYou can change both ports in `docker-compose.yml`, just make sure, that environment variable `UVICORN_PORT` matches new forwarded port on container side.\n\n\n### Manually\n\n1. Download geckodriver and make sure that Firefox is installed\n2. Optionally configure search country\n3. Set paths to geckodriver and Firefox in `.env` file\n4. Install all Python packages from `requirements.txt`\n5. Start the api via `uvicorn` setting up `PYTHONPATH` to project root\n\n```shell\necho \"FIREFOX_BIN=/path/to/firefox\" \u003e\u003e .env\necho \"FIREFOX_DRIVER=/path/to/geckodriver\" \u003e\u003e .env\npip install -r requirements.txt\nPYTHONPATH=$PWD uvicorn src.main.py\n```\n\nUvicorn will by default start the API on address `127.0.0.1:8000`, you can change it via `--host \u003cnew host\u003e` and `--port \u003cnew port\u003e` parameters.\nMore details are in [Uvicorn documentation](https://www.uvicorn.org/settings/).\n\n\n\n## Endpoints\n\nYou can access docs (automatically generated) by `/` or `/redoc/`.\n\nBesides docs there's only one endpoint:\n```shell\n/search/{item_name}\n```\nWhere `item_name` is your search query.\n\nAPI responds with a JSON with first 5 found entries, e.g.:\n```json\n[\n    [\n        \"The Matrix\",\n        \"1999\",\n        {\n            \"Stream\": [\n                [\n                    \"Max Amazon Channel\",\n                    \"https://click.justwatch.com/super-long-just-watch-url-to-external-service\",\n                    \"Subs HD\"\n                ],\n                [\n                    \"Max\",\n                    \"https://click.justwatch.com/super-long-just-watch-url-to-external-service\",\n                    \"Subs 4K\"\n                ]\n            ],\n            \"Rent\": [\n                [\n                    \"Apple TV\",\n                    \"https://click.justwatch.com/super-long-just-watch-url-to-external-service\",\n                    \"$3.99 4K\"\n                ],\n                [\n                    \"Amazon Video\",\n                    \"https://click.justwatch.com/super-long-just-watch-url-to-external-service\",\n                    \"$3.99 4K\"\n                ]\n            ],\n            \"Buy\": [\n                [\n                    \"Apple TV\",\n                    \"https://click.justwatch.com/super-long-just-watch-url-to-external-service\",\n                    \"$14.99 4K\"\n                ],\n                [\n                    \"Amazon Video\",\n                    \"https://click.justwatch.com/super-long-just-watch-url-to-external-service\",\n                    \"$14.99 HD\"\n                ]\n            ]\n        }\n    ],\n    [\n        \"The Matrix Resurrections\",\n        \"2021\",\n        {\n          \"Rent\": [\n                [\n                    \"Amazon Video\",\n                    \"https://click.justwatch.com/super-long-just-watch-url-to-external-service\",\n                    \"$3.79 4K\"\n                ],\n                [\n                    \"Apple TV\",\n                    \"https://click.justwatch.com/super-long-just-watch-url-to-external-service\",\n                    \"$3.99 4K\"\n                ]\n            ],\n            \"Buy\": [\n                [\n                    \"Apple TV\",\n                    \"https://click.justwatch.com/super-long-just-watch-url-to-external-service\",\n                    \"$14.99 4K\"\n                ],\n                [\n                    \"Amazon Video\",\n                    \"https://click.justwatch.com/super-long-just-watch-url-to-external-service\",\n                    \"$14.99 4K\"\n                ]\n            ]\n        }\n    ],\n    [\n        \"The Matrix Reloaded\",\n        \"2003\",\n        {\n            \"Stream\": [\n                [\n                    \"Max Amazon Channel\",\n                    \"https://click.justwatch.com/super-long-just-watch-url-to-external-service\",\n                    \"Subs HD\"\n                ],\n                [\n                    \"Max\",\n                    \"https://click.justwatch.com/super-long-just-watch-url-to-external-service\",\n                    \"Subs 4K\"\n                ]\n            ]\n            \"Buy\": [\n                [\n                    \"AMC on Demand\",\n                    \"https://click.justwatch.com/super-long-just-watch-url-to-external-service\",\n                    \"$4.99 HD\"\n                ],\n                [\n                    \"DIRECTV\",\n                    \"https://click.justwatch.com/super-long-just-watch-url-to-external-service\",\n                    \"$11.99 4K\"\n                ]\n            ]\n        }\n    ],\n    [\n        \"The Matrix Revolutions\",\n        \"2003\",\n        {\n            \"Stream\": [\n                [\n                    \"Max Amazon Channel\",\n                    \"https://click.justwatch.com/super-long-just-watch-url-to-external-service\",\n                    \"Subs HD\"\n                ],\n                [\n                    \"Max\",\n                    \"https://click.justwatch.com/super-long-just-watch-url-to-external-service\",\n                    \"Subs 4K\"\n                ]\n            ],\n            \"Rent\": [\n                [\n                    \"Apple TV\",\n                    \"https://click.justwatch.com/super-long-just-watch-url-to-external-service\",\n                    \"$3.99 4K\"\n                ],\n                [\n                    \"Amazon Video\",\n                    \"https://click.justwatch.com/super-long-just-watch-url-to-external-service\",\n                    \"$3.99 4K\"\n                ]\n            ]\n        }\n    ],\n    [\n        \"The Matrix Revisited\",\n        \"2001\",\n        {\n            \"Rent\": [\n                [\n                    \"Apple TV\",\n                    \"https://click.justwatch.com/super-long-just-watch-url-to-external-service\",\n                    \"$2.99\"\n                ],\n                [\n                    \"Amazon Video\",\n                    \"https://click.justwatch.com/super-long-just-watch-url-to-external-service\",\n                    \"$2.99\"\n                ]\n            ],\n            \"Buy\": [\n                [\n                    \"Apple TV\",\n                    \"https://click.justwatch.com/super-long-just-watch-url-to-external-service\",\n                    \"$9.99\"\n                ],\n                [\n                    \"Amazon Video\",\n                    \"https://click.justwatch.com/super-long-just-watch-url-to-external-service\",\n                    \"$9.99\"\n                ]\n            ]\n        }\n    ]\n]\n```\n(actual response has more options for services where you can access movies, I've trimmed it down for this example)\n\nAPI will always respond with 5 best matching values, as JustWatch will match any string to something.\n\n\n\n## Limitations and performance\n\nAPI doesn't return any additional details other than title, year and where to watch things.\nIt looks only at search result site, it doesn't access individual movies/shows.\n\nIt responds always with 5 best matching entries as by default JustWatch loads only 5, and it will always load up something, regardless of whether input made any sense.\n\nAPI is also quite slow, especially when running on less powerful machine, like Raspberry PI.\nThat's the reason for limited details in responses.\n\n\n\n## Disclaimer\n\nThis bot is in no way affiliated, associated, authorized, endorsed by, or in any way officially connected with JustWatch.\nThis is an independent and unofficial project.\nUse at your own risk.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felectronic-mango%2Fjustwatch-selenium-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felectronic-mango%2Fjustwatch-selenium-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felectronic-mango%2Fjustwatch-selenium-api/lists"}