Vantage Launches a Data Export API

by Vantage Team


Vantage Launches a Data Export API

Today, Vantage is launching the Data Export API, allowing users to retrieve exports of cost data. Customers who use the Vantage API can now programmatically fetch CSVs of their Cost Report data for use outside the Vantage console.

Previously, Vantage customers could download Cost Report data from the Vantage UI; however, it was not possible to programmatically retrieve this data for automation or external analysis. Vantage offered a /costs API to retrieve details about past and current costs, but this endpoint did not provide a downloadable format without further manipulation. Developers looking to integrate a full cost data export into internal reporting tools or use it for AI model training were unable to retrieve an unpaginated, complete data dump, which made it difficult to efficiently process large datasets.

Now, with the new Data Exports endpoint, customers can fetch a CSV download of a Cost Report or a set of costs by sending a POST request to /costs/data_exports. Customers can either specify an existing Cost Report token to retrieve a predefined dataset, or define filter criteria directly within the API call to generate a custom export. This makes it easier for users to work with large cost datasets.

To get started with this new API endpoint, review the API docs. For information on Cost Reporting in Vantage, see the product documentation.

Frequently Asked Questions

1. What is being announced today?

Vantage is launching the new Data Exports API endpoint to programmatically retrieve a bulk data export of costs.

2. Who is the customer?

Developers and finance teams who need to export and analyze cost data at scale.

3. How much does this cost?

The API is free to all users, including those in the free tier.

4. How do you use these endpoints?

Send a POST request to the /costs/data_exports endpoint. Notice here that the -i flag is specified to return headers, which is necessary to expose the URL that the file will be available at, once it is ready for download. In this specific example, a custom request is created to return all aws costs for a two-week time period in a specific workspace.

curl -X POST "https://api.vantage.sh/v2/costs/data_exports" \
-H "Authorization: Bearer TOKEN" \
-H "Content-Type: application/json" \
-d @- -i <<EOF
{
  "workspace_token": "wrkspc_12345",
  "start_date": "2025-03-01",
  "end_date": "2025-03-15",
  "filter": "costs.provider = 'aws'"
}
EOF

In a successful 202 response, the data export has been queued for processing and will be available where specified in the location header:

HTTP/2 202
date: Mon, 31 Mar 2025 21:03:54 GMT
content-type: application/json
content-length: 3
location: https://api.vantage.sh/v2/data_exports/dta_xprt_12345
...

You can check the status of the export by sending a GET request to the /data_exports/{data_export_token} endpoint. Use the token from the location header (the part of the URL that starts with dta_xprt) as the {data_export_token}:

curl --request GET \
     --url https://api.vantage.sh/v2/data_exports/dta_xprt_12345 \
     --header 'accept: application/json' \
     --header 'authorization: Bearer TOKEN'

In a successful 200 response, you are provided with the S3 location of the CSV file. You can navigate to that location to download the file. A 202 response indicates that the export is still generating, and you should check back again.

{
  "token": "dta_xprt_1234",
  "status": "completed",
  "created_at": "2025-03-31T21:18:05Z",
  "export_type": "cost_report",
  "manifest": {
    "files": [
      "https://s3.amazonaws.com/downloads.vantage.sh/..."
    ],
...

5. How do I authenticate with Vantage to use the API?

The Vantage API uses a Vantage API token for authentication. All API calls performed by the API are authenticated via your user token.

6. How long is the URL valid for retrieving files?

The response for the /data_exports/{data_export_token} endpoint includes a valid_until parameter, which indicates how long the file is valid for download.

7. Is the URL shareable so that the file can be downloaded by others?

Because the URL is connected to a public S3 bucket, you can share the link with other individuals to download a data export.

8. How many times can the URL be used to download the same file?

There is no limit to the number of times the file can be downloaded prior to the valid_until date.

9. Where can I read the documentation?

Vantage provides multiple resources for getting started with the API:

  • The Vantage API documentation site contains information about available API endpoints and provides a tool for running API calls directly on the site.
  • The “FinOps as Code” repository contains tutorials and code samples for getting started with the Vantage API.