billing
FreeNo executable scriptsNot checkedUse when the question is about money on a Bright Data account: current balance, credit left, what was charged, spend or cost history, credits or free tier…
by brightdata★ 272 GitHub starsAbout this skill
Bright Data - Billing
Two questions come up: what has this account already spent, and what will this job cost? The first has an exact answer from the account's own numbers. The second is always an estimate, so say so.
Read-only, no exceptions
Read the numbers, report them, stop. Never add or change a payment method, never top up a balance, never set auto-recharge, never change a plan, never buy a dataset, never cancel anything. Those actions belong to the person, not the agent, even when the user asks the agent to do them. Send them to brightdata.com/cp/billing/settings and let them click it themselves.
Never run a real job to find out what the account can do or what something costs. A Web Unlocker request, a scraper trigger and a browser session all spend money. Every read below is free and starts nothing.
The reads
| The question | Command | Endpoint behind it |
|---|---|---|
| How much money is left | bdata budget balance |
GET /customer/balance |
| What one zone cost | bdata budget zone <name> --from <date> --to <date> |
GET /zone?zone=<name> and GET /zone/cost?zone=<name> |
| What all active zones cost | bdata budget zones --from <date> --to <date> |
GET /zone/get_active_zones, then one /zone/cost per zone |
| What each product, zone, dataset or domain cost | no CLI command, call it directly | POST /costs/export/json |
| What scraping cost | no CLI command, call it directly | POST /costs/export/json with dimension web_apis for Web Scraper API, collectors for Scraper Studio |
| Which zones exist, including deleted ones | no CLI command, call it directly | GET /zone/get_all_zones |
| Which website ate the budget | no CLI command, call it directly | GET /domains/req and GET /domains/bw, dates required |
| How many records a snapshot delivered | no CLI command, call it directly | GET /datasets/v3/snapshots?dataset_id=<id>, read dataset_size |
Base host is https://api.brightdata.com and auth is the header Authorization: Bearer <key>. Read the key from the environment or the CLI's own store. The exact file path for each OS, and the safe way to read it without printing it, live in the agent-onboarding skill's auth reference. That reference also has the thing that trips agents here: after a CLI login, BRIGHTDATA_API_KEY is unset, and that is normal rather than a sign the machine is logged out, because login writes the key to the CLI's store and never to the environment. Never ask the user to paste a key into the conversation, and never print one: to check that a key exists, run node scripts/check-auth.mjs from the agent-onboarding skill, never cat, echo or jq the credentials file or the variable.
/zone/cost only sees zone-backed products such as Web Unlocker, SERP, Browser API and the proxy networks. Web Scraper API and Scraper Studio spend is keyed by dataset id and collector rather than by zone name, so it never appears there. Those go to the cost export.
Which key can read this
API keys carry one of five permission levels: Admin, Finance, Ops, User and Limit. Billing and cost data needs Finance or Admin, and Finance is the least-privileged one that works, so prefer it. Use a Finance key directly in the Authorization header for these reads: bdata login --api-key expects a full-access key, so keep the CLI logged in with an Admin key and the Finance key for the API. Only account admins create or change keys, at brightdata.com/cp/setting/users. A 401 means the key is missing, revoked or wrong. A 403 means the key is real but under-privileged for billing, so name the missing access instead of retrying. A Finance key may not read product data such as snapshots or Studio jobs, and that split is fine: report the half you can read and say which access the other half needs. A 404 means a wrong or expired snapshot, job or dataset id, while a wrong zone name answers 422.
Using the budget commands well
Three habits make the bdata budget output reliable. Always pass --from and --to to budget zone and budget zones, so the figure covers exactly the window you asked about. For the pending charge, read pending_costs from GET /customer/balance directly. And when you need machine-readable output, call the endpoint rather than the balance command.
Before writing any parsing code, read references/cost-api.md for the field lists and the live response samples, including how the date parameters behave (to is exclusive on these endpoints).
What a job will cost before it runs
No endpoint returns a quote, so never present one as if it came from the API. Build the estimate in three steps and label it an estimate.
- Find the billing unit for the product. Web Unlocker and SERP bill per successful request, and failed requests are not charged, with one exception: enabling custom headers or cookies bills every request. A SERP request that returns several result pages is still one request. Web Scraper API bills per delivered re
Install billing in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
Bundled files
FAQ
What does the billing skill do?
Use when the question is about money on a Bright Data account: current balance, credit left, what was charged, spend or cost history, credits or free tier used, cost per zone, product or dataset, or what a job will cost before it runs. Read-only, and it never buys or changes anything. Not scraping or extraction (use scrape), not how to drive the CLI itself (use brightdata-cli), not a refused or failing call (use agent-onboarding).
How do I install the billing skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the billing skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
by Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
by Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
by Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
by Anthropic