Public Ads API

Search the public ad libraries of Meta, Google, TikTok and LinkedIn with one API key. Each platform has its own endpoint with its own filters, and every one answers with the same Ad record. Start in the sandbox, free, then go live.

Credits1 credit a page or adLinkedIn 2. Empty pages, errors and every sandbox call are free.
Free plan100 credits a monthNo card. Then a plan, or a card for extra credits.
Machine-readableOpenAPI 3.1At /openapi.json, with one schema per platform. Every page also as Markdown.

The four libraries

EndpointLibrarySearch byAds a pageCreditsCovers
GET /v1/meta/adsMeta Ad Libraryq or page_idup to 301Every country Meta runs ads in
GET /v1/google/adsGoogle Ads Transparency Centeradvertiser_id or domainup to 1001Every country Google runs ads in
GET /v1/tiktok/adsTikTok Commercial Content Libraryq or advertiserup to 361The EEA, the UK and Switzerland
GET /v1/linkedin/adsLinkedIn Ad Libraryq, company_id or companyabout 242Every country, the last 12 months

GET https://api.publicadsapi.com/v1/ads/{id} returns one ad from any of them with all its detail: every version of the ad, each country it ran in, targeting, the EU's reach figures and who paid. See One ad.

Conventions

  • Base URL https://api.publicadsapi.com. Every request sends Authorization: Bearer <key>: see Authentication and keys.
  • JSON in UTF-8. Dates and times are ISO 8601 in UTC. Lists are arrays.
  • What a platform does not have is null, never a missing key, so every ad has the same keys whichever library it came from.
  • Every error is { "error": { "code", "message" } } with an HTTP status to match. Switch on code: see Errors.
  • Every call that can use credits says how many it used and how many are left, in the body and in X-Credits-* headers.
  • Public Ads API is not affiliated with Meta, Google, TikTok or LinkedIn. It reads their public ad libraries.
Reading this as an LLM or agent? Start at /llms.txt or /llms-full.txt, or add .md to any docs address for plain Markdown. The contract is /openapi.json.