lads_get_campaign_budget
LinkedIn Ads read low risk
Part of the LinkedIn Campaign Manager Agent.
What it does
Returns the budget configuration for one campaign: dailyBudget and/or totalBudget (each {amount as decimal string, currencyCode}), plus costType, unitCost (bid), pacingStrategy, and optimizationTargetType for context. Convenience read derived from the campaign GET, focused on money fields. Use to confirm current spend caps and bid before a budget change, or to compute remaining budget vs spend (pair with adAnalytics costInLocalCurrency/costInUsd, which are returned as STRINGS). Accuracy notes: amounts are DECIMAL STRINGS in account currency — NOT micros (do not ÷1e6); the most restrictive of account/group/campaign budgets governs serving; a campaign may have only daily, only total, or both.
When to use it
During a full account audit, start with lads_audit_account — it defines the checks, benchmarks, and severity rules this tool's data feeds.
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
account_id | string | yes | Numeric ad account ID (digits only). |
campaign_id | string | yes | Numeric campaign ID (digits only). |
Safeguards
Policy
Strict per-account isolation: read budgets only for campaigns under the bearer's authorized account; budget figures are for the authorizing client's reporting/billing only.
Reminder
Budgets are decimal strings in account currency (not micros); read only within the authorized account.
Errors
| Error class | Means | What to do | Retry |
|---|---|---|---|
CUSTOMER_NOT_FOUND | Campaign/account not found or out of scope (404). | Verify IDs. | no |
PERMISSION_DENIED | Missing r_ads/rw_ads or no role (403). | Confirm scope/role. | no |
TOKEN_REVOKED | Token expired/revoked (401). | needs_reauth — refresh once and retry; else reconnect. | yes |
RESOURCE_EXHAUSTED | Rate/quota limit (429). | Backoff 5/10/20s cap 60s. | yes |
PLATFORM_UNAVAILABLE | LinkedIn 5xx. | Retry with backoff. | yes |
Edge cases
- Campaign may have only dailyBudget, only totalBudget, or both — report exactly what is set.
- Budget amounts are decimal strings; do NOT divide by 1e6 (LinkedIn is not micros).
- Effective cap is the most restrictive of account/group/campaign budgets — note when the group budget is lower.
- unitCost may be 0 when optimizationTargetType is auto (MAX_*) — clarify it's auto-bid, not a missing bid.
- Currency may differ from billed currency (e.g., BRL shown, USD billed) — surface caveat.
- Expired token -> refresh + retry once.