The Movie Database 支持

Hi,

Currently using API to make movie and tv shows discover requests. API request that I have been using for months suddenly stopped working. Below is an example of such request with filters:

https://api.themoviedb.org/3/discover/movie?api_key=THE_KEY&with_genres=28&primary_release_date.gte=2000-01-01&primary_release_date.lte=2023-08-27&with_watch_providers=8&watch_region=us&sort_by=popularity.desc&page=1&language=en&region=us

Any reason why a request like the one above used to work but not anymore?

Thank you

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

Jump to last post

@Gil2599 said:
Discover with_watch_providers no longer works like before
Hi,
Currently using API to make movie and tv shows discover requests. API request that I have been using for months suddenly stopped working. Below is an example of such request with filters:
https://api.themoviedb.org/3/discover/movie?api_key=THE_KEY&with_genres=28&primary_release_date.gte=2000-01-01&primary_release_date.lte=2023-08-27&with_watch_providers=8&watch_region=us&sort_by=popularity.desc&page=1&language=en&region=us
Any reason why a request like the one above used to work but not anymore?
Thank you

Try correcting your last 2 parameters.
language=en-US&region=US

@ticao2 said:

@Gil2599 said:
Discover with_watch_providers no longer works like before
Hi,
Currently using API to make movie and tv shows discover requests. API request that I have been using for months suddenly stopped working. Below is an example of such request with filters:
https://api.themoviedb.org/3/discover/movie?api_key=THE_KEY&with_genres=28&primary_release_date.gte=2000-01-01&primary_release_date.lte=2023-08-27&with_watch_providers=8&watch_region=us&sort_by=popularity.desc&page=1&language=en®ion=us
Any reason why a request like the one above used to work but not anymore?
Thank you

Try correcting your last 2 parameters.
language=en-US®ion=US

Still nothing:

https://api.themoviedb.org/3/discover/movie?api_key=THE_KEY&with_genres=&primary_release_date.gte=&primary_release_date.lte=&with_watch_providers=8&watch_region=us&sort_by=popularity.desc&page=1&language=en-US&region=US

Perhaps something changed on backend where API functionality changed? Exact request above used to work fine.

@Gil2599 said:
Still nothing:

https://api.themoviedb.org/3/discover/movie?api_key=THE_KEY&with_genres=&primary_release_date.gte=&primary_release_date.lte=&with_watch_providers=8&watch_region=us&sort_by=popularity.desc&page=1&language=en-US&region=US

Perhaps something changed on backend where API functionality changed? Exact request above used to work fine.

In your last example, several parameter values are missing.
Let's compare your first example, the one at the beginning of this conversation.
Yours is 1. Mine is 2.

1 - https://api.themoviedb.org/3/discover/movie?api_key=THE_KEY&with_genres=28&primary_release_date.gte=2000-01-01&primary_release_date.lte=2023-08-27&with_watch_providers=8&watch_region=us&sort_by=popularity.desc&page=1&language=en&region=us  
2 - https://api.themoviedb.org/3/discover/movie?api_key=THE_KEY&with_genres=28&primary_release_date.gte=2000-01-01&primary_release_date.lte=2023-08-27&with_watch_providers=8&watch_region=US&sort_by=popularity.desc&page=1&language=en-US&region=US

The Country of &watch_region=US is also capitalized.

Indeed, the query #2 above (from @ticao2) is returning 337 results. What about that is not what you expect?

Request

curl -v "https://api.themoviedb.org/3/discover/movie?api_key=###&with_genres=28&primary_release_date.gte=2000-01-01&primary_release_date.lte=2023-08-27&with_watch_providers=8&watch_region=US&sort_by=popularity.desc&page=1&language=en-US&region=US"

