Assistance de TMDB

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 réponses (sur la page 1 sur 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.

Un film, une émission télévisée ou un artiste est introuvable ? Connectez-vous afin de créer une nouvelle fiche.

Général

s Mettre le curseur dans la barre de recherche
p Ouvrir le menu du profil
esc Fermer une fenĂŞtre ouverte
? Ouvrir la fenĂŞtre des raccourcis clavier

Sur les pages des médias

b Retour (ou vers le parent si faisable)
e Afficher la page de modification

Sur les pages des saisons des émissions télévisées

Afficher la saison suivante (flèche droite)
Afficher la saison précédente (flèche gauche)

Sur les pages des épisodes des émissions télévisées

Afficher l'épisode suivant (flèche droite)
Afficher l'épisode précédent (flèche gauche)

Sur toutes les pages des images / photos

a Ouvrir la fenĂŞtre d'ajout d'image / photo

Sur toutes les pages de modifications

t Ouvrir le sélecteur de traduction
ctrl+ s Envoyer le formulaire

Sur les pages des discussions

n Créer une nouvelle discussion
w Basculer le statut de suivi
p Basculer publique / privée
c Basculer fermer / ouvrir
a Ouvrir l'activité
r RĂ©pondre Ă  la discussion
l Afficher la dernière réponse
ctrl+ enter Envoyer votre message
Page suivante (flèche droite)
Page précédente (flèche gauche)

Paramètres

Vous souhaitez évaluer ou ajouter cet élément à une liste ?

Connexion