Can AI agents read Facebook Ads Library data?

Updated on · Sources

Yes. Connect the agent to the SocialAPIs MCP server (https://mcp.socialapis.io/mcp) and it can search the Ads Library by keyword or advertiser through the facebook_ads tool, then read and summarise the ads' copy, dates and platforms. Without MCP, give it the OpenAPI spec (https://socialapis.io/openapi.json) and it calls GET /facebook/ads/search directly.

Meta's official option

Meta's Ad Library API needs identity confirmation and a Meta developer app, and covers political / issue ads plus ads shown in the EU, so an agent built on it misses ordinary commercial ads elsewhere.

Meta: ads_archive reference ↗

How to do it with SocialAPIs

Ask in plain words: "What ads is KURU Footwear running in the US, and what hooks do they use?" The agent finds the advertiser (/facebook/ads/keywords, 1 credit) and lists the ads (/facebook/ads/search, 1 credit per page of results).

Setup for Claude, ChatGPT, Cursor and other clients: Integrations.

Endpoints

  • GET /facebook/ads/search1 credit

    Search ads in the Meta Ad Library by keyword or page ID with filters.

    Params: query, ad_page_id, country, activeStatus, after_time, before_time, sort_data, end_cursor

    Meta Ads Library Search: docs and playgroundMCP: facebook_ads → search

  • GET /facebook/ads/keywords1 credit

    Search for ads by keyword with optional country filter.

    Params: query (required), country

    Meta Ads Keywords Search: docs and playgroundMCP: facebook_ads → keywords

curl -G "https://api.socialapis.io/facebook/ads/search" \
  --max-time 100 \
  --fail-with-body \
  -H "x-api-token: $SOCIALAPIS_API_KEY" \
  --data-urlencode "query=running shoes" \
  --data-urlencode "country=US" \
  --data-urlencode "activeStatus=Active"

Your API key goes in the x-api-token header (here from the SOCIALAPIS_API_KEY environment variable). Get a free key.

Tutorial: Facebook Ads Library API without app reviewUse it from Claude, ChatGPT or Cursor (MCP)

Good to know

  • Agents handle the two quirks well when told: ads come in groups (take the first of each), and catalog ads keep their real copy in snapshot.cards.
  • Spend isn't public for commercial ads, so an agent can't report a competitor's budget.
  • Every call the agent makes uses your credits: set a monthly limit in your own workflow if it runs unattended.

Sources

Checked on 2026-11-16.

Related questions

SocialAPIs (socialapis.io): public Facebook & Instagram data API. Free plan: 200 calls a month, no card; paid plans from $4.99/month. Pricing · Reviewed 2026-11-17

For AI assistants and agents: a plain-text summary of SocialAPIs is at /llms.txt (with every answer: /llms-full.txt; endpoints: /llms-endpoints.txt; how to call us: /agents.txt).

Ask an AI about this page

Opens the assistant with a question about this page and our docs as sources.