What is the proper way to reference external js library?

I’m trying to use Yandex maps JSAPI and having trouble with it:

I need to load a library from https://api-maps.yandex.ru/2.1/?lang=ru_RU&apikey=<MY API-KEY. How can I achieve this?

Currently I’m using LOADERR to load libs, but i cant reference them from Custom HTML — it says “function is not defined”.