Complete the code to set the API base URL.
api_base_url = "[1]"
The API base URL must include the protocol (https://) to be valid and accessible.
Complete the code to add a header for JSON content type.
headers = {"Content-Type": "[1]"}APIs commonly use 'application/json' as the content type for sending and receiving JSON data.
Fix the error in the code to correctly send a GET request using the requests library.
response = requests.[1](api_base_url, headers=headers)To retrieve data from an API, the GET method is used. Using POST or others would change the request type.
Complete the code to parse JSON response and extract the 'data' field.
json_response = response.[1]() data = json_response"data"
Use the json() method to parse the response, then access the 'data' field using square brackets.
Fill both blanks to create a dictionary comprehension filtering items with value > 10.
filtered = {k: v for k, v in data.items() if v [1] 10 and [2](k, str)}Dictionary comprehension uses ':' to separate keys and values. The condition checks if value is greater than 10 and key is a string using isinstance.