{
  "openapi": "3.0.1",
  "info": {
    "title": "Meta Ad Search",
    "description": "Meta Ad Search extracts keyword, ad archive id, is active, start date, page name, page id, paid partnership, display format, body text, caption, cta type, videos, cards, publisher platforms, reach estimate for every row. Inputs: keyword list, platform filter, ad status filter, ads per keyword.",
    "version": "0.0",
    "x-build-id": "NDBERsn8II82Z9nQR"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlix~meta-ad-search/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlix-meta-ad-search",
        "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/crawlix~meta-ad-search/runs": {
      "post": {
        "operationId": "runs-sync-crawlix-meta-ad-search",
        "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/crawlix~meta-ad-search/run-sync": {
      "post": {
        "operationId": "run-sync-crawlix-meta-ad-search",
        "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": {
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Type one keyword or phrase per line, for example a brand, a product, an offer or a topic. Words on the same line are searched together, every line is searched on its own, and each ad in the results shows which keyword found it.",
            "items": {
              "type": "string"
            }
          },
          "platform": {
            "title": "Platform ($)",
            "enum": [
              "all",
              "instagram",
              "facebook",
              "messenger",
              "audience_network",
              "whatsapp",
              "threads"
            ],
            "type": "string",
            "description": "Choose where the ads you collect must run: Instagram, Facebook, Messenger, Audience Network, WhatsApp or Threads. All platforms (the default) collects ads from every platform and adds no extra charge. Choosing one platform adds a small extra charge for each ad collected, shown on the pricing tab. Ads that do not run on the platform you chose are left out and never charged.",
            "default": "all"
          },
          "active_status": {
            "title": "Ad Status ($)",
            "enum": [
              "all",
              "active",
              "inactive"
            ],
            "type": "string",
            "description": "Choose which ads to collect by their state: Active only for ads that are running now, Inactive only for ads that have stopped, or Active & inactive (the default) for both, with no extra charge. Choosing Active only or Inactive only adds a small extra charge for each ad collected, shown on the pricing tab.",
            "default": "all"
          },
          "max_ads": {
            "title": "Ads per Keyword",
            "minimum": 1,
            "type": "integer",
            "description": "How many different ads to collect for each keyword. The same ad is never counted twice, so you get exactly this many whenever that many exist. There is no upper limit: the run stops by itself when no more ads are available for the keyword and keeps everything it collected. The default of 10 is a quick first test. A free Apify account collects up to 50 ads in total per run, across all keywords; a paid plan has no limit.",
            "default": 10
          },
          "proxyCountry": {
            "title": "Connection Country",
            "enum": [
              "US",
              "GB",
              "AU",
              "CA",
              "DE",
              "FR",
              "NL",
              "IT",
              "ES",
              "SE",
              "NO",
              "DK",
              "FI",
              "BE",
              "AT",
              "CH",
              "IE",
              "PL",
              "PT",
              "CZ",
              "HU",
              "RO",
              "GR",
              "JP",
              "KR",
              "SG",
              "IN",
              "BR",
              "MX",
              "AR",
              "TR",
              "AF",
              "AL",
              "DZ",
              "AO",
              "AM",
              "AZ",
              "BS",
              "BH",
              "BD",
              "BB",
              "BY",
              "BZ",
              "BJ",
              "BO",
              "BA",
              "BW",
              "BN",
              "BG",
              "BF",
              "KH",
              "CM",
              "CL",
              "CN",
              "CO",
              "CG",
              "CR",
              "HR",
              "CU",
              "CY",
              "CD",
              "DO",
              "EC",
              "EG",
              "SV",
              "EE",
              "ET",
              "FJ",
              "GA",
              "GE",
              "GH",
              "GT",
              "GN",
              "GY",
              "HT",
              "HN",
              "HK",
              "IS",
              "ID",
              "IR",
              "IQ",
              "IL",
              "CI",
              "JM",
              "JO",
              "KZ",
              "KE",
              "KW",
              "KG",
              "LA",
              "LV",
              "LB",
              "LR",
              "LY",
              "LT",
              "LU",
              "MG",
              "MW",
              "MY",
              "MV",
              "ML",
              "MT",
              "MU",
              "MD",
              "MN",
              "ME",
              "MA",
              "MZ",
              "MM",
              "NA",
              "NP",
              "NZ",
              "NI",
              "NE",
              "NG",
              "MK",
              "OM",
              "PK",
              "PS",
              "PA",
              "PG",
              "PY",
              "PE",
              "PH",
              "PR",
              "QA",
              "RU",
              "RW",
              "SA",
              "SN",
              "RS",
              "SL",
              "SK",
              "SI",
              "SO",
              "ZA",
              "LK",
              "SD",
              "SR",
              "SY",
              "TW",
              "TJ",
              "TZ",
              "TH",
              "TG",
              "TT",
              "TN",
              "TM",
              "UG",
              "UA",
              "AE",
              "UY",
              "UZ",
              "VE",
              "VN",
              "YE",
              "ZM",
              "ZW"
            ],
            "type": "string",
            "description": "The country your run connects from, chosen from more than 150 countries. Pick the one closest to the market you are researching; the default is the United States. If the chosen country is not available right now, the run connects from the United States instead and the log says so.",
            "default": "US"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}