{
  "x402Version": 2,
  "id": 3064,
  "slug": "3064",
  "resource": "https://api.socialfetch.dev/v1/facebook/ad-library/ads/search",
  "description": "Search Facebook Ad Library ads by keyword and filters.",
  "type": "http",
  "accepts": [
    {
      "scheme": "exact",
      "network": "eip155:8453",
      "payTo": "0x02C2fCAfCe36B4AAdB39625866Bc6B1699d83043",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount": "14000",
      "maxTimeoutSeconds": 300
    }
  ],
  "outputSchema": {
    "bazaar": {
      "info": {
        "input": {
          "method": "GET",
          "queryParams": {
            "query": "running"
          },
          "type": "http"
        },
        "output": {
          "example": {
            "data": {
              "ads": [
                {
                  "_truncated": true,
                  "adId": null,
                  "campaign": {
                    "collationCount": null,
                    "collationId": null
                  },
                  "categories": [
                    null
                  ],
                  "countries": [],
                  "endedAt": "2025-02-28T00:00:00.000Z",
                  "id": "615470338018648",
                  "impressions": {
                    "index": null,
                    "text": null
                  },
                  "isActive": true,
                  "page": {
                    "categories": null,
                    "id": null,
                    "isDeleted": null,
                    "likeCount": null,
                    "name": null,
                    "profilePictureUrl": null,
                    "url": null
                  },
                  "publisherPlatforms": [
                    null
                  ],
                  "startedAt": "2025-02-28T00:00:00.000Z",
                  "url": "https://www.facebook.com/ads/library?id=615470338018648"
                }
              ],
              "page": {
                "hasMore": true,
                "nextCursor": "eyJjIjoiQVFIX2V4YW1wbGUiLCJmIjp7InF1ZXJ5IjoicnVubmluZyJ9fQ",
                "totalResultsEstimate": 50001
              },
              "query": "running"
            },
            "meta": {
              "creditsCharged": 1,
              "requestId": "req_01example_found",
              "version": "v1"
            }
          },
          "type": "json"
        }
      },
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "method": {
                "enum": [
                  "GET"
                ],
                "type": "string"
              },
              "queryParams": {
                "properties": {
                  "adType": {
                    "description": "Optional filter for all ads or political and issue ads.",
                    "enum": [
                      "all",
                      "political-and-issue"
                    ],
                    "type": "string"
                  },
                  "country": {
                    "description": "Optional country code filter. Use ALL to search all countries.",
                    "maxLength": 3,
                    "minLength": 2,
                    "type": "string"
                  },
                  "cursor": {
                    "description": "Opaque pagination cursor from a previous response.",
                    "minLength": 1,
                    "type": "string"
                  },
                  "endDate": {
                    "description": "Optional end date filter in YYYY-MM-DD format.",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                    "type": "string"
                  },
                  "mediaType": {
                    "description": "Optional creative media filter.",
                    "enum": [
                      "all",
                      "image",
                      "video",
                      "meme",
                      "image-and-meme",
                      "none"
                    ],
                    "type": "string"
                  },
                  "query": {
                    "description": "Search query text for Facebook Ad Library ads.",
                    "maxLength": 4096,
                    "minLength": 1,
                    "type": "string"
                  },
                  "searchType": {
                    "description": "Optional keyword matching mode for the search query.",
                    "enum": [
                      "keyword-unordered",
                      "exact-phrase"
                    ],
                    "type": "string"
                  },
                  "sortBy": {
                    "description": "Optional sort order for returned ads.",
                    "enum": [
                      "impressions",
                      "most-recent"
                    ],
                    "type": "string"
                  },
                  "startDate": {
                    "description": "Optional start date filter in YYYY-MM-DD format.",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                    "type": "string"
                  },
                  "status": {
                    "description": "Optional ad status filter.",
                    "enum": [
                      "all",
                      "active",
                      "inactive"
                    ],
                    "type": "string"
                  },
                  "trim": {
                    "description": "When true, returns a smaller response with fewer fields.",
                    "type": "boolean"
                  }
                },
                "required": [
                  "query"
                ],
                "type": "object"
              },
              "type": {
                "const": "http",
                "type": "string"
              }
            },
            "required": [
              "type",
              "method"
            ],
            "type": "object"
          },
          "output": {
            "properties": {
              "example": {
                "type": "object"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type"
            ],
            "type": "object"
          }
        },
        "required": [
          "input"
        ],
        "type": "object"
      }
    },
    "payment-identifier": {
      "info": {
        "required": false
      },
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "id": {
            "maxLength": 128,
            "minLength": 16,
            "pattern": "^[a-zA-Z0-9_-]+$",
            "type": "string"
          },
          "required": {
            "type": "boolean"
          }
        },
        "required": [
          "required"
        ],
        "type": "object"
      }
    }
  },
  "tags": [
    "bazaar",
    "payment-identifier"
  ],
  "sourceHost": "api.socialfetch.dev",
  "lastUpdated": "2026-09-15T07:30:35.446Z",
  "quality": {
    "calls30d": 1,
    "uniquePayers30d": 1,
    "lastCalledAt": "2026-09-15T07:30:35.295Z"
  },
  "liveness": {},
  "verified": false,
  "featured": false,
  "provider": {
    "host": "api.socialfetch.dev",
    "manifest_name": "api.socialfetch.dev",
    "source": "cdp-mirror",
    "source_manifest_url": "https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources",
    "submitted_at": "2026-09-18T22:00:31.484Z"
  }
}