Find an API

Search public APIs with auth details & Postman guides

← All APIs

AWS Cost Explorer Service

amazonaws · Cloud

Cloud No Auth Free & Open cloud

You can use the Cost Explorer API 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. This might include the number of daily write operations for Amazon DynamoDB database tables in your production environment. Service Endpoint The Cost Explorer API provides the following endpoint: https://ce.us-east-1.amazonaws.com <

Authentication

No authentication requiredFree to use with no key needed.

Sample Requests

POST GetSavingsPlansCoverage

Retrieves the Savings Plans covered for your account. This enables you to see how much of your cost is covered by a Savings Plan. An organization’s management account can see the coverage of the associated member accounts. This supports dimensions, Cost Categories, and nested expressions. For any

https://api.apis.guru/v2/specs/amazonaws.com/ce/2017-10-25/#X-Amz-Target=AWSInsightsIndexService.GetSavingsPlansCoverage?NextToken=example&MaxResults=example

Hover any highlighted part to learn what it does

Headers — extra info sent with the request
X-Amz-Target AWSInsightsIndexService.GetSavingsPlansCoverage
curl -X POST "https://api.apis.guru/v2/specs/amazonaws.com/ce/2017-10-25/#X-Amz-Target=AWSInsightsIndexService.GetSavingsPlansCoverage?NextToken=example&MaxResults=example" \
  -H "X-Amz-Target: AWSInsightsIndexService.GetSavingsPlansCoverage"
import requests
params = {
    "NextToken": "example",
    "MaxResults": "example"
}
headers = {
    "X-Amz-Target": "AWSInsightsIndexService.GetSavingsPlansCoverage"
}
response = requests.post(
    "https://api.apis.guru/v2/specs/amazonaws.com/ce/2017-10-25/#X-Amz-Target=AWSInsightsIndexService.GetSavingsPlansCoverage",
    params=params,
    headers=headers,
)
print(response.json())
const url = new URL('https://api.apis.guru/v2/specs/amazonaws.com/ce/2017-10-25/#X-Amz-Target=AWSInsightsIndexService.GetSavingsPlansCoverage');
url.searchParams.set('NextToken', 'example');
url.searchParams.set('MaxResults', 'example');

const response = await fetch(url, {
  method: 'POST',
  headers: {
    'X-Amz-Target': 'AWSInsightsIndexService.GetSavingsPlansCoverage'
  },
}); 
const data = await response.json();
console.log(data);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
)

