#100DaysOfCode in Python Transcripts
Chapter: Days 43-45: Consuming HTTP services
Lecture: Exploring the service

Login or purchase this course to watch this video and the rest of the course contents.
0:00 Over here at movie_service by talkpython.fm we have a service that has, I guess probably a couple thousand movies.
0:09 Notice down here this does not have all the movie data that you might want, it only has some of the movies, but it's
0:15 more than enough for us to play with. There's three things that this service will let you do.
0:21 It will let you basically search by keyword, so we come over here and call API search, and here we're searching for run.
0:30 And firefox likes to give you this pretty view here, let's go in and just look at the raw, so you can know what you're getting.
0:36 So here, the keyword is run, and we've got some hits. And hits were for things like 'The Rundown',
0:42 and 'Runaway Bride', and 'Bladerunner' and 'Chicken Run', and all these movies here. So we'll be able to put whatever we want in the
0:50 here, if we wanted away, boom. 'Flushed Away' is the first result. It apparently has to do with sewers and rats and frogs.
0:57 Anyway, we can search for these movies using the service, and what we get back is this format here called JSON,
1:03 which is the JavaScript Object Notation. This is probably the most popular format for data exchange over these HTP services.
1:13 So it's great we can do it here, but we also want to do this in a slightly more structured way. So we're going to look at two ways.
1:22 One using a tool specifically for accessing and working with APIs, cause it is pretty simple to go up here and type enter
1:30 but what if our interaction required us to change the headers? If our interaction required us to do an HTTP POST rather than
1:36 a GET, which is what you normally do in browsers. That gets tricky. So we're going to see a tool that helps us explore the full
1:43 spectrum of APIs, and then we're going to interact with it from Python.


Talk Python's Mastodon Michael Kennedy's Mastodon