The Movie Database 支持

When I set with_watch_monetization_types free|ads|flatrate I get movies that needs to rented. I tested on viaplay. The movie Juror #2. When searching for the movie on tmdb I can se that it is only available for rent in Sweden.

When I run https://api.themoviedb.org/3/movie/1106739/watch/providers with the movie id of Juror #2, I get that only max has the movie for flatrate.

Do you guys know what is the problem? It has to be bug right?

Happy day from Sebastian

2 回复(第 1 页,共 1 页)

Jump to last post

@Juggernogger93 said:
Don't think discovery with with_watch_monetization_types works
When I set with_watch_monetization_types free|ads|flatrate I get movies that needs to rented.
I tested on viaplay. The movie Juror #2.
When searching for the movie on tmdb I can se that it is only available for rent in Sweden.
When I run https://api.themoviedb.org/3/movie/1106739/watch/providers with the movie id of Juror #2,
I get that only max has the movie for flatrate.
Do you guys know what is the problem? It has to be bug right?
Happy day from Sebastian

It makes things much easier if you post your API Request here.

Problems with API Request

In order for someone to help you with API Request questions,
it is critical that you post here the API Request you are sending to the TMDb server.
Remember to replace your Key with MY_KEY , YOUR_KEY , THE_KEY , or something like that.

Not the programming code/script you used to build the API Request.
But the API Request that is sent to the TMDb server.
Or the API Request you would like to send.

Are you using it together with the watch_region filter?
If you are not using it, you should. It is a necessary condition.
See the explanation in the DOCs.
https://developer.themoviedb.org/reference/discover-movie

with_watch_monetization_types  -  string  
possible values are: [flatrate, free, ads, rent, buy]   
use in conjunction with watch_region,   
can be a comma (AND) or pipe (OR) separated query

This data here on TMDb is obtained daily from the JustWatch service.
I don't know if Viaplay is on JustWatch.
You can check it out yourself.
https://www.justwatch.com/
https://www.justwatch.com/dk/provider/viaplay

It was likely just not available in the cache when you made your request. There is always going to be a ~24 hour delay. Testing now, you can see Viaplay is being returned:

Request

curl -v "https://api.themoviedb.org/3/movie/1106739/watch/providers?api_key=###"

> GET /3/movie/1106739/watch/providers?api_key=### HTTP/2
> Host: api.themoviedb.org
> User-Agent: curl/8.11.1
> Accept: */*
>
* Request completely sent off
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
< HTTP/2 200
< content-type: application/json;charset=utf-8
< content-length: 51704
< date: Fri, 31 Jan 2025 18:47:32 GMT
< server: openresty
< cache-control: public, max-age=17609
< x-memc: HIT
< x-memc-key: f23b115a930b8a0a8d018054f5b9fe7c
< x-memc-age: 5154
< x-memc-expires: 17609
< etag: W/"49764c9ea2a701175da65de0d27c79d5"
< vary: Accept-Encoding,accept-encoding
< x-cache: Miss from cloudfront
< via: 1.1 e76eba87ee47517dc7f2053edfb921bc.cloudfront.net (CloudFront)
< x-amz-cf-pop: SEA900-P5
< alt-svc: h3=":443"; ma=86400
< x-amz-cf-id: jissE1S0daXVHW17s3kRiBje8_C4jRWSSa-_Fmoc3NRsDtqlxyxA2w==
< vary: Origin
<
* Connection #0 to host api.themoviedb.org left intact

Response (truncated)

{
  "id": 1106739,
  "results": {
    ...
    "SE": {
      "link": "https://www.themoviedb.org/movie/1106739-juror-2/watch?locale=SE",
      "buy": [
        {
          "logo_path": "/9ghgSC0MA082EL6HLCW3GalykFD.jpg",
          "provider_id": 2,
          "provider_name": "Apple TV",
          "display_priority": 4
        },
        {
          "logo_path": "/bnoTnLzz2MAhK3Yc6P9KXe5drIz.jpg",
          "provider_id": 76,
          "provider_name": "Viaplay",
          "display_priority": 6
        },
        {
          "logo_path": "/5vfrJQgNe9UnHVgVNAwZTy0Jo9o.jpg",
          "provider_id": 68,
          "provider_name": "Microsoft Store",
          "display_priority": 8
        },
        {
          "logo_path": "/8z7rC8uIDaTM91X0ZfkRf04ydj2.jpg",
          "provider_id": 3,
          "provider_name": "Google Play Movies",
          "display_priority": 9
        },
        {
          "logo_path": "/bZvc9dXrXNly7cA0V4D9pR8yJwm.jpg",
          "provider_id": 35,
          "provider_name": "Rakuten TV",
          "display_priority": 15
        },
        {
          "logo_path": "/sNmIwrniZZORvNJOmEuWGhwBJNf.jpg",
          "provider_id": 426,
          "provider_name": "SF Anytime",
          "display_priority": 17
        },
        {
          "logo_path": "/seGSXajazLMCKGB5hnRCidtjay1.jpg",
          "provider_id": 10,
          "provider_name": "Amazon Video",
          "display_priority": 41
        }
      ],
      "flatrate": [
        {
          "logo_path": "/fksCUZ9QDWZMUwL2LgMtLckROUN.jpg",
          "provider_id": 1899,
          "provider_name": "Max",
          "display_priority": 46
        }
      ],
      "rent": [
        {
          "logo_path": "/9ghgSC0MA082EL6HLCW3GalykFD.jpg",
          "provider_id": 2,
          "provider_name": "Apple TV",
          "display_priority": 4
        },
        {
          "logo_path": "/bnoTnLzz2MAhK3Yc6P9KXe5drIz.jpg",
          "provider_id": 76,
          "provider_name": "Viaplay",
          "display_priority": 6
        },
        {
          "logo_path": "/8z7rC8uIDaTM91X0ZfkRf04ydj2.jpg",
          "provider_id": 3,
          "provider_name": "Google Play Movies",
          "display_priority": 9
        },
        {
          "logo_path": "/bZvc9dXrXNly7cA0V4D9pR8yJwm.jpg",
          "provider_id": 35,
          "provider_name": "Rakuten TV",
          "display_priority": 15
        },
        {
          "logo_path": "/sNmIwrniZZORvNJOmEuWGhwBJNf.jpg",
          "provider_id": 426,
          "provider_name": "SF Anytime",
          "display_priority": 17
        },
        {
          "logo_path": "/seGSXajazLMCKGB5hnRCidtjay1.jpg",
          "provider_id": 10,
          "provider_name": "Amazon Video",
          "display_priority": 41
        }
      ]
    },
    ...
  }
}

找不到电影或节目?登录并创建它吧。

全站通用

s 聚焦到搜索栏
p 打开个人资料菜单
esc 关闭打开的窗口
? 打开键盘快捷键窗口

在媒体页面

b 返回(或返回上级)
e 进入编辑页面

在电视季页面

(右箭头)下一季
(左箭头)前一季

在电视集页面

(右箭头)下一集
(左箭头)上一集

在所有图像页面

a 打开添加图片窗口

在所有编辑页面

t 打开翻译选择器
ctrl+ s 提交

在讨论页面

n 创建新讨论
w 切换关注状态
p 设为公开 / 私密讨论
c 关闭 / 开放讨论
a 打开活动页
r 回复讨论
l 跳转至最新回复
ctrl+ enter 发送信息
(右箭头)下一页
(左箭头)前一页

设置

想给这个条目评分或将其添加到片单中?

登录

还不是会员?

注册加入社区