*   Trying [2600:9000:20be:600:c:174a:c400:93a1]:443...
* Connected to api.themoviedb.org (2600:9000:20be:600:c:174a:c400:93a1) port 443 (#0)
* ALPN: offers h2,http/1.1
* (304) (OUT), TLS handshake, Client hello (1):
*  CAfile: /etc/ssl/cert.pem
*  CApath: none
* (304) (IN), TLS handshake, Server hello (2):
* (304) (IN), TLS handshake, Unknown (8):
* (304) (IN), TLS handshake, Certificate (11):
* (304) (IN), TLS handshake, CERT verify (15):
* (304) (IN), TLS handshake, Finished (20):
* (304) (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / AEAD-AES128-GCM-SHA256
* ALPN: server accepted h2
* Server certificate:
*  subject: CN=*.themoviedb.org
*  start date: Aug 20 00:00:00 2023 GMT
*  expire date: Sep 17 23:59:59 2024 GMT
*  subjectAltName: host "api.themoviedb.org" matched cert's "*.themoviedb.org"
*  issuer: C=US; O=Amazon; CN=Amazon RSA 2048 M03
*  SSL certificate verify ok.
* using HTTP/2
* h2h3 [:method: GET]
* h2h3 [:path: /3/discover/movie?api_key=###&with_genres=28&primary_release_date.gte=2000-01-01&primary_release_date.lte=2023-08-27&with_watch_providers=8&watch_region=US&sort_by=popularity.desc&page=1&language=en-US&region=US]
* h2h3 [:scheme: https]
* h2h3 [:authority: api.themoviedb.org]
* h2h3 [user-agent: curl/7.88.1]
* h2h3 [accept: */*]
* Using Stream ID: 1 (easy handle 0x7f9a2b011400)
> GET /3/discover/movie?api_key=###&with_genres=28&primary_release_date.gte=2000-01-01&primary_release_date.lte=2023-08-27&with_watch_providers=8&watch_region=US&sort_by=popularity.desc&page=1&language=en-US&region=US HTTP/2
> Host: api.themoviedb.org
> user-agent: curl/7.88.1
> accept: */*
>
< HTTP/2 200
< content-type: application/json;charset=utf-8
< content-length: 11151
< date: Mon, 28 Aug 2023 16:24:37 GMT
< server: openresty
< etag: 3bb245c27d92bbc56967bd7cc71ef678
< cache-control: public, max-age=600
< vary: Accept-Encoding,Accept-Encoding
< x-cache: Hit from cloudfront
< via: 1.1 548adcda884eed02304ba5d6a1d7f514.cloudfront.net (CloudFront)
< x-amz-cf-pop: SEA19-C3
< alt-svc: h3=":443"; ma=86400
< x-amz-cf-id: YApONqcSGXZdrxDl9g3VUXvbpUzDZcGdMJv1y65EPXrfYOUIlI73sA==
< age: 144
< vary: Origin
<
* Connection #0 to host api.themoviedb.org left intact

Response

{
    "page": 1,
    "results": [
        {
            "adult": false,
            "backdrop_path": "/xVMtv55caCEvBaV83DofmuZybmI.jpg",
            "genre_ids": [
                53,
                28
            ],
            "id": 724209,
            "original_language": "en",
            "original_title": "Heart of Stone",
            "overview": "An intelligence operative for a shadowy global peacekeeping agency races to stop a hacker from stealing its most valuable — and dangerous — weapon.",
            "popularity": 2899.65,
            "poster_path": "/vB8o2p4ETnrfiWEgVxHmHWP9yRl.jpg",
            "release_date": "2023-08-09",
            "title": "Heart of Stone",
            "video": false,
            "vote_average": 6.9,
            "vote_count": 824
        },
        {
            "adult": false,
            "backdrop_path": "/AioRI7M077BBR33VimFiyFop2Rc.jpg",
            "genre_ids": [
                28,
                12,
                53
            ],
            "id": 1149381,
            "original_language": "pl",
            "original_title": "Operacja: Soulcatcher",
            "overview": "A military contractor hired to seize a weapon that turns people into savage killers seeks revenge when his brother falls victim to the device.",
            "popularity": 1344.844,
            "poster_path": "/l1f9JSPjCfNftigEii1SDK1g2b3.jpg",
            "release_date": "2023-08-02",
            "title": "Soulcatcher",
            "video": false,
            "vote_average": 6.5,
            "vote_count": 150
        },
        ...truncated...
    ],
    "total_pages": 17,
    "total_results": 337
}

After further testing, it seems like watch_region parameter must be capitalized. Language does not need to be in en-US format (simply en works). Apologies for the bug report as it still works when formatted correctly. Documentation on this would help others in the feature. Following request works as expected:

https://api.themoviedb.org/3/discover/movie?api_key=THE_KEY&with_genres=&primary_release_date.gte=&primary_release_date.lte=&with_watch_providers=8&watch_region=US&sort_by=popularity.desc&page=1&language=en®ion=US

Thread can be closed.

找不到电影或剧集?登录并创建它吧。

全站通用

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

在媒体页面

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

在电视季页面

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

在电视集页面

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

在所有图像页面

a 打开添加图片窗口

在所有编辑页面

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

在讨论页面

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

设置

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

登录

还不是会员?

注册加入社区