The Movie Database サポート

is there any API for params and genre i want to search from my value on filtered my chosen genre

5 replies (on page 1 of 1)

Jump to last post

@chinguunForce said:
Full filter on movie
is there any API for params and genre i want to search from my value on filtered my chosen genre

I assume you are referring to Discover API Request.
https://developer.themoviedb.org/reference/discover-movie
Using Search you cannot filter by Genre.

Discover - Filter by Genre
First you need to have the list of Genres with their IDs.
The list of Genre IDs, for Movies and TV, can be found here:
get/genre/movie/list - https://developers.themoviedb.org/3/genres/get-movie-list
get/genre/tv/list - https://developers.themoviedb.org/3/genres/get-tv-list

For example, the Comedy Genre ID for movies is 35.

Knowing the Genre ID you want, make an API Request of type:
get / discover / movie
https://developers.themoviedb.org/3/discover/movie-discover
get / discover / tv
https://developers.themoviedb.org/3/discover/tv-discover
And use the with_genres and/or without_genres parameter.
More than one genre can be searched using the comma or pipe feature

Also note that a number of filters support being comma (,) or pipe (|) separated.
Comma's are treated like an AND and query while Pipe's are an OR.

AND (with Comma) &with_genres=35,37,80
OR (with Pipe) &with_genres=35|37|80
You cannot mix AND with OR. Either one or the other.

You can use any other filter simultaneously.
&year=, &sort_by=, &with_cast= etc...

Example

https://api.themoviedb.org/3/discover/movie?api_key=THE_KEY&language=pt-BR&page=1&with_genres=35,37,80  
https://api.themoviedb.org/3/discover/tv?api_key=THE_KEY&language=pt-BR&page=1&with_genres=35,37,80  

@ticao2 said:

@chinguunForce said:
Full filter on movie
is there any API for params and genre i want to search from my value on filtered my chosen genre

I assume you are referring to Discover API Request.
https://developer.themoviedb.org/reference/discover-movie
Using Search you cannot filter by Genre.

Discover - Filter by Genre
First you need to have the list of Genres with their IDs.
The list of Genre IDs, for Movies and TV, can be found here:
get/genre/movie/list - https://developers.themoviedb.org/3/genres/get-movie-list
get/genre/tv/list - https://developers.themoviedb.org/3/genres/get-tv-list

For example, the Comedy Genre ID for movies is 35.

Knowing the Genre ID you want, make an API Request of type:
get / discover / movie
https://developers.themoviedb.org/3/discover/movie-discover
get / discover / tv
https://developers.themoviedb.org/3/discover/tv-discover
And use the with_genres and/or without_genres parameter.
More than one genre can be searched using the comma or pipe feature

Also note that a number of filters support being comma (,) or pipe (|) separated.
Comma's are treated like an AND and query while Pipe's are an OR.

AND (with Comma) &with_genres=35,37,80
OR (with Pipe) &with_genres=35|37|80
You cannot mix AND with OR. Either one or the other.

You can use any other filter simultaneously.
&year=, &sort_by=, &with_cast= etc...

Example

https://api.themoviedb.org/3/discover/movie?api_key=THE_KEY&language=pt-BR&page=1&with_genres=35,37,80  
https://api.themoviedb.org/3/discover/tv?api_key=THE_KEY&language=pt-BR&page=1&with_genres=35,37,80  

i want to search movie from filtered by genre eg: https://api.themoviedb.org/3/discover/movie?api_key=THE_KEY&language=pt-BR&page=1&with_genres=35,37,80&query={searhedValue}

@chinguunForce said:
i want to search movie from filtered by genre eg:
https://api.themoviedb.org/3/discover/movie?api_key=THE_KEY&language=pt-BR&page=1&with_genres=35,37,80&query={searhedValue}

Do you want to search using a movie title?
As I said, it is not possible.
The Search API request does not have the ability to filter the response using the Genre parameter.
And the Discover API request does not have the ability to use a query for title, &query={searhedValue}.

By the way, the possible filters for each are listed on the pages of each of them.
You can see for yourself the available/possible filters.
https://developer.themoviedb.org/reference/search-movie
https://developer.themoviedb.org/reference/discover-movie

okay got it thank you.

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

全般

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

メディアのページ

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

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

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

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

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

全ての画像のページ

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

全ての編集ページ

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

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

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

設定

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

ログイン

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

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