API reference · Ads

Turn an ad library link into AdLib ids

GET/v1/library-urlfree

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%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
–