extracted api key from the window namespace