Menu

Access billing usage and cost data via API - Vercel
📰

Access billing usage and cost data via API - Vercel

Vercel News·Shar Dara·6 months ago
#cifPRg9L
#vercel#usage#billing#cost#article
Long article (267 words) — no AI summary yet.
Reading 0:00
15s threshold

Vercel now supports programmatic access to billing usage and cost data through the API and CLI. The new /billing/charges endpoint returns data in the FOCUS v1.3 open-standard format , allowing teams to ingest cost data into FinOps tools without custom transformation logic.

The endpoint supports 1-day granularity with a maximum date range of one year. Responses are streamed as newline-delimited JSON (JSONL) to handle large datasets efficiently.

SDK usage

import { Vercel } from "@vercel/sdk" ;

const vercel = new Vercel ( {

bearerToken : "<YOUR_BEARER_TOKEN_HERE>" ,

} ) ;

async function run ( ) {

const result = await vercel . billing . listBillingCharges ( {

from : "2025-01-01T00:00:00.000Z" ,

to : "2025-01-31T00:00:00.000Z" ,

teamId : "team_1a2b3c4d5e6f7g8h9i0j1k2l" ,

slug : "my-team-url-slug" ,

} ) ;

for await ( const event of result ) {

// Handle the event

console .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.