{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Ads Library Scraper: Ads, Transcripts & Google Ads",
    "description": "Facebook and Instagram Ad Library scraper, $2.50 per 1,000 ads: every ad, plus what others skip. Video transcripts, text inside image ads, every landing page and the same advertiser's Google ads, with an advertiser verdict. Batch input, pay per result.",
    "version": "1.0",
    "x-build-id": "zVNKaFIz7RihN5gWt"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ntriqpro~facebook-ads-library-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ntriqpro-facebook-ads-library-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/ntriqpro~facebook-ads-library-scraper/runs": {
      "post": {
        "operationId": "runs-sync-ntriqpro-facebook-ads-library-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/ntriqpro~facebook-ads-library-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-ntriqpro-facebook-ads-library-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "pageUrls"
        ],
        "properties": {
          "pageUrls": {
            "title": "Advertisers or search terms",
            "type": "array",
            "description": "One per line. Each value is detected automatically: a Meta Ad Library URL (an advertiser view or a keyword search), a Facebook page URL (facebook.com/nike), a numeric page ID, or a search term (every advertiser whose ads match it). Free plan: the first entry only. You are responsible for a lawful purpose and for complying with Meta's and Google's terms and with the rights in the advertisers' pages and creatives.",
            "items": {
              "type": "string"
            }
          },
          "maxAdsPerTarget": {
            "title": "Max ads per advertiser or search",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Upper limit of ad rows for each entry (1-5000, default 200). Free plan: 20 ads per run at $3.75 per 1,000 ads, the rest is counted as locked; paid plans pay $2.50 per 1,000 ads (33% cheaper per row).",
            "default": 200
          },
          "enrich": {
            "title": "Extra layers",
            "type": "array",
            "description": "Rows added on top of the ad rows; each is charged under its own event. Landing pages: every distinct landing URL (status, title, product and price). Google ads: the same advertiser's ads in the Google Ads Transparency Center. Image text: text printed on image ads. Video transcripts: speech in video ads (slower, off by default). AI creative analysis: one row per distinct creative with hook type, offer, target audience, angle, emotion and claims, plus top hooks on the advertiser row. Free plan: one sample row per layer.",
            "items": {
              "type": "string",
              "enum": [
                "landingPages",
                "googleAds",
                "imageText",
                "transcripts",
                "creativeAi"
              ],
              "enumTitles": [
                "Landing pages",
                "Google ads (same advertiser)",
                "Text inside image ads",
                "Video ad transcripts",
                "AI creative analysis (hook, offer, audience)"
              ]
            },
            "default": [
              "landingPages",
              "googleAds",
              "imageText",
              "creativeAi"
            ]
          },
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "Two-letter country codes where the ads were delivered (US, GB, DE...), or ALL. Up to 10. A country in an Ad Library URL overrides this list for that URL.",
            "default": [
              "US"
            ],
            "items": {
              "type": "string"
            }
          },
          "adStatus": {
            "title": "Ad status",
            "enum": [
              "active",
              "inactive",
              "all"
            ],
            "type": "string",
            "description": "Which ads to collect. A status in an Ad Library URL overrides this for that URL.",
            "default": "active"
          },
          "maxTranscripts": {
            "title": "Max video transcripts per advertiser",
            "minimum": 0,
            "maximum": 200,
            "type": "integer",
            "description": "Used when Video ad transcripts is switched on, and by the free plan's sample row (0-200, default 10). Transcribing runs on CPU, so this keeps the run time bounded.",
            "default": 10
          },
          "adsAfter": {
            "title": "Only ads started on or after (paid plans only)",
            "type": "string",
            "description": "YYYY-MM-DD. Paid plans only; ignored on the free plan.",
            "default": ""
          },
          "adsBefore": {
            "title": "Only ads started on or before (paid plans only)",
            "type": "string",
            "description": "YYYY-MM-DD. Paid plans only; ignored on the free plan.",
            "default": ""
          },
          "onlyNewSinceLastRun": {
            "title": "Only ads new since my last run (paid plans only)",
            "type": "boolean",
            "description": "Skips ads already delivered in an earlier run with the same list of entries, so a weekly run pays for new ads only. Paid plans only.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Meta rate-limits data-center networks; the run starts on its own network and switches to this proxy when it is blocked. Residential is recommended.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}