Skip to main content
Glama

facebook_ad_library_search

Search Meta Ad Library by keyword — active/inactive, media type, date range, platforms, cursor, and spend/impressions when Meta publishes them. Costs 2 credits. Empty results and failures are never charged. Pass cache=true for a free 24h cache hit (default always fresh).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qYesKeyword, brand, or advertiser to search Meta Ad Library (min 2 characters).
trimNoWhen true, omit cards/images/videos typed arrays (media[] stays). Captapi payloads are already lean vs Meta nested snapshots.
cacheNoSet true to serve from the 24h response cache (0 credits on hit). Default false — always fetch fresh.
limitNoMax items to return (default 20, max 200). Flat 2 credits per call.
cursorNoPagination cursor from a previous nextCursor. Pages through the current Meta HTML result batch.
statusNoAd delivery status: ACTIVE (default), INACTIVE, or ALL. Use ACTIVE for "what are they running now?".
ad_typeNoall (default) or political_and_issue_ads. Spend/impressions are typically only filled for political/issue ads.
countryNoTwo-letter ISO country code (e.g. US, GB, DE). Default US.
sort_byNoMeta sort mode: total_impressions or relevancy_monthly_grouped.
end_dateNoOnly ads with delivery start on/before this date (YYYY-MM-DD).
platformsNoComma-separated publisher platforms to keep: FACEBOOK, INSTAGRAM, MESSENGER, AUDIENCE_NETWORK, THREADS.
media_typeNoCreative filter: ALL (default), IMAGE, VIDEO, MEME, IMAGE_AND_MEME, or NONE.
start_dateNoOnly ads with delivery start on/after this date (YYYY-MM-DD).
search_typeNokeyword_unordered (default) or keyword_exact_phrase.

TDQS

A4.3/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses billing behavior (flat 2 credits, empty/failed calls not charged), cache semantics (cache=true free for 24h, default fresh), and a data-availability caveat (spend/impressions typically only filled for political/issue ads). This is meaningful behavioral transparency beyond the bare operation. It doesn't document rate limits or auth, but the disclosed operational behaviors are substantial. No contradiction with annotations since annotations are absent.

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?

The description is a single compact paragraph with high information density. Every sentence earns its place: what it does, what it costs, and the free-cache option. It could slightly improve structure by separating billing/caching into bullet points, but it is still efficient and front-loaded with the core purpose.

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?

Given 14 parameters, no annotations, and no output schema, the description fills several critical gaps: pricing, cache semantics, political/issue data caveat, and the broad search scope. Some gaps remain — no rate limits, no explicit mention of pagination depth or return shape, and no explicit sibling differentiation — but the description covers the most decision-relevant operational context and the schema covers all parameter meanings at 100%.

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

Parameters4/5

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

Schema coverage is 100%, so baseline is 3. The description adds value beyond the schema by explaining billing per call (flat 2 credits), the cache behavior (0 credits on cache hit), and the caveat that spend/impressions are typically only filled for political/issue ads. It also hints that trim relates to lean payloads. It doesn't describe pagination deeply, but the cursor parameter and nextCursor mention in schema cover the basics. Minor gap: no explanation of how date range interacts with delivery start, though that's partially in schema.

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?

The description names a specific verb ('Search'), a precise resource (Meta Ad Library), and the key axes of the search (keyword, active/inactive, media type, date range, platforms, cursor, spend/impressions). It says what the tool returns at a level that distinguishes it from siblings like facebook_ad_library_ad_details and facebook_ad_library_search_companies.

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

Usage Guidelines4/5

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

The description implies when to use it — general keyword search of Meta Ad Library — and several operational facts (2 credits, cache=true for free hits, spend/impressions only typically filled for political/issue ads in the ad_type parameter). It doesn't explicitly contrast with sibling tools like facebook_ad_library_company_ads or facebook_ad_library_search_companies, but the search-scoped verb and parameter hints do enough. The cache and billing guidance is useful direct usage guidance.

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.

TDQS

B3.2/5.0
Disambiguation3/5

The platform-prefix convention keeps most of the 178 tools clearly separated, but several clusters are genuinely ambiguous: tiktok_live_info is explicitly described as 'Identical to TikTok Live', instagram_basic_profile and instagram_channel_details both return profile stats, and facebook_profile_posts overlaps with facebook_profile_reels. The generic 'Summarizer' descriptions for facebook_summarize, instagram_summarize, and tiktok_summarize provide no disambiguating detail at all.

Naming Consistency4/5

The dominant snake_case platform_resource_suffix pattern is followed remarkably consistently across 178 tools (e.g. youtube_channel_videos, tiktok_search_users, reddit_subreddit_posts). Minor deviations exist: the same creator resource is called 'channel' in some tools (tiktok_channel_details, instagram_channel_posts) but 'profile' or 'user' in others (facebook_profile_posts, twitch_user_videos, linnkme_profile); link-in-bio tools mostly use _page but linkme uses _profile; and the video_summarize/video_transcript pair lacks a platform prefix.

Tool Count2/5

At 178 tools this is far beyond what any agent can efficiently navigate in a single flat namespace, and even individual platform subsets exceed reasonable bounds (TikTok alone has ~34 tools, YouTube ~25). The sheer breadth of the multi-platform scope partially justifies the count, but the server would be far more usable split into per-platform servers.

Completeness4/5

The read-only data surface is impressively thorough: nearly every platform has profile + content + search + comments coverage, and TikTok, YouTube, Instagram, and Facebook are covered end-to-end including shops, ads, transcripts, and summaries. Notable gaps are minor: Twitter has no keyword search tool, LinkedIn lacks comments, and Reddit has no user-profile endpoint, but none of these create dead ends for the server's core data-retrieval purpose.