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.
QuickstartYour first search in a minute, with a sandbox key.StartSearch a platformGET /v1/{platform}/ads: each platform and the filters its library has.ReferenceFor AI agentsAn agent can get its own key, test it and go live with no person signing up.Agents
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
| Endpoint | Library | Search by | Ads a page | Credits | Covers |
|---|---|---|---|---|---|
| GET /v1/meta/ads | Meta Ad Library | q or page_id | up to 30 | 1 | Every country Meta runs ads in |
| GET /v1/google/ads | Google Ads Transparency Center | advertiser_id or domain | up to 100 | 1 | Every country Google runs ads in |
| GET /v1/tiktok/ads | TikTok Commercial Content Library | q or advertiser | up to 36 | 1 | The EEA, the UK and Switzerland |
| GET /v1/linkedin/ads | LinkedIn Ad Library | q, company_id or company | about 24 | 2 | Every 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 sendsAuthorization: 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 oncode: 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.