---
title: "Get Costs per Account"
method: GET
path: "/aws/costs"
tags: ["Insights Service"]
---

# Get Costs per Account

`GET /aws/costs`

Retrieve costs up to one year back per specified account over a specified time period.

## Query parameters

- `accountId` string
- `fromDate` string
- `toDate` string
- `aggregationPeriod` string

## Response `200`

Costs Per Account Response

- object
  - `request` object — Original request properties
    - `id` string — Unique ID associated with this request
    - `url` string — The URL that was used for the request
    - `method` string — The HTTP **METHOD** used for the request
    - `timestamp` string — When the request was received by Spot
  - `response` object — Response package that includes, status, type and any relevant data.
    - `status` object
      - `code` integer — HTTP status code assigned to this response
      - `message` string — HTTP status message for the respective status code
    - `kind` string — The data type of each item in the response
    - `items` array[] — Array of data objects
      - object[]
        - `timestamp` string — Time
        - `spot` object
          - `runningHours` number, float
          - `actualCosts` number, float
          - `potentialCosts` number, float
          - `savingsPercentage` number, float
    - `count` integer — Size of the data object array

## Other responses

- `400` — Bad Request

---

[API](https://skmtc.net/spot/apis/spot-by-flexera-api.md) · [All operations](https://skmtc.net/spot/apis/spot-by-flexera-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/spot/spot-by-flexera-api/versions/2e5445f30576/schema)
