The Movie Database サポート

While searching for the revenue field in the discover endpoint, I was wondering if this was removed from the endpoint, find below my code written in python and look at the response, the revenue field is not present.

Of course I can get the movie_ids from this response and pass them to the /movie/{movie_id} endpoint, but it wouldn't be an efficient way.

Do you have another option I can follow?

## highest earning films on 2022
url = (
        f"https://api.themoviedb.org/3/discover/movie?"
        f"api_key={API_KEY}&"
        f"primary_release_year=2022&"
        f"sort_by=release_date.asc"
    )
r = requests.get(url)
r.json()
{'page': 1,
 'results': [{'adult': False,
   'backdrop_path': None,
   'genre_ids': [99],
   'id': 1059234,
   'original_language': 'fr',
   'original_title': 'Toboggan aquatique',
   'overview': 'At the Geneva Exposition fairground, the Water-Toboggan, a sensational American attraction, is enjoyed by members of the Lavanchy-Clarke family and the Swiss painter Cuno Amiet, but no one is aware of them since they look just like everyone else.',
   'popularity': 0.6,
   'poster_path': None,
   'release_date': '2022-10-03',
   'title': 'Toboggan aquatique',
   'video': False,
   'vote_average': 0,
   'vote_count': 0},
  {'adult': False,
   'backdrop_path': None,
   'genre_ids': [99],
   'id': 1059360,
   'original_language': 'fr',
   'original_title': 'Ronde familiale dans le jardin de la villa de François-Henri Lavanchy-Clarke à Genève',
   'overview': 'The location is the same as Laveuses, and the vue is an example of a home movie, with people playing or fooling around, fully aware of the camera. When you have a Cinématographe Lumière, why only use the Kodak Panoram? The child’s pushcart bears the name Helvetia, the naturalized Swiss version of the Sunlight brand, whose factory was launched in Olten in October 1898.',
   'popularity': 0.6,
   'poster_path': None,

1 reply (on page 1 of 1)

Jump to last post

@felixvidalgu said:

Of course I can get the movie_ids from this response and pass them to the /movie/{movie_id} endpoint, but it wouldn't be an efficient way.

I believe this would be the only way to get the actual revenue numbers.

One thing to consider is that while revenue isn't included in the discover output, discover can sort by revenue. So for example, if you wanted the 10 highest revenue films you can sort by revenue.desc and then you only have to lookup the details on the first 10 movies.

See the movie discover doc for more details.

映画やテレビ番組が見つかりませんか?ログインして作成してください。

全般

s 検索バーに移動する
p プロファイルメニューを開く
esc 開いているウィンドウを閉じる
? キーボードショートカットウィンドウを開く

メディアのページ

b 戻る(または該当する場合は親に)
e 編集ページに行く

テレビ番組のシーズンのページ

(右矢印)次のシーズンに行く
(左矢印)前のシーズンに戻る

テレビ番組のエピソードのページ

(右矢印)次のエピソードに進む
(左矢印)前のエピソードに戻る

全ての画像のページ

a 画像追加ウィンドウを開く

全ての編集ページ

t 翻訳選択を開く
ctrl+ s フォームを送信する

ディスカッションのページ

n 新しいディスカッションを作成する
w 監視ステータスを切り替える
p 公開/非公開を切り替える
c 閉じる/開くを切り替える
a アクティビティを開く
r ディスカッションに返信
l 最後の返事に行く
ctrl+ enter メッセージを送信する
(右矢印)次のページ
(左矢印)前のページ

設定

このアイテムを評価したり、リストに追加したりしたいですか?

ログイン

メンバーではありませんか?

登録してコミュニティに参加