The Movie Database support

So I have a form-field where users are meant to search for a specific title of their choice. Problem is I am getting {status_code: 7, status_message: 'Invalid API key: You must be granted a valid key.', success: false}

I do have a valid key, and I can do discover searches just fine, with https://api.themoviedb.org/3/discover/movie?api_key=***************

But I guess it's a different url for searching titles? I currently have https://api.themoviedb.org/3/search/search-movies?api_key=*************&inputValue (inputValue = user input)

Is this the correct url? Or is it something else?

2 svar (på side 1 af 1)

Jump to last post

@seyman said:
Correct way of searching for title?
So I have a form-field where users are meant to search for a specific title of their choice.
Problem is I am getting {status_code: 7, status_message: 'Invalid API key: You must be granted a valid key.', success: false}
I do have a valid key, and I can do discover searches just fine, with
https://api.themoviedb.org/3/discover/movie?api_key=***************
But I guess it's a different url for searching titles? I currently have
https://api.themoviedb.org/3/search/search-movies?api_key=*************&inputValue (inputValue = user input)
Is this the correct url? Or is it something else?

Your API Request using title is in error.
In this link you can find the API Request for searching using the title, and some more parameters.
https://developers.themoviedb.org/3/search/search-movies
Some examples:

https://api.themoviedb.org/3/search/movie?api_key=THE_KEY&language=en-US&query=Star+Trek&page=1&include_adult=false&primary_release_year=2009
https://api.themoviedb.org/3/search/movie?api_key=THE_KEY&language=en-US&query=Star+Trek&page=1
https://api.themoviedb.org/3/search/movie?api_key=THE_KEY&query=Star+Trek&page=1
https://api.themoviedb.org/3/search/movie?api_key=THE_KEY&query=Star+Trek

Thank you, worked like a charm!

Kan du ikke finde en film eller TV-serie? Log in og opret den.

Want to rate or add this item to a list?

Log ind