25. Get Our Transcript on JSON


Not sure what is wrong with my code. It seems like simple instruction which is very similar to code already seen on lines 8 and 9 in 23. Intro To Transcripts. Here's my code:

from urllib2 import urlopen
from json import load

key = "API_KEY"
url = "http://api.npr.org/transcript"
url += '?apiKey=key'
url += '&format=json'
url += '&id=152248901'

response = urlopen(url)
j = load(response)

The error I'm getting is: Your value of j is incorrect. Make sure you called the urlopen and load correctly.


could you provide the link to the exercise....


On Codecademy's homepage, scroll to the bottom and just above the footer it says 'Learn APIs'. If you click the link it takes you to a number of courses about APIs, some of which use Python. I am going through the course 'Learn to use the NPR API'. You can unlock successive lessons by completing the previous ones. I'm stuck on 25 Get Our Transcript on JSON.


Access Parameters



The apiKey parameter is required for all API requests.
To get a key, you must register.
Once registered, you can get and/or change your apiKey from your Account Manager.
Upon registration, your apiKey will be saved to a cookie that will enable the Query Generator to apply your apiKey to your queries..

And the link i was asking for was