Also, I don't see you supplying an API Key in your blocks.
Using a piece of text like 'not found' as a default value poisons further evaluation in a deeply nested structure like you built. Respect the the enclosing dictionary block by suppying it with an empty dictionary, or a specially built dictionary with dummy entries.