The Movie Database 支持

Could you help, what request can get info about Age Rating of movie and TVShow?

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

Jump to last post

TMDb has certifications and content ratings (like MPAA, etc.) available in the following two end points:

Cheers.

I get a null response when I enter:

https://api.themoviedb.org/3/tv/1408/content_ratings&api_key=&language=en

Is this the correct format?

@Dan Hinsley said:
I get a null response when I enter:
https://api.themoviedb.org/3/tv/1408/content_ratings&api_key=&language=en
Is this the correct format?

I believe there is a small error in your API Request.
You put the " & " character.
The correct character is " ? " .

Would be like this    
https://api.themoviedb.org/3/tv/1408/content_ratings?api_key=THE_KEY  
Not this  
https://api.themoviedb.org/3/tv/1408/content_ratings&api_key=<key>&language=en    

Oops. So I tried:

https://api4.thetvdb.com/v4/tv/1408/content_ratings?language=en

Supplying my token in the Authorization header (like I do for all calls), but still get a null return.

That is a call to TVDB.

Here is an example working call to the /content_ratings method:

Request

curl -v "https://api.themoviedb.org/3/tv/1408/content_ratings?api_key=###"

*   Trying 52.84.162.78:443...
* Connected to api.themoviedb.org (52.84.162.78) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_128_GCM_SHA256
* ALPN, server accepted to use h2
* Server certificate:
*  subject: CN=*.themoviedb.org
*  start date: Oct 21 00:00:00 2021 GMT
*  expire date: Nov 18 23:59:59 2022 GMT
*  subjectAltName: host "api.themoviedb.org" matched cert's "*.themoviedb.org"
*  issuer: C=US; O=Amazon; OU=Server CA 1B; CN=Amazon
*  SSL certificate verify ok.
* Using HTTP2, server supports multiplexing
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x7fa0a400a800)
> GET /3/tv/1408/content_ratings?api_key=### HTTP/2
> Host: api.themoviedb.org
> user-agent: curl/7.81.0
> accept: */*
>
* Connection state changed (MAX_CONCURRENT_STREAMS == 128)!
< HTTP/2 200
< content-type: application/json;charset=utf-8
< content-length: 335
< date: Mon, 21 Mar 2022 21:21:48 GMT
< server: openresty
< access-control-allow-origin: *
< access-control-allow-methods: GET, HEAD, POST, PUT, DELETE, OPTIONS
< access-control-expose-headers: ETag, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, Retry-After, Content-Length, Content-Range
< cache-control: public, max-age=28800
< x-memc: HIT
< x-memc-key: 88904df4af68fb04f80ae08739acfd4666e2fd07
< x-memc-age: 1174
< x-memc-expires: 13679
< etag: W/"cdf44ecf804c84a2e1d5f3556084fdac"
< vary: Accept-Encoding,Accept-Encoding
< x-cache: Miss from cloudfront
< via: 1.1 618052a0d9c86c1a3bf663f82d041d1c.cloudfront.net (CloudFront)
< x-amz-cf-pop: SEA19-C3
< x-amz-cf-id: nKgt9ZaEdppqS0TXX-2V_AolSEEh6teqI9u61kV-ucfbXbhyUcqyVA==
<
* Connection #0 to host api.themoviedb.org left intact

Response

{
  "results": [
    {
      "iso_3166_1": "DE",
      "rating": "16"
    },
    {
      "iso_3166_1": "US",
      "rating": "TV-14"
    },
    {
      "iso_3166_1": "FR",
      "rating": "10"
    },
    {
      "iso_3166_1": "RU",
      "rating": "16+"
    },
    {
      "iso_3166_1": "GB",
      "rating": "18"
    },
    {
      "iso_3166_1": "BR",
      "rating": "14"
    },
    {
      "iso_3166_1": "HU",
      "rating": "16"
    },
    {
      "iso_3166_1": "LT",
      "rating": "N-14"
    },
    {
      "iso_3166_1": "ES",
      "rating": "16"
    }
  ],
  "id": 1408
}

Thanks, another question, is there any way to piggyback this onto another call (using append_to_response)?

@Dan Hinsley said:
Thanks, another question, is there any way to piggyback this onto another call (using append_to_response)?

I think so.
It would be this API Request.

https://api.themoviedb.org/3/tv/1408?api_key=THE_KEY&language=en-US&append_to_response=content_ratings

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

全站通用

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

在媒体页面

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

在电视季页面

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

在电视集页面

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

在所有图像页面

a 打开添加图片窗口

在所有编辑页面

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

在讨论页面

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

设置

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

登录

还不是会员?

注册加入社区