How get API ID form sub domain

How get API ID form sub domain (/api/v1/)

Example:

kobo.Afifalgbre.org

And we have

Kobo2.Afifalgbre.org

So far no answer has been given
I know the way https: // kc.afifalgbre.org / api / v1 /

But it does not work with sub domain 2
Kobo2.Afifalgbre.org