Hello @Rafal Fraczek Thank you for posting your question on Microsoft Q&A platorm!
This API GET https://prices.azure.com/api/retail/prices?$filter=serviceName eq 'SQL Database' and location eq 'EU West' and productName eq 'SQL Database SingleDB/Elastic Pool Hyperscale - Compute Gen5' and skuName eq '2 vCore' is giving the 2vcore cost for the SQL DB hyperscale compute Gen5 cost for hardware only.
In pricing calculator, this is the config which will show the same price which matches the above retail price API:
The license software cost is billed on a separate meter and for that you can call this retail price API https://prices.azure.com/api/retail/prices?$filter=productName eq 'SQL Database SingleDB/Elastic Pool Hyperscale - SQL License' and priceType eq 'Consumption' and armRegionName eq 'Global'.
In this API response, you will get 1 vcore cost and you multiple the same with 2 for 2vcore license charge hourly.
Hope this helps!
If the response helped, do "Accept Answer" and up-vote it