How to get data from OMDb API web service

Try the values in parameters table in their website by making use of the examples section. Use different parameters for different responses.

For example, to request for a movie with title "inception", just put in this entry and hit search in the text field and it generates the link for you.

I will attach the link here so that you will get the idea http://www.omdbapi.com/?t=inception&y=&plot=short&r=json

Hit the above link and it will generate the required response. So this is the link pattern that you should use in your iOS project.

Have fun with iOS..

Update:

Currently, omdbapi requires an api key for getting the correct response, which can be acquired by either signing up like @appy-sharma describes in his answer or using their free key(which has a limit).


You have to sign up from their website and then you will receive a link with your api key. The link in the email will look something like this:

http://www.omdbapi.com/?i=tt3896198&apikey=k83ue93

If you will notice, in the end of the link you will find &apikey=k83ue93, save it. (Don't worry it's not a valid api key)

Going back to their site and reading the documentation you can see by using parameters you can look for the movie. For a simple example, lets say you want to get the data of the movie JOKER then your url will look like this:

http://www.omdbapi.com/?t=joker&apikey=k83ue93

this is when you will search a movie with their title name using ?t=titlename

http://www.omdbapi.com/?i=tt7286456&apikey=k83ue93

this is when you will try to fetch the movie with its id using ?i=idnumber

Check their documentation. They are really simple. Check the parameters and play with them. Whoever reading this, don't worry. If you are new and if you think this is scary, dont worry! you already came this far dealing with apis, you will reach there.

Happy coding.