Apinoa Docs

Ads API

The Meta Ad Library, the TikTok Ad Library, the LinkedIn Ad Library and the Google Ads Transparency Center through one set of operations and one ad schema.

View raw .mdx

The Ads API reads the four public ad libraries: what an advertiser runs, what it says, where and when it ran, and what the library discloses about its reach, spend, payer and targeting. Every library answers with the same records, so the code that reads Meta's ads reads Google's.

curl "https://gateway.apinoa.com/v1/meta-ads/ads?query=running+shoes&country=US" -H "x-api-key: $APINOA_API_KEY"

Operations

OperationReturnsWhat It Reads
adsAdPageAds by keyword, by advertiser, or by the library's own filters
adAdOne ad, with everything its page in the library discloses
advertisersAdvertiserPageAdvertisers by name, each with the id that ads?advertiser= takes
advertiserAdvertiserOne advertiser's own page in the library

Which Library Has Which

adsadadvertisersadvertiserCovers
Meta Ad Library✓✓Facebook, Instagram, Messenger and Audience Network ads, worldwide
TikTok Ad Library✓✓✓ads shown in the EU, the UK and the other countries TikTok discloses (not the US)
LinkedIn Ad Library✓✓LinkedIn ads, worldwide
Google Ads Transparency Center✓✓✓✓Google Search, YouTube, Shopping, Maps and Play ads, worldwide

Inputs

The same idea has the same name in every library. Each library's page lists exactly which inputs it takes.

InputMeaning
querykeywords to search the library for
advertiseran advertiser's id, as advertisers returns it or as an ad's advertiser.id names it
advertiserNamean advertiser's name, where the library searches by name
countrywhere the ad was shown, as an ISO 3166-1 alpha-2 code (US, DE); a comma list where the library takes several
startDate, endDatethe days the ads ran between, as YYYY-MM-DD
idone ad's or one advertiser's id, or its address in the library
limithow many results a page holds, where the library lets you choose
cursorthe previous page's cursor. Send it alone for the next page

What Is the Same Everywhere

  • One schema. Ad, AdPage, Advertiser and AdvertiserPage are the same in every library. A fact only one library states is in that record's ext, documented on the library's pages.
  • Ranges stay ranges. A library that shows impressions or spend as a range ("1K-5K") is returned as one: {text, lower, upper}, never a made-up single number.
  • What a library does not disclose is absent. Run dates, reach, spend and targeting appear only where the library shows them, and some disclose them only for some ads (political ads, ads shown in the EU).
  • Price. 1 credit per page of ads, per ad and per page of advertisers. Failed calls are not billed.

Errors

The same envelope and codes as the rest of the API. See Errors. An ad or advertiser the library does not hold answers 404 NOT_FOUND.

Reference

On this page