GAPI

Quick start

One call, one response. Pick your language — the request is the same everywhere: a url parameter and your key in a header.

curl -G 'https://api.gapi.dev/v2/vk' \
  --data-urlencode 'url=https://vkvideo.ru/video-122033519_456246913' \
  -H 'X-API-Key: gapi_live_your_key_here'

Reading the answer

You do not need to know what the link was before calling. Read type, then walk media: it is always there and always has at least one item. VK returns one entry per height it holds, each labelled in quality, so pick from the array. YouTube takes a format instead and hands back the single file you asked for.

data = response.json()

for item in data["media"]:
    download(item["url"])        # one item, or ten — same loop