Skip to main content
Glama

Public ads from the Meta ad library

meta-ads
Read-only

Meta ad library API for AI agents, for competitor research: send a keyword or an advertiser (name or page id) and get its public ads as JSON: advertiser, start and end date, whether it is still running, platforms, text, title, call to action, link, format and image URLs. Filter by country and by active or all ads; up to 100 per call, each ad once. Pay per call in stablecoins; an empty search is not charged and ads you paid for but did not get are refunded. Not offered on Solana: pay on Base or Polygon.

Input Schema

NameRequiredDescriptionDefault
pageNothe advertiser: a page name or its numeric page id (give this or keyword, not both)
limitNonumber of ads wanted, 1 to 100 (default 20). A larger value is lowered to 100 and 0 or a negative one means the default; the quote follows the value used.
activeNotrue: only ads running now; false: active and inactive ads (default true)
countryNotwo-letter country code the ads are shown in, or ALL (default US)US
keywordNosearch the ads by this word or phrase (give this or page, not both)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations cover the safety profile (readOnly, openWorld, non-destructive), yet the description adds substantial behavior beyond them: pay-per-call in stablecoins, no charge on empty search, refund of paid-but-undelivered ads, and a blockchain restriction (not on Solana; pay on Base or Polygon). That is meaningful operational context an agent needs before invoking a paid, open-world call.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core action and resource, and each clause (filters, pricing, refunds, chain restriction) carries real information. It is a dense run-on paragraph, but nothing is filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description compensates by enumerating the returned fields (advertiser, dates, running status, platforms, text, title, CTA, link, format, image URLs) and covering pricing/refund behavior. It is thorough, though error/rate-limit behavior is left implicit.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents keyword, page, limit, active, and country. The description reinforces country/active filtering and the 100-per-call cap and adds 'each ad once,' but nothing syntax-critical beyond the schema, so the baseline 3 holds.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: send a keyword or advertiser, get public Meta ad-library ads as JSON. It names the concrete fields returned and the target use case (competitor research), so an agent can tell it apart from the many other platform-scraper siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides a use-case context ('for competitor research') and notes the keyword-vs-advertiser input choice, but never states when to prefer this over another tool or any when-not conditions. Usage is implied rather than explicitly guided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources