Go on your Video analytics interface in YouTube Studio.
Open the Web Developer Tools Network tab of your web-browser (by using Ctrl + Shift + E on Firefox for instance).
Now select Audience, pay attention to select one of following:
Because options:
Are maybe unavailable (depends on the time of video upload):
Total number of unique viewers is only available for periods of up to
90 days to ensure data quality.
You should see a request to get_cards, copy it as cURL (by right-clicking).
Pay attention to remove -H 'Accept-Encoding: gzip, deflate, br' from it in order to get the JSON response in a human readable format. Otherwise you would face the following warning:
Warning: Binary output can mess up your terminal. Use "--output -" to tell curl to output it to your terminal anyway, or consider "--output " to save to a file.
In --data-raw request argument --data-raw '{"screenConfig":{"entity":{"videoId":"VIDEO_ID"} pay attention to change the VIDEO_ID for the one interesting you.
Execute the modified cURL request and your Unique viewers value is in the JSON response at the key /cards/7/keyMetricCardData/keyMetricTabs/3/primaryContent/total.