{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook & Meta Ads Library Scraper + Tracker",
    "description": "Scrape Facebook and Meta Ads Library creatives, copy, CTAs and landing links. Track competitor ads and detect new, updated and safely ended ads.",
    "version": "0.12",
    "x-build-id": "050WoKduh5paRLOND"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/luminar~meta-ads-library-creative-changefeed/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-luminar-meta-ads-library-creative-changefeed",
        "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/luminar~meta-ads-library-creative-changefeed/runs": {
      "post": {
        "operationId": "runs-sync-luminar-meta-ads-library-creative-changefeed",
        "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/luminar~meta-ads-library-creative-changefeed/run-sync": {
      "post": {
        "operationId": "run-sync-luminar-meta-ads-library-creative-changefeed",
        "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",
        "properties": {
          "productLevel": {
            "title": "🎯 Run mode",
            "enum": [
              "BASELINE",
              "CHANGES"
            ],
            "type": "string",
            "description": "<b>Baseline</b> returns the ads found now. <b>Changes</b> first returns the current ads as NEW; later runs of the same scope label delivered rows NEW, UPDATED, UNCHANGED, or safely proven ENDED. Every delivered Changes row uses the Changes result price. Run the same monitoring scope sequentially.",
            "default": "BASELINE"
          },
          "searchTerms": {
            "title": "🔎 Search keywords",
            "minItems": 1,
            "maxItems": 25,
            "type": "array",
            "description": "Enter one keyword or brand name per line, for example <code>nike</code>. Keywords, page URLs, and Ad Library URLs share a 25-target limit.",
            "items": {
              "type": "string"
            }
          },
          "pageUrls": {
            "title": "Facebook page or brand URLs",
            "minItems": 1,
            "maxItems": 25,
            "type": "array",
            "description": "Track specific advertisers. Paste one Facebook page or Meta Ad Library page URL per line. Numeric page IDs and Ad Library URLs are the most reliable; if a page handle cannot be resolved, replace it with its numeric-page-ID Ad Library URL.",
            "items": {
              "type": "string"
            }
          },
          "maxAdsPerTarget": {
            "title": "Result limit per target",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum ads collected for each target. The Console prefill is 15 for a low-cost test; API and Task inputs that omit this key use the compatible default of 100. Reaching the limit marks that target CAPPED, so it cannot safely prove that a missing ad ended. This value is also part of a Changes monitoring scope.",
            "default": 100
          },
          "startUrls": {
            "title": "Ad Library search URLs",
            "minItems": 1,
            "maxItems": 25,
            "type": "array",
            "description": "Paste searches already built in the <a href='https://www.facebook.com/ads/library' target='_blank'>Meta Ad Library</a>. Filters present in a pasted URL take precedence over matching filter fields below for that target.",
            "items": {
              "type": "string"
            }
          },
          "adType": {
            "title": "Ad category",
            "enum": [
              "ALL",
              "POLITICAL_AND_ISSUE_ADS"
            ],
            "type": "string",
            "description": "Choose commercial ads or political and issue ads. Political and issue ads can expose Meta's public reach and spend disclosures; commercial ads generally do not.",
            "default": "ALL"
          },
          "country": {
            "title": "Country",
            "enum": [
              "ALL",
              "US",
              "GB",
              "DE",
              "FR",
              "ES",
              "IT",
              "CA",
              "AU",
              "BR",
              "IN",
              "JP",
              "MX",
              "NL",
              "AE",
              "AR",
              "AT",
              "BA",
              "BE",
              "BG",
              "CH",
              "CZ",
              "DK",
              "EG",
              "FI",
              "GR",
              "HR",
              "HU",
              "IE",
              "IL",
              "KR",
              "ME",
              "NO",
              "NZ",
              "PL",
              "PT",
              "RO",
              "RS",
              "SA",
              "SE",
              "SG",
              "SI",
              "SK",
              "TR",
              "UA",
              "ZA"
            ],
            "type": "string",
            "description": "Country where ads were delivered. Meta supports <i>All countries</i> only for political and issue ads. For ordinary commercial ads, an ALL input is collected as United States and the output reports US.",
            "default": "US"
          },
          "activeStatus": {
            "title": "Ad status",
            "enum": [
              "ALL",
              "ACTIVE",
              "INACTIVE"
            ],
            "type": "string",
            "description": "Return active ads, inactive ads, or both. Filtering before collection avoids delivering irrelevant rows.",
            "default": "ALL"
          },
          "mediaType": {
            "title": "Creative format",
            "enum": [
              "ALL",
              "IMAGE",
              "VIDEO",
              "MEME"
            ],
            "type": "string",
            "description": "Keep every format or return only a selected creative type.",
            "default": "ALL"
          },
          "dateFrom": {
            "title": "Ads first shown on or after",
            "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
            "type": "string",
            "description": "Optional lower date bound in YYYY-MM-DD format."
          },
          "dateTo": {
            "title": "Ads first shown on or before",
            "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
            "type": "string",
            "description": "Optional upper date bound in YYYY-MM-DD format."
          },
          "maxPaginationPages": {
            "title": "Pagination ceiling per target",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Advanced safety ceiling after the first source response. Lowering it can produce PARTIAL coverage.",
            "default": 20
          },
          "maxNetworkGb": {
            "title": "Whole-run network ceiling",
            "minimum": 0.005,
            "maximum": 0.08,
            "type": "number",
            "description": "Hard network limit for the whole run. If reached, collection stops and coverage is reported as partial instead of silently exceeding the limit.",
            "default": 0.05
          },
          "timeoutSeconds": {
            "title": "Whole-run timeout",
            "minimum": 60,
            "maximum": 900,
            "type": "integer",
            "description": "Maximum wall-clock time for the run. A timeout cannot be reported as complete coverage.",
            "default": 900
          },
          "blockMediaDownloads": {
            "title": "Lightweight media loading (recommended)",
            "type": "boolean",
            "description": "When on, image and video files are not downloaded during collection, while their source URLs are still returned. Turning it off adds bandwidth and does not add output fields.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}