Google Workspace unofficial API: list your invoices by date range
Automatically list your invoices by date range on admin.google.com. An unofficial Google Workspace API for billing invoices. List Google Workspace billing documents from the Admin Console for one date range (This month … All time) and one format (CSV or PDF). Returns account and invoices (label, format, createdDate, invoiceNumber) — metadata only. Feed a row's label, with the same dateRange and format, to admin.google.com/download_invoice to get the file.
Input
format optionalDocument format to list. Default: CSV.
dateRange optionalDate range label as shown in the Workspace billing UI. Default: This year.
Output
account optionalinvoices optionalFAQ
Google Admin whoami (signed-in account)
Report which Google account the Google Admin console is signed in as in this browser: display name and email. Being signed out is reported as a normal answer (loggedIn false), not an error, so it can be used to check a session before running other Google Admin scripts.
Google Workspace unofficial API: download an invoice PDF or CSV
An unofficial Google Workspace API to download billing invoices. Download a single Google Workspace billing document (CSV or PDF) by its line-item label from admin.google.com/list_invoices (pass the same dateRange/format used to list it). Returns the file bytes as base64 plus a filename.
