Creating an API key and querying the API