Get cost details for a pay-as-you-go subscription

If you have an MSDN, Microsoft Online Service Program (MOSP) pay-as-you-go, or Visual Studio Azure subscription, we recommend that you use Exports or the Exports API to get cost details data (formerly known as usage details). The Cost Details API report isn't supported for your subscription type yet.

If you need to download small datasets and you don't want to use Azure Storage, you can also use the Consumption Usage Details API. Instructions about how to use the API are below.


The API is deprecated for all customers except those with MSDN, pay-as-you-go and Visual Studio subscriptions. If you're an EA or MCA customer don't use this API.

The date that the API will be turned off is still being determined. The Cost Details API will be updated to support MSDN, pay-as-you-go and Visual studio subscriptions prior to the deprecation of the Consumption Usage Details API.

Example Consumption Usage Details API requests

The following example requests are used by Microsoft customers to address common scenarios.

Get usage details for a scope during a specific date range

The data that's returned by the request corresponds to the date when the data was received by the billing system. It might include costs from multiple invoices. The call to use varies by your subscription type.

For pay-as-you-go subscriptions, use the following call.


Get amortized cost details

If you need actual costs to show purchases as they're accrued, change the metric to ActualCost in the following request. To use amortized and actual costs, you must use version 2019-04-01-preview or later.


Next steps