pydo.billing_insights.list()
Generated on 8 May 2026
from pydo version
v0.34.0
Usage
client.billing_insights.list(
account_urn="do:team:12345678-1234-1234-1234-123456789012",
start_date="2025-01-01",
end_date="2025-01-31",
per_page=20,
page=1,
)Description
This endpoint returns day-over-day changes in billing resource usage based on nightly invoice items, including total amount, region, SKU, and description for a specified date range. It is important to note that the daily resource usage may not reflect month-end billing totals when totaled for a given month as nightly invoice item estimates do not necessarily encompass all invoicing factors for the entire month.
Parameters
account_urnstring requiredURN of the customer account, can be a team (do:team:uuid) or an organization (do:teamgroup:uuid)
start_datestring requiredStart date for billing insights in YYYY-MM-DD format
end_datestring requiredEnd date for billing insights in YYYY-MM-DD format. Must be within 31 days of start_date
per_pageinteger optionalNumber of items returned per page
pageinteger optionalWhich 'page' of paginated results to return.
Request Sample
Pagination
This method returns paginated results. The response includes a
links.pages object with URLs for navigating between pages. To
retrieve the next page, parse the next URL and pass the page
parameter:
from urllib.parse import urlparse, parse_qs
resp = client.billing_insights.list(account_urn="do:team:12345678-1234-1234-1234-123456789012", start_date="2025-01-01", end_date="2025-01-31", )
pages = resp.get("links", {}).get("pages", {})
while "next" in pages:
parsed = urlparse(pages["next"])
page = int(parse_qs(parsed.query)["page"][0])
resp = client.billing_insights.list(account_urn="do:team:12345678-1234-1234-1234-123456789012", start_date="2025-01-01", end_date="2025-01-31", page=page)
pages = resp.get("links", {}).get("pages", {})Response Example
More Information
See /v2/billing/{account_urn}/insights/{start_date}/{end_date} in the API reference for additional detail on responses, headers, parameters, and more.