Welcome to the Microsoft Q&A Platform! Thank you for asking your question here.
This API gives you detailed, unfiltered cost data from your Azure bill. It's helpful for smaller datasets and lets you see usage details for each individual meter.
https://learn.microsoft.com/en-us/azure/cost-management-billing/costs/manage-automation
The Query API lets you analyze cost data in different ways, so you can filter and group costs by various factors.
https://learn.microsoft.com/en-us/rest/api/cost-management/
This API generates detailed cost reports and lets you filter the data on your own after getting information for all resources in your subscription.
https://learn.microsoft.com/en-us/rest/api/cost-management/generate-cost-details-report/create-operation?view=rest-cost-management-2024-08-01&tabs=HTTP
For larger datasets or recurring reports, set up the Exports API to automatically export your cost details to Azure Storage in CSV format on a scheduled basis.
If you have any further queries, do let us know.
If the answer is helpful, please and "Upvote it".