I doubt there is a unique unitId for each NPC in the game.
At least it wasn't in the past afaik.
Most of the GetUnit... functions use the unitTag (no id) which is a string like
"group1" etc and only work for yourself or group/guild members.
e.g. GetUnitName("player") will return your own character's name.
But I doubt you can use GetUnitName(npc).
Maybe only if you move the mouse over it and use this code:
The 8738 seems to be an internal ID used on the UESP website. Not sure if this is also an ID used within the ESO code somewhere.