Impressions, clicks and spend forecast (LinkedIn)
LinkedIn-only. Forecasted impressions, clicks, spend and ~20 other
metrics for a targeting spec over a time range. Wraps LinkedIn's
adSupplyForecasts finder.
Each returned series carries a metricType (IMPRESSION, CLICK, SPENDING,
MAX_POTENTIAL_BUDGET, COST_PER_MILLION_IMPRESSIONS, ...) and a
granularity (DAILY, SEVEN_DAY, THIRTY_DAY, CUSTOM). LinkedIn caps the
daily spending forecast at 1.2x the daily budget and returns 0 once the
total budget is exhausted.
Non-LinkedIn accounts return available: false.
API key authentication - use your Zernio API key as a Bearer token
In: header
Defaults to SPONSORED_UPDATES.
"SPONSORED_UPDATES" | "SPONSORED_INMAILS" | "DYNAMIC"Unix ms. Must be in the future.
Unix ms. Must be after start and within LinkedIn's max horizon.
When set, the forecast assumes auto-bidding. When unset, competingBid is required.
Either dailyBudget or totalBudget is required.
ISO 4217, defaults to USD.
3 <= length <= 3Required for manual-bid forecasts (when optimizationTarget is not set).
Defaults to false. Required true for connectedTelevisionOnly.
Defaults to false.
Defaults to false.
Response Body
application/json
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.ads.getLinkedInSupplyForecast({ body: { accountId: 'account_abc123', adAccountId: 'adaccount_abc123', spec: { countries: [ 'string', ], regions: [ { key: 'tok_abc123', }, ], cities: [ { key: 'tok_abc123', }, ], }, timeRangeStart: 0, timeRangeEnd: 0, },});console.log(data);{
"available": true,
"forecast": [
{
"metricType": "string",
"granularity": "DAILY",
"timeSeries": [
{
"timestamp": 0,
"value": 0,
"adForecastRange": {
"lowEnd": 0,
"highEnd": 0
}
}
]
}
]
}{
"error": "Unauthorized"
}{
"error": "Not found"
}Suggested bid and budget bounds (LinkedIn) POST
LinkedIn-only. Returns the suggested bid and bid limits for a targeting spec, plus the daily-budget bounds LinkedIn will accept. Use it before creating a campaign to pick a bid inside the allowed range and warn the user if their daily budget is below the minimum. Wraps LinkedIn's `adBudgetPricing` finder. Non-LinkedIn accounts return `available: false` so clients can hide the pricing UI without treating it as a failure.
Update ad account settings PATCH
Sets the default DSA beneficiary and payor on a Meta ad account (EU DSA, Article 26). Set them once and every EU-targeted call to `/v1/ads/create`, `/v1/ads/boost` and `/v1/ads/ctwa` on that ad account can omit `dsaBeneficiary`/`dsaPayor`: Meta applies the defaults automatically. The values are written to the ad account on Meta, the same setting Ads Manager edits. Nothing is stored in Zernio, and defaults already set in Ads Manager work identically. Zernio never guesses these values for you. Beneficiary and payor are legal disclosures shown to EU users, so you must provide the entity names explicitly. Use `GET /v1/ads/dsa-recommendations` to offer suggestions in your UI. If `defaultDsaPayor` is omitted, the beneficiary is also set as the payor, which covers the common case where the same entity benefits from and pays for the ads. Read the current values back with `GET /v1/ads/dsa-defaults`. Currently supported for Meta accounts only; other platforms return 400.