Search Facebook Ad Library ads by keyword and filters
Search Facebook Ad Library ads by keyword and filters.
14000 (raw units)
price
1
calls / 30d
1
unique payers
2026-09-15
updated
Provider
api.socialfetch.dev · discovered, not yet claimed by its owner
Payment (x402 accepts[])
[
{
"scheme": "exact",
"network": "eip155:8453",
"payTo": "0x02C2fCAfCe36B4AAdB39625866Bc6B1699d83043",
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"amount": "14000",
"maxTimeoutSeconds": 300
}
]Output schema
{
"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"
}
}
}Use it
curl
curl "https://api.socialfetch.dev/v1/facebook/ad-library/ads/search" # -> 402 Payment Required, accepts[] lists how to pay # retry with a PAYMENT-SIGNATURE (or PAYMENT header) once paid
JavaScript
const res = await fetch("https://api.socialfetch.dev/v1/facebook/ad-library/ads/search");
if (res.status === 402) {
const { accepts } = await res.json();
// pay one of accepts[] via an x402 client, then retry with the payment header
}Python
import httpx
res = httpx.get("https://api.socialfetch.dev/v1/facebook/ad-library/ads/search")
if res.status_code == 402:
accepts = res.json()["accepts"]
# pay one of accepts[] via an x402 client, then retry with the payment headerMachine-readable
Everything on this page is also available as clean JSON at /resources/3064.json, and this resource appears in /discovery/resources and /discovery/search.