An HTTP GET request asks a web server or API for a resource or result. A browser uses GET to retrieve a web page, while an application can use it to request data. The request usually identifies a URL and may include key-value parameters in the URL. section 5.3.1
https://<base address>/<endpoint>
A common API URL combines a base address with an endpoint. section 5.3.1
Query parameters follow a question mark and use ampersands to separate multiple values. For example, a weather request can pass a date to a forecast endpoint. The server returns a response, often JSON, which code can parse into usable data. section 5.3.1
Requesting movie information with Python
The requests library sends a GET request to TMDB with an API key and a movie search term. Calling response.json() produces a dictionary whose results list contains movie records such as titles, identifiers, overviews, release dates, and ratings. section 11.1.1
>>> import requests
>>> params = {'api_key': 'Replace with your API key', 'query': 'ferris bueller'}
>>> response = requests.get('https://api.themoviedb.org/3/search/movie', params=params)
>>> response.json()
This minimal Python request supplies query parameters separately from the URL and parses the returned JSON. section 11.1.1













