The Movie Database Support

Api is not working, we get axios error 404 (AxiosError {message: 'Request failed with status code 404', name: 'AxiosError', code: 'ERR_BAD_REQUEST', config: {…}, request: XMLHttpRequest)

5 replies (on page 1 of 1)

Jump to last post

@kartikey12 said:
/search/multi
Api is not working, we get axios error 404 (AxiosError {message: 'Request failed with status code 404', name: 'AxiosError', code: 'ERR_BAD_REQUEST', config: {…}, request: XMLHttpRequest)

It makes solving your problem much easier when you post the API Request used here.
Problems with API Request

In order for someone to help you with API Request questions,
it is critical that you post here the API Request you are sending to the TMDb server.
Remember to replace your Key with MY_KEY , YOUR_KEY , THE_KEY , or something like that.

Not the programming code/script you used to build the API Request.
But the API Request that is sent to the TMDb server.
Or the API Request you would like to send.

Indeed @kartikey12, you can see here your request is working properly (replace ### with your API key):

https://api.themoviedb.org/3/search/multi?api_key=###&query=star+wars

With regards to Axios, unless somebody who is familiar with Axios comes across this, you might not get the help you're looking for. I usually recommend heading over to Stack Overflow where you can ask a specific question to those familiar with the technology you're using.

I am still getting error 404 using this code.

 fatchDataFromApi(`/search/multi?api_key=###&query=${query}&page=${pageNum}`).then(
        (res) => {
            setData(res);
            setPageNum((prev) => prev + 1);
            setLoading(false);

        }
    );

A 404 error usually means you messed up the path and not the query. I see you are using

/search/multi?

maybe you need

/3/search/multi?

Can't find a movie or TV show? Login to create it.

Global

s focus the search bar
p open profile menu
esc close an open window
? open keyboard shortcut window

On media pages

b go back (or to parent when applicable)
e go to edit page

On TV season pages

(right arrow) go to next season
(left arrow) go to previous season

On TV episode pages

(right arrow) go to next episode
(left arrow) go to previous episode

On all image pages

a open add image window

On all edit pages

t open translation selector
ctrl+ s submit form

On discussion pages

n create new discussion
w toggle watching status
p toggle public/private
c toggle close/open
a open activity
r reply to discussion
l go to last reply
ctrl+ enter submit your message
(right arrow) next page
(left arrow) previous page

Settings

Want to rate or add this item to a list?

Login