curl --request POST \
--url https://api.cloudcapital.co/v1/cost-insights/data \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"filters": {
"inclusions": {
"dateRange": {
"start": "2026-01-01",
"end": "2026-03-31"
},
"accountIds": [
"123456789012"
]
}
},
"groupBy": {
"dimension": "account",
"dateGrouping": "monthly"
}
}
'import requests
url = "https://api.cloudcapital.co/v1/cost-insights/data"
payload = {
"filters": { "inclusions": {
"dateRange": {
"start": "2026-01-01",
"end": "2026-03-31"
},
"accountIds": ["123456789012"]
} },
"groupBy": {
"dimension": "account",
"dateGrouping": "monthly"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
filters: {
inclusions: {
dateRange: {start: '2026-01-01', end: '2026-03-31'},
accountIds: ['123456789012']
}
},
groupBy: {dimension: 'account', dateGrouping: 'monthly'}
})
};
fetch('https://api.cloudcapital.co/v1/cost-insights/data', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cloudcapital.co/v1/cost-insights/data",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'filters' => [
'inclusions' => [
'dateRange' => [
'start' => '2026-01-01',
'end' => '2026-03-31'
],
'accountIds' => [
'123456789012'
]
]
],
'groupBy' => [
'dimension' => 'account',
'dateGrouping' => 'monthly'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.cloudcapital.co/v1/cost-insights/data"
payload := strings.NewReader("{\n \"filters\": {\n \"inclusions\": {\n \"dateRange\": {\n \"start\": \"2026-01-01\",\n \"end\": \"2026-03-31\"\n },\n \"accountIds\": [\n \"123456789012\"\n ]\n }\n },\n \"groupBy\": {\n \"dimension\": \"account\",\n \"dateGrouping\": \"monthly\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.cloudcapital.co/v1/cost-insights/data")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"filters\": {\n \"inclusions\": {\n \"dateRange\": {\n \"start\": \"2026-01-01\",\n \"end\": \"2026-03-31\"\n },\n \"accountIds\": [\n \"123456789012\"\n ]\n }\n },\n \"groupBy\": {\n \"dimension\": \"account\",\n \"dateGrouping\": \"monthly\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cloudcapital.co/v1/cost-insights/data")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"filters\": {\n \"inclusions\": {\n \"dateRange\": {\n \"start\": \"2026-01-01\",\n \"end\": \"2026-03-31\"\n },\n \"accountIds\": [\n \"123456789012\"\n ]\n }\n },\n \"groupBy\": {\n \"dimension\": \"account\",\n \"dateGrouping\": \"monthly\"\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"items": [
{
"usage_date": "2026-01-15",
"dimension_value": "<string>",
"dimension_values": {},
"amortized_cost": 123,
"billed_cost": 123,
"cash_cost": 123,
"on_demand_cost": 123,
"total_savings": 123,
"enterprise_discount_savings": 123,
"product_discount_savings": 123,
"partner_discount_savings": 123,
"commitment_savings": 123,
"spot_savings": 123,
"other_savings": 123
}
],
"summary": {
"total_amortized_cost": 123,
"total_billed_cost": 123,
"total_cash_cost": 123,
"total_on_demand_cost": 123,
"total_savings": 123,
"total_enterprise_discount_savings": 123,
"total_product_discount_savings": 123,
"total_partner_discount_savings": 123,
"total_commitment_savings": 123,
"total_spot_savings": 123,
"total_other_savings": 123,
"effective_savings_rate": 123
}
}
}{
"success": false,
"error": {
"message": "Invalid request. Please see message details.. Invalid input: expected object, received undefined (at groupBy)"
}
}{
"message": "Unauthorized"
}{
"success": false,
"error": {
"message": "Rate limit exceeded. Please retry after the specified time."
}
}Get cost data
Retrieve cost data with flexible filtering and grouping options. Results include a detailed cost breakdown per date and dimension, plus an aggregated summary across the full period.
curl --request POST \
--url https://api.cloudcapital.co/v1/cost-insights/data \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"filters": {
"inclusions": {
"dateRange": {
"start": "2026-01-01",
"end": "2026-03-31"
},
"accountIds": [
"123456789012"
]
}
},
"groupBy": {
"dimension": "account",
"dateGrouping": "monthly"
}
}
'import requests
url = "https://api.cloudcapital.co/v1/cost-insights/data"
payload = {
"filters": { "inclusions": {
"dateRange": {
"start": "2026-01-01",
"end": "2026-03-31"
},
"accountIds": ["123456789012"]
} },
"groupBy": {
"dimension": "account",
"dateGrouping": "monthly"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
filters: {
inclusions: {
dateRange: {start: '2026-01-01', end: '2026-03-31'},
accountIds: ['123456789012']
}
},
groupBy: {dimension: 'account', dateGrouping: 'monthly'}
})
};
fetch('https://api.cloudcapital.co/v1/cost-insights/data', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cloudcapital.co/v1/cost-insights/data",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'filters' => [
'inclusions' => [
'dateRange' => [
'start' => '2026-01-01',
'end' => '2026-03-31'
],
'accountIds' => [
'123456789012'
]
]
],
'groupBy' => [
'dimension' => 'account',
'dateGrouping' => 'monthly'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.cloudcapital.co/v1/cost-insights/data"
payload := strings.NewReader("{\n \"filters\": {\n \"inclusions\": {\n \"dateRange\": {\n \"start\": \"2026-01-01\",\n \"end\": \"2026-03-31\"\n },\n \"accountIds\": [\n \"123456789012\"\n ]\n }\n },\n \"groupBy\": {\n \"dimension\": \"account\",\n \"dateGrouping\": \"monthly\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.cloudcapital.co/v1/cost-insights/data")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"filters\": {\n \"inclusions\": {\n \"dateRange\": {\n \"start\": \"2026-01-01\",\n \"end\": \"2026-03-31\"\n },\n \"accountIds\": [\n \"123456789012\"\n ]\n }\n },\n \"groupBy\": {\n \"dimension\": \"account\",\n \"dateGrouping\": \"monthly\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cloudcapital.co/v1/cost-insights/data")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"filters\": {\n \"inclusions\": {\n \"dateRange\": {\n \"start\": \"2026-01-01\",\n \"end\": \"2026-03-31\"\n },\n \"accountIds\": [\n \"123456789012\"\n ]\n }\n },\n \"groupBy\": {\n \"dimension\": \"account\",\n \"dateGrouping\": \"monthly\"\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"items": [
{
"usage_date": "2026-01-15",
"dimension_value": "<string>",
"dimension_values": {},
"amortized_cost": 123,
"billed_cost": 123,
"cash_cost": 123,
"on_demand_cost": 123,
"total_savings": 123,
"enterprise_discount_savings": 123,
"product_discount_savings": 123,
"partner_discount_savings": 123,
"commitment_savings": 123,
"spot_savings": 123,
"other_savings": 123
}
],
"summary": {
"total_amortized_cost": 123,
"total_billed_cost": 123,
"total_cash_cost": 123,
"total_on_demand_cost": 123,
"total_savings": 123,
"total_enterprise_discount_savings": 123,
"total_product_discount_savings": 123,
"total_partner_discount_savings": 123,
"total_commitment_savings": 123,
"total_spot_savings": 123,
"total_other_savings": 123,
"effective_savings_rate": 123
}
}
}{
"success": false,
"error": {
"message": "Invalid request. Please see message details.. Invalid input: expected object, received undefined (at groupBy)"
}
}{
"message": "Unauthorized"
}{
"success": false,
"error": {
"message": "Rate limit exceeded. Please retry after the specified time."
}
}Authorizations
API key authentication. Generate an API key from your
Cloud Capital dashboard under Settings > API keys.
Include it in the Authorization header as a Bearer token.
Body
Grouping configuration. dateGrouping is required and controls
the time-series granularity. Optionally specify dimension for
single-dimension grouping or dimensions for multi-dimension.
Show child attributes
Show child attributes
Filter container supporting both inclusion and exclusion criteria.
Use inclusions to narrow results to matching data and exclusions
to remove matching data from results.
Show child attributes
Show child attributes
Response
Cost data retrieved successfully
Successful HTTP responses wrap the endpoint-specific body in data.
Each operation's 200 response schema is this object merged (allOf)
with a data property referencing the payload schema for that endpoint.

