Unauthorized access to internal API. Please refer to https://support.google.com/customsearch/answer/4542055
This error is an indication of trying to directly access the Custom Search Engine’s internal API (‘v1element’). Please use the code snippet found in your CSE control panel. Learn more about Custom Search Element V2 setup.