API reference · Ads

Turn an ad library link into AdLib ids

GET/v1/library-urlfree

Try it with your accountOpens in your dashboard, filled in; you see the cost before it runs.

Accepts links copied from the Meta Ad Library, Google Ads Transparency Center, TikTok Ad Library, LinkedIn Ad Library, Pinterest Ads Repository or an X post, and returns the ad or advertiser id with the endpoint that fetches it.

Example request

Shell
curl "https://api.adlibapi.com/v1/library-url?url=https%3A%2F%2Fsummer-heart-0930.chufeiyun1688.workers.dev%3A443%2Fhttps%2Fwww.facebook.com%2Fads%2Flibrary%2F%3Fid%3D1187430977361020" \
  -H "X-API-Key: $ADLIB_API_KEY"

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

Parameters

urlrequired
string

A link copied from an ad library

e.g. https://www.facebook.com/ads/library/?id=1187430977361020

Response

data.hrefrequired
string

The AdLib call that fetches it

data.idrequired
string

<platform>:<id>, usable in every endpoint

data.kindrequired
string

One of ad, advertiser

data.platformrequired
string
–