# Billing Spend by Date Range The Spend by Date Range report provides a daily breakdown of your aggregated spend over a custom date range. You can view the report on the [**Insights** tab of the **Billing** page](https://cloud.digitalocean.com/account/billing/insights). The report groups spend by product (such as Droplets or Load Balancers) and lists your top individual resources. You can also retrieve raw daily spend data programmatically using the [Billing endpoints of the DigitalOcean API](https://docs.digitalocean.com/reference/api/reference/billing/index.html.md). **Important**: The report and API provide spend data starting on 1 December 2025. ## View Spend by Date Range On the **Billing** page, click the [**Insights** tab](https://cloud.digitalocean.com/account/billing/insights). Select a month, a single day, or a custom date range to generate the report. ![The Billing Insights tab displaying the date range picker dropdown with a calendar view](https://docs.digitalocean.com/screenshots/billing/billing-insights-date-picker.4f26358873867d40486578307db77fdd044e507ecf105cdc9260068727951830.png) The report aggregates spend using the following logic: - **Product Grouping:** Spend is grouped by product type (for example, Droplets, Floating IPs, or Load Balancers). - **Top Resources:** Within each product group, the report lists the top 100 resources by spend. - **Rolled-up Resources:** Any remaining resources outside the top 100 are combined into a single line item (for example, “X unlisted resources”), which displays the total spend for those remaining items. ## Download a CSV Report To download a CSV file containing the full list of resources for your selected date range, click **CSV** in the report. The CSV contains all resources, including those outside the top 100 shown in the control panel. ## Retrieve Spend Using the API To retrieve raw daily spend data programmatically (JSON only), use the [`/v2/billing/{account_urn}/insights/{start_date}/{end_date}` endpoint](https://docs.digitalocean.com/reference/api/reference/billing/index.html.md#billingInsights_list) of the DigitalOcean API. ## How to Retrieve Spend Data Using the DigitalOcean API 1. [Create a personal access token](https://docs.digitalocean.com/reference/api/create-personal-access-token/index.html.md) and save it for use with the API. 2. Send a GET request to [`https://api.digitalocean.com/v2/billing/{account_urn}/insights/{start_date}/{end_date}`](https://docs.digitalocean.com/reference/api/reference/billing/index.html.md#billingInsights_list). ### cURL Using cURL: ```shell curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/billing/do:team:12345678-1234-1234-1234-123456789012/insights/2025-01-01/2025-01-31?per_page=20&page=1" ``` ### Python Using [PyDo](https://github.com/digitalocean/pydo), the official DigitalOcean API client for Python: ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) insights = client.billing.list_insights( account_urn="do:team:12345678-1234-1234-1234-123456789012", start_date="2025-01-01", end_date="2025-01-31", per_page=100, page=1 ) ``` ## Spend By Date Range Limits The following limits apply to spend by date range reports: - **Spend amounts are estimates.** The amounts shown in this report are estimates. Refer to your [monthly invoice](https://docs.digitalocean.com/platform/billing/invoices/index.html.md) for final billing details. - **Data is read-only.** The report and API provide read-only access to your billing data. You cannot modify billing information through this endpoint or through the **Insights** tab.