API reference · Batch jobs

Start an asynchronous batch job

POST/v1/batch

Up to N (plan-dependent, max 100) advertisers, domains or ad ids. Billing is per delivered result in credits (same prices as the synchronous endpoints), not per job.

Example request

Shell
curl -X POST "https://api.adlibapi.com/v1/batch" \
  -H "X-API-Key: $ADLIB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"items":["nike.com","adidas.com"],"type":"domains","webhook_url":"https://hooks.example.com/adlib"}'

Send your key in the X-API-Key header. Try it in the explorer.

Request body

itemsrequired
string[]

Advertiser ids (<platform>:<id>), domains, or ad ids. Up to your plan's batch size: free 5, starter 25, growth and above 100

options
object
–
country
string
–
include_ads
boolean

domains: also fetch the first page of ads of each matched advertiser

max_pages
integer

advertisers: pages per advertiser (default 3)

min_score
number

domains: keep only advertisers with at least this resolve score

platforms
string[]

domains: restrict resolution

status
string

One of active, inactive,

typerequired
string

What the items are

One of advertisers, domains, ads

webhook_url
string

POSTed (signed) when the job completes

Response

data.created_atrequired
datetime
–
data.credits_billedrequired
integer
–
data.donerequired
integer
–
data.failedrequired
integer
–
data.finished_atrequired
datetime
–
data.job_idrequired
string
–
data.kindrequired
string
–
data.paramsrequired
object
–
data.started_atrequired
datetime
–
data.statusrequired
string

One of queued, running, done, failed

data.totalrequired
integer
–
data.webhook_urlrequired
string
–