OMDb-API icon indicating copy to clipboard operation
OMDb-API copied to clipboard

Get All endpoint is not working

Open Parl582 opened this issue 2 years ago • 3 comments

http://www.omdbapi.com/?apikey=[yourkey]&

and also http://img.omdbapi.com/?apikey=[yourkey]& is not working

Even after putting the key unable to get all the data

{ "Response": "False", "Error": "Incorrect IMDb ID." }

Parl582 avatar Oct 31 '23 17:10 Parl582

Your link is missing an argument, add any argument after your api key so it works, like this :

http://www.omdbapi.com/?apikey=[yourkey]&s=ted

i added here the s=ted which means search for movies/series with name ted

hakamNabhani avatar Nov 05 '23 05:11 hakamNabhani

But what if we want the complete data and we want to just filter out the 10 movies in the list. How we will do that

anopenprogrammer avatar Dec 29 '23 16:12 anopenprogrammer

But what if we want the complete data and we want to just filter out the 10 movies in the list. How we will do that

You can add page to the endpoint, this way you can get all the list by simply getting the second page which contains the next 10 movies list, https://www.omdbapi.com/?apikey=[YOUR-KEY]&s=${name}&page=${page}

in here i created async funsction with 2 parameters (name, page) and after when the user fetch the data a button at the end shows up if clicked it increment the page number by 1 and fetch second page

i gave you a kick start, you can figure out how to implement it

hakamNabhani avatar Jan 16 '24 18:01 hakamNabhani