{
  "openapi": "3.1.0",
  "info": {
    "title": "AdRadar — Meta Ad Library intelligence API",
    "version": "1.0.0",
    "summary": "Pay-per-call competitor ad research on the public Meta Ad Library, paid in USDC over x402.",
    "description": "Scrapes the public Meta Ad Library for keywords you choose, classifies every ad, and returns the ones that are actually winning — paid per call in USDC with x402, no account or API key.",
    "contact": {
      "name": "AdRadar support",
      "email": "support@adradarmcp.cloud",
      "url": "https://adradarmcp.cloud/en/setup/"
    },
    "license": {
      "name": "Commercial — pay per call",
      "url": "https://adradarmcp.cloud/en/#pricing"
    },
    "x-guidance": "AdRadar answers one question: which competitor ads in the public Meta Ad Library are actually winning, and why.\n\nCall it when you need evidence instead of guesses: find long-running (therefore likely profitable) Facebook/Instagram ads for a product or niche, see the hooks and angles they use, compare advertisers, or check which creatives keep being reused. Do not call it for ad-account management, private performance data, TikTok ad data, or anything outside the public Meta Ad Library.\n\nInputs: keywords (1-10 short product/niche terms, e.g. [\"ghế massage\"]), countries (ISO-2, default [\"US\"]), active_status (default [\"active\"]), max_queries (1-5, each query returns up to 30 ads). Optionally a page_id to watch one advertiser.\n\nOutputs, per scan: rows[] each with library_id, page_name, snapshot_url, started, days_running, status, media_type, creative_reuse, keyword_match (phrase | all_tokens | partial | none — lower means the ad barely mentions your keyword), hook_type, primary_angle, target_audience, has_price, has_guaranty signals and winning_score 0-100 (45% run time + 35% creative reuse + 10% CTA + 10% copy clarity, computed only over ads that match the keyword and are still active). Read winning_score as a longevity signal, not proof of profit. Off-topic ads are already removed.\n\nPayment: HTTP 402 until paid. Read accepts[] (USDC, several EVM chains), sign one entry with x402, retry the same POST with header PAYMENT-SIGNATURE (base64 PaymentPayload). A successful call returns PAYMENT-RESPONSE with the settlement transaction. Price is $0.01 per call; failed or empty scans are not billed.\n\nTip: run one scan per keyword set, then sort rows by winning_score. If rows is empty, the keyword was too narrow or too broad — retry with a shorter phrase or another country."
  },
  "servers": [
    {
      "url": "https://adradarmcp.cloud",
      "description": "Production"
    }
  ],
  "externalDocs": {
    "description": "Setup guide, MCP client config, pricing and worked examples",
    "url": "https://adradarmcp.cloud/en/setup/"
  },
  "tags": [
    {
      "name": "ads",
      "description": "Meta Ad Library research, billed per call in USDC."
    }
  ],
  "paths": {
    "/v1/ads/spy": {
      "post": {
        "operationId": "spy_ads",
        "summary": "Find winning competitor ads for a product or niche",
        "description": "Search the public Meta Ad Library by keyword and return the winning ads: run time, creative reuse, hook, angle, audience and a 0-100 winning score. Ads whose copy never mentions your keyword are removed. Each call costs $0.01 in USDC and returns up to 10 top ads.",
        "tags": [
          "ads"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "keywords": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 10,
                    "items": {
                      "type": "string",
                      "maxLength": 100
                    },
                    "description": "Product or niche search terms, 1-10 items. Short product phrases work best: [\"ghế massage\"], [\"protein powder\"]. Each keyword becomes a Meta Ad Library query (up to 30 ads each)."
                  },
                  "countries": {
                    "type": "array",
                    "maxItems": 5,
                    "items": {
                      "type": "string",
                      "pattern": "^[A-Z]{2}$"
                    },
                    "description": "ISO-3166 alpha-2 country codes to search, e.g. [\"US\"] or [\"VN\",\"TH\"]. Defaults to [\"US\"]."
                  },
                  "active_status": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "active",
                        "inactive",
                        "all"
                      ]
                    },
                    "description": "Which ads to include by status. Default [\"active\"]; use [\"all\"] to include ads that already stopped."
                  },
                  "max_queries": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 5,
                    "description": "Upper bound on Meta queries this call may run (one per keyword x country). Default 5; higher costs more scrape time, not more money."
                  }
                },
                "required": [
                  "keywords"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USDC",
            "amount": "0.010000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ],
          "networks": [
            "eip155:8453",
            "eip155:137",
            "eip155:42161",
            "eip155:10",
            "eip155:43114"
          ]
        },
        "responses": {
          "200": {
            "description": "Winning ads, sorted by winning_score descending.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "library_id": {
                            "type": "string",
                            "description": "Meta Ad Library id — use it to open snapshot_url and to dedupe across scans."
                          },
                          "page_name": {
                            "type": "string",
                            "description": "Advertiser page name."
                          },
                          "snapshot_url": {
                            "type": "string",
                            "description": "Public Ad Library snapshot URL for this ad."
                          },
                          "started": {
                            "type": "string",
                            "description": "Start date as printed by the Ad Library, e.g. '12 Mar 2026'."
                          },
                          "days_running": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Days since `started`. For inactive ads this is age, not runtime."
                          },
                          "status": {
                            "type": "string",
                            "description": "Active or Inactive."
                          },
                          "media_type": {
                            "type": "string",
                            "description": "Image, Video, Carousel or DCO."
                          },
                          "creative_reuse": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "How many ads the advertiser runs on the same creative — a scaling hint."
                          },
                          "keyword_match": {
                            "type": "string",
                            "description": "phrase | all_tokens | partial | none. How strongly this ad's copy mentions the keyword that surfaced it."
                          },
                          "hook_type": {
                            "type": "string",
                            "description": "Opening hook style, e.g. question, stat, pain-point, discount."
                          },
                          "primary_angle": {
                            "type": "string",
                            "description": "Main selling angle, e.g. price, results_testimonial, convenience."
                          },
                          "target_audience": {
                            "type": "string",
                            "description": "Audience the copy addresses, e.g. parent, working_professional."
                          },
                          "has_price": {
                            "type": "boolean",
                            "description": "Copy shows a price or a discount figure."
                          },
                          "winning_score": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "0-100 longevity score. null when the ad is inactive or off-topic."
                          }
                        },
                        "additionalProperties": false
                      },
                      "description": "Up to 10 top ads that match the keyword."
                    },
                    "summary": {
                      "type": "object",
                      "properties": {
                        "total_ads": {
                          "type": "integer",
                          "description": "Ads returned by Meta for the queries, before relevance filtering."
                        },
                        "tagged": {
                          "type": "integer",
                          "description": "Ads successfully classified by the tagger."
                        },
                        "returned_top_ads": {
                          "type": "integer",
                          "description": "Rows actually returned after keeping only keyword-matching ads."
                        }
                      },
                      "additionalProperties": false
                    },
                    "payment": {
                      "type": "object",
                      "properties": {
                        "amount_usd": {
                          "type": "string",
                          "description": "Charged amount in USD."
                        },
                        "currency": {
                          "type": "string",
                          "description": "Always USDC."
                        },
                        "network": {
                          "type": "string",
                          "description": "Chain the payment settled on (CAIP-2)."
                        },
                        "payer": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Paying wallet address."
                        },
                        "transaction": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Gateway settlement transaction id."
                        }
                      },
                      "additionalProperties": false
                    },
                    "cached": {
                      "type": "boolean",
                      "description": "true when served from a recent identical scan."
                    }
                  },
                  "additionalProperties": false
                }
              }
            },
            "headers": {
              "PAYMENT-RESPONSE": {
                "description": "Base64 SettlementResponse from Circle Gateway.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "402": {
            "description": "Payment required. Body is an x402 v2 PaymentRequired object; the same object is base64-encoded in the PAYMENT-REQUIRED header.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64 PaymentRequired object.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "x402Version": {
                      "type": "integer",
                      "description": "Protocol version. Always 2."
                    },
                    "error": {
                      "type": "string",
                      "description": "Why payment is required or why the supplied payment was rejected."
                    },
                    "resource": {
                      "type": "object",
                      "description": "Describes the protected resource (url, description, mimeType, serviceName)."
                    },
                    "accepts": {
                      "type": "array",
                      "description": "Acceptable payment options. Pick one, sign it, retry with its PaymentPayload in the PAYMENT-SIGNATURE header.",
                      "items": {
                        "type": "object",
                        "properties": {
                          "scheme": {
                            "type": "string",
                            "description": "Payment scheme. exact = one fixed price per call."
                          },
                          "network": {
                            "type": "string",
                            "description": "CAIP-2 chain id, e.g. eip155:8453 (Base)."
                          },
                          "amount": {
                            "type": "string",
                            "description": "Price in atomic USDC units (10000 = $0.01)."
                          },
                          "asset": {
                            "type": "string",
                            "description": "USDC contract address on that chain."
                          },
                          "payTo": {
                            "type": "string",
                            "description": "Seller wallet address."
                          },
                          "maxTimeoutSeconds": {
                            "type": "integer",
                            "description": "How long the authorization stays valid."
                          },
                          "extra": {
                            "type": "object",
                            "description": "Gateway batching hints: name=GatewayWalletBatched, version, verifyingContract."
                          }
                        },
                        "required": [
                          "scheme",
                          "network",
                          "amount",
                          "asset",
                          "payTo"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/ads/evaluate": {
      "post": {
        "operationId": "evaluate_ad_copy",
        "summary": "Classify raw ad copy on a 10-dimension marketing matrix",
        "description": "Send ad copy you already have (yours or a competitor's) and get it labelled without any scraping: hook type, primary angle, target audience, CTA strength, copy clarity, urgency, price / guarantee / social-proof signals, lead-gen intent. Use it to grade a draft before spending, or to label a competitor's copy you scraped elsewhere. $0.01 per call.",
        "tags": [
          "ads"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ad_copy": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000,
                    "description": "The ad copy to classify, 1-2000 characters. Primary text only; headlines and image text can be appended."
                  }
                },
                "required": [
                  "ad_copy"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USDC",
            "amount": "0.010000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ],
          "networks": [
            "eip155:8453",
            "eip155:137",
            "eip155:42161",
            "eip155:10",
            "eip155:43114"
          ]
        },
        "responses": {
          "200": {
            "description": "Classification labels for the copy.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "object",
                      "description": "Labels: hook_type, primary_angle, target_audience, hook_confidence, angle_confidence, audience_confidence, cta_strength, copy_clarity, urgency, has_price, has_guarantee, has_social_proof, is_lead_gen."
                    },
                    "payment": {
                      "type": "object",
                      "properties": {
                        "amount_usd": {
                          "type": "string",
                          "description": "Charged amount in USD."
                        },
                        "currency": {
                          "type": "string",
                          "description": "Always USDC."
                        },
                        "network": {
                          "type": "string",
                          "description": "Chain the payment settled on (CAIP-2)."
                        },
                        "payer": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Paying wallet address."
                        },
                        "transaction": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Gateway settlement transaction id."
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "additionalProperties": false
                }
              }
            },
            "headers": {
              "PAYMENT-RESPONSE": {
                "description": "Base64 SettlementResponse from Circle Gateway.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "402": {
            "description": "Payment required. Body is an x402 v2 PaymentRequired object; the same object is base64-encoded in the PAYMENT-REQUIRED header.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64 PaymentRequired object.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "x402Version": {
                      "type": "integer",
                      "description": "Protocol version. Always 2."
                    },
                    "error": {
                      "type": "string",
                      "description": "Why payment is required or why the supplied payment was rejected."
                    },
                    "resource": {
                      "type": "object",
                      "description": "Describes the protected resource (url, description, mimeType, serviceName)."
                    },
                    "accepts": {
                      "type": "array",
                      "description": "Acceptable payment options. Pick one, sign it, retry with its PaymentPayload in the PAYMENT-SIGNATURE header.",
                      "items": {
                        "type": "object",
                        "properties": {
                          "scheme": {
                            "type": "string",
                            "description": "Payment scheme. exact = one fixed price per call."
                          },
                          "network": {
                            "type": "string",
                            "description": "CAIP-2 chain id, e.g. eip155:8453 (Base)."
                          },
                          "amount": {
                            "type": "string",
                            "description": "Price in atomic USDC units (10000 = $0.01)."
                          },
                          "asset": {
                            "type": "string",
                            "description": "USDC contract address on that chain."
                          },
                          "payTo": {
                            "type": "string",
                            "description": "Seller wallet address."
                          },
                          "maxTimeoutSeconds": {
                            "type": "integer",
                            "description": "How long the authorization stays valid."
                          },
                          "extra": {
                            "type": "object",
                            "description": "Gateway batching hints: name=GatewayWalletBatched, version, verifyingContract."
                          }
                        },
                        "required": [
                          "scheme",
                          "network",
                          "amount",
                          "asset",
                          "payTo"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/ads/google": {
      "post": {
        "operationId": "google_ads_of_advertiser",
        "summary": "List a competitor's Google ads from the Ads Transparency Center",
        "description": "Given a domain or Google advertiser id, return that advertiser's live Google ads (Search, Display, YouTube) with when each was first and last shown and how many days it has been running. Use it to see what a brand is testing on Google right now. No keyword search. $0.01 per call.",
        "tags": [
          "ads"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "target": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "Domain such as nike.com, or a Google advertiser id such as AR0143456789012345."
                  },
                  "region": {
                    "type": "string",
                    "pattern": "^[A-Z]{2}$",
                    "description": "ISO-3166 alpha-2 region whose ads you want, e.g. \"US\". Defaults to \"US\"."
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100,
                    "description": "Maximum ads to return, 1-100. Default 20."
                  }
                },
                "required": [
                  "target"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USDC",
            "amount": "0.010000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ],
          "networks": [
            "eip155:8453",
            "eip155:137",
            "eip155:42161",
            "eip155:10",
            "eip155:43114"
          ]
        },
        "responses": {
          "200": {
            "description": "Google ads for that advertiser.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "rows": {
                      "type": "array",
                      "description": "One entry per Google ad.",
                      "items": {
                        "type": "object",
                        "properties": {
                          "advertiser": {
                            "type": "string",
                            "description": "Advertiser name shown by Google."
                          },
                          "region": {
                            "type": "string",
                            "description": "Region the ad was served in."
                          },
                          "first_shown": {
                            "type": "string",
                            "description": "First date Google showed this ad."
                          },
                          "last_shown": {
                            "type": "string",
                            "description": "Last date Google showed this ad."
                          },
                          "days_running": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Days between first_shown and last_shown."
                          },
                          "format": {
                            "type": "string",
                            "description": "Search, Display, Video or Text."
                          },
                          "copy": {
                            "type": "string",
                            "description": "Ad text/headline as published."
                          },
                          "snapshot_url": {
                            "type": "string",
                            "description": "Transparency Center link for the ad."
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "summary": {
                      "type": "object",
                      "properties": {
                        "total_ads": {
                          "type": "integer",
                          "description": "Ads returned by Meta for the queries, before relevance filtering."
                        },
                        "tagged": {
                          "type": "integer",
                          "description": "Ads successfully classified by the tagger."
                        },
                        "returned_top_ads": {
                          "type": "integer",
                          "description": "Rows actually returned after keeping only keyword-matching ads."
                        }
                      },
                      "additionalProperties": false
                    },
                    "payment": {
                      "type": "object",
                      "properties": {
                        "amount_usd": {
                          "type": "string",
                          "description": "Charged amount in USD."
                        },
                        "currency": {
                          "type": "string",
                          "description": "Always USDC."
                        },
                        "network": {
                          "type": "string",
                          "description": "Chain the payment settled on (CAIP-2)."
                        },
                        "payer": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Paying wallet address."
                        },
                        "transaction": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Gateway settlement transaction id."
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "additionalProperties": false
                }
              }
            },
            "headers": {
              "PAYMENT-RESPONSE": {
                "description": "Base64 SettlementResponse from Circle Gateway.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "402": {
            "description": "Payment required. Body is an x402 v2 PaymentRequired object; the same object is base64-encoded in the PAYMENT-REQUIRED header.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64 PaymentRequired object.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "x402Version": {
                      "type": "integer",
                      "description": "Protocol version. Always 2."
                    },
                    "error": {
                      "type": "string",
                      "description": "Why payment is required or why the supplied payment was rejected."
                    },
                    "resource": {
                      "type": "object",
                      "description": "Describes the protected resource (url, description, mimeType, serviceName)."
                    },
                    "accepts": {
                      "type": "array",
                      "description": "Acceptable payment options. Pick one, sign it, retry with its PaymentPayload in the PAYMENT-SIGNATURE header.",
                      "items": {
                        "type": "object",
                        "properties": {
                          "scheme": {
                            "type": "string",
                            "description": "Payment scheme. exact = one fixed price per call."
                          },
                          "network": {
                            "type": "string",
                            "description": "CAIP-2 chain id, e.g. eip155:8453 (Base)."
                          },
                          "amount": {
                            "type": "string",
                            "description": "Price in atomic USDC units (10000 = $0.01)."
                          },
                          "asset": {
                            "type": "string",
                            "description": "USDC contract address on that chain."
                          },
                          "payTo": {
                            "type": "string",
                            "description": "Seller wallet address."
                          },
                          "maxTimeoutSeconds": {
                            "type": "integer",
                            "description": "How long the authorization stays valid."
                          },
                          "extra": {
                            "type": "object",
                            "description": "Gateway batching hints: name=GatewayWalletBatched, version, verifyingContract."
                          }
                        },
                        "required": [
                          "scheme",
                          "network",
                          "amount",
                          "asset",
                          "payTo"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    }
  }
}