func main() {
	baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/amazonaws.com/ce/2017-10-25/#X-Amz-Target=AWSInsightsIndexService.GetSavingsPlansCoverage")
	q := baseURL.Query()
	q.Set("NextToken", "example")
	q.Set("MaxResults", "example")
	baseURL.RawQuery = q.Encode()
	targetURL := baseURL.String()
	req, _ := http.NewRequest("POST", targetURL, nil)
	req.Header.Set("X-Amz-Target", "AWSInsightsIndexService.GetSavingsPlansCoverage")

	client := &http.Client{}
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://api.apis.guru/v2/specs/amazonaws.com/ce/2017-10-25/#X-Amz-Target=AWSInsightsIndexService.GetSavingsPlansCoverage")
uri.query = URI.encode_www_form({
  "NextToken" => "example",
  "MaxResults" => "example"
})

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"

req = Net::HTTP::Post.new(uri)
req["X-Amz-Target"] = "AWSInsightsIndexService.GetSavingsPlansCoverage"

res = http.request(req)
puts JSON.parse(res.body)
<?php
$url = "https://api.apis.guru/v2/specs/amazonaws.com/ce/2017-10-25/#X-Amz-Target=AWSInsightsIndexService.GetSavingsPlansCoverage?" . http_build_query([
    "NextToken" => "example",
    "MaxResults" => "example"
]);
$opts = ["http" => [
    "method" => "POST",
    "header" => implode("\r\n", [
        "X-Amz-Target: AWSInsightsIndexService.GetSavingsPlansCoverage"
    ]),
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));
POST GetSavingsPlansUtilizationDetails

Retrieves attribute data along with aggregate utilization and savings data for a given time period. This doesn't support granular or grouped data (daily/monthly) in response. You can't retrieve data by dates in a single response similar to GetSavingsPlanUtilization , but you have the

https://api.apis.guru/v2/specs/amazonaws.com/ce/2017-10-25/#X-Amz-Target=AWSInsightsIndexService.GetSavingsPlansUtilizationDetails?NextToken=example&MaxResults=example

Hover any highlighted part to learn what it does

Headers — extra info sent with the request
X-Amz-Target AWSInsightsIndexService.GetSavingsPlansUtilizationDetails
curl -X POST "https://api.apis.guru/v2/specs/amazonaws.com/ce/2017-10-25/#X-Amz-Target=AWSInsightsIndexService.GetSavingsPlansUtilizationDetails?NextToken=example&MaxResults=example" \
  -H "X-Amz-Target: AWSInsightsIndexService.GetSavingsPlansUtilizationDetails"
import requests
params = {
    "NextToken": "example",
    "MaxResults": "example"
}
headers = {
    "X-Amz-Target": "AWSInsightsIndexService.GetSavingsPlansUtilizationDetails"
}
response = requests.post(
    "https://api.apis.guru/v2/specs/amazonaws.com/ce/2017-10-25/#X-Amz-Target=AWSInsightsIndexService.GetSavingsPlansUtilizationDetails",
    params=params,
    headers=headers,
)
print(response.json())
const url = new URL('https://api.apis.guru/v2/specs/amazonaws.com/ce/2017-10-25/#X-Amz-Target=AWSInsightsIndexService.GetSavingsPlansUtilizationDetails');
url.searchParams.set('NextToken', 'example');
url.searchParams.set('MaxResults', 'example');

const response = await fetch(url, {
  method: 'POST',
  headers: {
    'X-Amz-Target': 'AWSInsightsIndexService.GetSavingsPlansUtilizationDetails'
  },
}); 
const data = await response.json();
console.log(data);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
)

func main() {
	baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/amazonaws.com/ce/2017-10-25/#X-Amz-Target=AWSInsightsIndexService.GetSavingsPlansUtilizationDetails")
	q := baseURL.Query()
	q.Set("NextToken", "example")
	q.Set("MaxResults", "example")
	baseURL.RawQuery = q.Encode()
	targetURL := baseURL.String()
	req, _ := http.NewRequest("POST", targetURL, nil)
	req.Header.Set("X-Amz-Target", "AWSInsightsIndexService.GetSavingsPlansUtilizationDetails")

	client := &http.Client{}
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://api.apis.guru/v2/specs/amazonaws.com/ce/2017-10-25/#X-Amz-Target=AWSInsightsIndexService.GetSavingsPlansUtilizationDetails")
uri.query = URI.encode_www_form({
  "NextToken" => "example",
  "MaxResults" => "example"
})

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"

req = Net::HTTP::Post.new(uri)
req["X-Amz-Target"] = "AWSInsightsIndexService.GetSavingsPlansUtilizationDetails"

res = http.request(req)
puts JSON.parse(res.body)
<?php
$url = "https://api.apis.guru/v2/specs/amazonaws.com/ce/2017-10-25/#X-Amz-Target=AWSInsightsIndexService.GetSavingsPlansUtilizationDetails?" . http_build_query([
    "NextToken" => "example",
    "MaxResults" => "example"
]);
$opts = ["http" => [
    "method" => "POST",
    "header" => implode("\r\n", [
        "X-Amz-Target: AWSInsightsIndexService.GetSavingsPlansUtilizationDetails"
    ]),
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));
POST ListCostAllocationTags

Get a list of cost allocation tags. All inputs in the API are optional and serve as filters. By default, all cost allocation tags are returned.

https://api.apis.guru/v2/specs/amazonaws.com/ce/2017-10-25/#X-Amz-Target=AWSInsightsIndexService.ListCostAllocationTags?NextToken=example&MaxResults=example

Hover any highlighted part to learn what it does

Headers — extra info sent with the request
X-Amz-Target AWSInsightsIndexService.ListCostAllocationTags
curl -X POST "https://api.apis.guru/v2/specs/amazonaws.com/ce/2017-10-25/#X-Amz-Target=AWSInsightsIndexService.ListCostAllocationTags?NextToken=example&MaxResults=example" \
  -H "X-Amz-Target: AWSInsightsIndexService.ListCostAllocationTags"
import requests
params = {
    "NextToken": "example",
    "MaxResults": "example"
}
headers = {
    "X-Amz-Target": "AWSInsightsIndexService.ListCostAllocationTags"
}
response = requests.post(
    "https://api.apis.guru/v2/specs/amazonaws.com/ce/2017-10-25/#X-Amz-Target=AWSInsightsIndexService.ListCostAllocationTags",
    params=params,
    headers=headers,
)
print(response.json())
const url = new URL('https://api.apis.guru/v2/specs/amazonaws.com/ce/2017-10-25/#X-Amz-Target=AWSInsightsIndexService.ListCostAllocationTags');
url.searchParams.set('NextToken', 'example');
url.searchParams.set('MaxResults', 'example');

const response = await fetch(url, {
  method: 'POST',
  headers: {
    'X-Amz-Target': 'AWSInsightsIndexService.ListCostAllocationTags'
  },
}); 
const data = await response.json();
console.log(data);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
)

