Using the AWS Cost Explorer API - AWS Billing and Cost Management
AWS services or capabilities described in AWS documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with AWS services in China.

Using the AWS Cost Explorer API

The Cost Explorer API allows you to programmatically query your cost and usage data. You can query for aggregated data such as total monthly costs or total daily usage. You can also query for granular data, such as the number of daily write operations for DynamoDB database tables in your production environment.

If you use a programming language that AWS provides an SDK for, we recommend that you use the SDK. All the AWS SDKs greatly simplify the process of signing requests and save you a significant amount of time when compared with using the AWS Cost Explorer API. In addition, the SDKs integrate easily with your development environment and provide easy access to related commands.

For more information about available SDKs, see Tools for Amazon Web Services. For more information about the AWS Cost Explorer API, see the AWS Billing and Cost Management API Reference.

Service endpoint

Service Endpoint

The Cost Explorer API provides the following endpoint:


Granting IAM permissions to use the AWS Cost Explorer API

An IAM user must be granted explicit permission to query the AWS Cost Explorer API. For the policy that grants the necessary permissions to an IAM user, see View costs and usage.