Docs

Batch jobs

Send up to 100 domains, advertisers or ads in one asynchronous job and collect the results when it is done, with an optional signed webhook.

A batch job runs many lookups in the background, so you don't manage concurrency and rate limits yourself.

Start a job

Shell
curl -X POST "https://api.adlibapi.com/v1/batch" \
  -H "X-API-Key: $ADLIB_API_KEY" -H "Content-Type: application/json" \
  -d '{"type": "domains", "items": ["nike.com", "adidas.com", "puma.com"],
       "webhook_url": "https://hooks.example.com/adlib-batch"}'
type Items What each item does
domains Company domains Resolves the domain on every platform; with options.include_ads also fetches the first page of ads per account
advertisers Advertiser ids Fetches the advertiser's ads, options.max_pages pages (default 3)
ads Ad ids Fetches each ad

options also takes platforms, country and status. Items per job: Free 5, Starter 25, Growth and above 100.

Get the results

The response contains the job id. Poll the job, or wait for the webhook:

Shell
curl "https://api.adlibapi.com/v1/batch/0b7c6a8e-1f2d-4c3b-9a8e-5d6f7a8b9c0d" \
  -H "X-API-Key: $ADLIB_API_KEY"

Results are paginated with next_cursor. The webhook is signed like watchlist events; see Watchlists and webhooks.

Cost

Each item is billed like the single call it replaces, for example 10 credits for a resolved domain or 1 credit per Meta ad. Failed items are not billed.