---
title: Retrieving your monthly consumption via the Scaleway API
description: This page explains how to retrieve your monthly consumption via the Scaleway API
tags: billing consumption report api export
dates:
  validation: 2025-10-16
  posted: 2024-03-26
---
import Requirements from '@macros/iam/requirements.mdx'


Follow the procedure below to download your monthly consumption using the Scaleway [Billing API](https://www.scaleway.com/en/developers/api/billing/#path-consumption-get-monthly-consumption) and `curl`.

<Requirements />

- A Scaleway account and logged into the [console](https://console.scaleway.com/organization)
- Created an [API key](/iam/how-to/create-api-keys/) with sufficient [IAM permissions](/iam/reference-content/permission-sets/) to perform the actions described on this page
- [Installed `curl`](https://curl.se/download.html)
- Configured your environment variables.

## Exporting your environment variables

   <Message type="note">
   This is an optional step that aims at simplifying your usage of the API.
   </Message>

Open a terminal and run the following command to export your API secret key and Organization ID.

   ```bash
   export SCW_SECRET_KEY="<API secret key>"
   export SCW_ORGANIZATION_ID="<Scaleway Organization ID>"
   ```

## Consumption of the current month

Run the following command to obtain your consumption over the current month.

   ```bash
   curl -X GET \
     -H "X-Auth-Token: $SCW_SECRET_KEY" \
     -H "Content-Type: application/json" \
     "https://api.scaleway.com/billing/v2beta1/consumptions?organization_id=$SCW_ORGANIZATION_ID"
   ```

## Consumption of a product category

Run the following command to obtain your consumption over the current month for just one category of products.

   Specify the target `category_name` as one of:

   - `BareMetal`
   - `Compute`
   - `Containers`
   - `Labs`
   - `Managed Databases`
   - `Managed Services`
   - `Network`
   - `Object Storage`
   - `Observability`
   - `Security and Identity`
   - `Serverless`
   - `Storage`
   - `Subscription`

   ```bash
   curl -X GET \
     -H "X-Auth-Token: $SCW_SECRET_KEY" \
     -H "Content-Type: application/json" \
     "https://api.scaleway.com/billing/v2beta1/consumptions?organization_id=$SCW_ORGANIZATION_ID&category_name=Compute"
   ```

## Consumption of a specific month

Run the following command to obtain your consumption for a specific month.

   Specify the target billing period as `YYYY-MM`, e.g. `2023-11`.

   ```bash
   curl -X GET \
     -H "X-Auth-Token: $SCW_SECRET_KEY" \
     -H "Content-Type: application/json" \
     "https://api.scaleway.com/billing/v2beta1/consumptions?organization_id=$SCW_ORGANIZATION_ID&billing_period=2023-11"
   ```

## Consumption of a specific Project

Run the following command to obtain your consumption for a specific Project only.

   First, choose your target `project_id`:

   ```bash
   export SCW_PROJECT_ID="<Scaleway Project ID>"
   ```

   Then inject it in your API request:

   ```bash
   curl -X GET \
     -H "X-Auth-Token: $SCW_SECRET_KEY" \
     -H "Content-Type: application/json" \
     "https://api.scaleway.com/billing/v2beta1/consumptions?project_id=SCW_PROJECT_ID"
   ```