Python API Call always returns 401

I’m trying to use the CH API with python, the limited documentation I’ve found suggests the following should work, however the site returns 401 each time. any recommendations would be greatly appreciated

request = requests.get(
    auth=(APIKey, ''),
    params={'q': query},

Turns out you have to use a Live app