func main() {
	baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/amazonaws.com/ce/2017-10-25/#X-Amz-Target=AWSInsightsIndexService.ListCostAllocationTags")
	q := baseURL.Query()
	q.Set("NextToken", "example")
	q.Set("MaxResults", "example")
	baseURL.RawQuery = q.Encode()
	targetURL := baseURL.String()
	req, _ := http.NewRequest("POST", targetURL, nil)
	req.Header.Set("X-Amz-Target", "AWSInsightsIndexService.ListCostAllocationTags")

	client := &http.Client{}
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://api.apis.guru/v2/specs/amazonaws.com/ce/2017-10-25/#X-Amz-Target=AWSInsightsIndexService.ListCostAllocationTags")
uri.query = URI.encode_www_form({
  "NextToken" => "example",
  "MaxResults" => "example"
})

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"

req = Net::HTTP::Post.new(uri)
req["X-Amz-Target"] = "AWSInsightsIndexService.ListCostAllocationTags"

res = http.request(req)
puts JSON.parse(res.body)
<?php
$url = "https://api.apis.guru/v2/specs/amazonaws.com/ce/2017-10-25/#X-Amz-Target=AWSInsightsIndexService.ListCostAllocationTags?" . http_build_query([
    "NextToken" => "example",
    "MaxResults" => "example"
]);
$opts = ["http" => [
    "method" => "POST",
    "header" => implode("\r\n", [
        "X-Amz-Target: AWSInsightsIndexService.ListCostAllocationTags"
    ]),
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));

Postman Setup Guide

Get Postman ↗
  1. See official documentation for authentication and setup.

What can you build with AWS Cost Explorer Service?

AWS Cost Explorer Service is a Cloud API. Developers commonly use cloud APIs for:

  • provisioning and managing cloud infrastructure
  • automating deployments and container orchestration
  • monitoring uptime and performance metrics
  • managing storage buckets and databases
  • setting up auto-scaling and load balancing

No authentication required. This API is open — no signup or key needed. Ideal for quick prototypes and public-facing features. AWS Cost Explorer Service is free to use, making it a low-risk choice to experiment with.

New to APIs? Read our beginner's guide · Learn about API keys · What is REST?

Open documentation ↗