Read a Reach & Frequency prediction
API key authentication - use your Zernio API key as a Bearer token
In: header
Path Parameters
Query Parameters
Response Body
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.reachandfrequency.getRfPrediction({ path: { predictionId: 'prediction_abc123', }, query: { accountId: 'account_abc123', adAccountId: 'adaccount_abc123', },});console.log(data);{
"adAccountId": "string",
"currency": "string",
"prediction": {
"predictionId": "string",
"status": "string",
"budget": 0,
"reach": 0,
"impressions": 0,
"minBudget": 0,
"maxBudget": 0,
"minReach": 0,
"maxReach": 0,
"frequencyCap": 0,
"startTime": 0,
"stopTime": 0,
"expiresAt": "string"
}
}{
"error": "Unauthorized"
}Create a Reach & Frequency prediction POST
Creates an R&F prediction — a QUOTE, nothing is bought and no ad entities are created. Provide a date range plus exactly one of `budgetAmount` (Meta predicts reach) or `reach` (Meta predicts the budget). The response carries the estimate and its allowed bounds (min/max budget and reach). Predictions expire on their own; to buy, reserve one via POST /v1/ads/rf-predictions/{predictionId}/reserve and pass the RESERVED id to POST /v1/ads/create with `buyingType: "RESERVED"`. Reservation campaigns reject automatic placements, so omitted `placements` default to Facebook feed (+ Instagram stream when a linked IG professional account resolves); Instagram placements require that IG account.
Cancel a Reach & Frequency reservation DELETE
Releases a RESERVATION's locked price and inventory. Unreserved predictions expire on their own.