Google ad
An ad in Google's Ads Transparency Center: its advertiser, format, versions, the countries it was shown in and when it was last shown.
GET/v1/google/ad-library/ads1 creditHeaders
Get your API keyx-api-key*stringrequiredheaderYour API key, made in the dashboard.
Parameters
2creative_idstringoptionalqueryAn ad's id: CR and 20 digits, the company ads endpoint's creative_id. Give creative_id or url.
urlstringoptionalqueryAn ad's link: adstransparency.google.com/advertiser/<id>/creative/<id>. Give creative_id or url.
max 300 chars · example: https://adstransparency.google.com/advertiser/AR16735076323512287233/creative/CR07264436911983296513
Response fields
26dataobjectThe result: one object, or a list for the endpoints that return several.
data.advertiser_idstringThe advertiser's id: the company ads endpoint takes it.
data.creative_idstringThe ad's id: the ad endpoint takes it.
data.urlstringThe ad's page in the Ads Transparency Center.
data.advertiser_namestringnullableThe advertiser's verified name.
data.domainstringnullableThe advertiser's website, where Google shows it.
data.formatstringnullabletext, image or video.
one of: text, image, video
data.first_shownstringnullableWhen it was first shown. Null on the ad endpoint.
format: date-time
data.last_shownstringnullableWhen it was last shown.
format: date-time
data.preview_urlstringnullableA link to its preview, which draws the ad.
data.image_urlstringnullableIts image, for an ad Google keeps as one.
data.variationsarraynullableEach version of the ad. Only on the ad endpoint.
data.variations[].preview_urlstringnullableA link to the version's preview, which draws the ad.
data.variations[].image_urlstringnullableThe version's image, for an ad Google keeps as one.
data.countriesstring[]nullableThe countries it was shown in, as two-letter codes. Only on the ad endpoint.
pageobjectnullablePaging, for the endpoints that page; null for the others.
page.next_cursorstringnullableSend it as the cursor parameter, with the same other parameters, for the next page. Null on the last page.
page.has_morebooleanoptionalWhether another page follows.
default: false
metaobjectAbout this call.
meta.platformstringThe platform: reddit, threads, tiktok or youtube.
meta.endpointstringThe endpoint's name, such as channel_videos.
meta.paramsobjectThe call's parameters, defaults included. Parameters without a value, and the cursor, are left out.
meta.request_idstringThis call's id. Quote it when you report a problem.
meta.api_versionstringThe API version that answered.
meta.fetched_atstringWhen the data was fetched from the platform (UTC).
format: date-time
meta.cachedbooleanoptionalWhether it came from our cache; fetched_at says how old it is.
default: false
Code example
curl -X GET 'https://api.socialparse.dev/v1/google/ad-library/ads?url=https%3A%2F%2Fadstransparency.google.com%2Fadvertiser%2FAR16735076323512287233%2Fcreative%2FCR07264436911983296513' \ -H 'x-api-key: YOUR_API_KEY'Responses
Successful Response
{ "data": { "advertiser_id": "string", "creative_id": "string", "url": "string", "advertiser_name": "string", "domain": "string", "format": "text", "first_shown": "2019-08-24T14:15:22Z", "last_shown": "2019-08-24T14:15:22Z", "preview_url": "string", "image_url": "string", "variations": [ { "preview_url": "string", "image_url": "string" } ], "countries": [ "string" ] }, "page": { "next_cursor": "string", "has_more": false }, "meta": { "platform": "string", "endpoint": "string", "params": { "property1": "string", "property2": "string" }, "request_id": "string", "api_version": "string", "fetched_at": "2019-08-24T14:15:22Z", "cached": false }}Shorts feed
Shorts from YouTube's Shorts feed as it plays them to a new visitor, ads left out: up to 16 a page, each with its id, link and thumbnail. The video endpoint has the rest.
Company ads
An advertiser's ads in Google's Ads Transparency Center, 40 a page: by its id or its website, with the country, format, Google service and dates given.